Typedefs | |
| typedef struct OSyncFilter | OSyncFilter |
| typedef struct OSyncCustomFilter | OSyncCustomFilter |
| typedef osync_bool(* | OSyncFilterFunction )(OSyncData *data, const char *config) |
Enumerations | |
| enum | OSyncFilterAction { OSYNC_FILTER_IGNORE = 0, OSYNC_FILTER_ALLOW = 1, OSYNC_FILTER_DENY = 2 } |
| The action that should be invoked. More... | |
Functions | |
| OSYNC_TEST_EXPORT OSyncFilter * | osync_filter_new (const char *objtype, OSyncFilterAction action, OSyncError **error) |
| Creates a new filter. | |
| OSYNC_TEST_EXPORT OSyncFilter * | osync_filter_new_custom (OSyncCustomFilter *custom_filter, const char *config, OSyncFilterAction action, OSyncError **error) |
| Creates a new filter that uses a custom filter. | |
| OSyncFilter * | osync_filter_ref (OSyncFilter *filter) |
| Increase the reference count on a filter. | |
| OSYNC_TEST_EXPORT void | osync_filter_unref (OSyncFilter *filter) |
| Decrease the reference count on a filter. | |
| OSYNC_TEST_EXPORT void | osync_filter_set_config (OSyncFilter *filter, const char *config) |
| Sets the config for a filter. | |
| OSYNC_TEST_EXPORT const char * | osync_filter_get_config (OSyncFilter *filter) |
| Gets the config of a filter. | |
| OSYNC_TEST_EXPORT const char * | osync_filter_get_objtype (OSyncFilter *filter) |
| Gets the object type of a filter. | |
| OSyncFilterAction | osync_filter_invoke (OSyncFilter *filter, OSyncData *data) |
| Invokes a filter on a data object. | |
| OSYNC_TEST_EXPORT OSyncCustomFilter * | osync_custom_filter_new (const char *objtype, const char *objformat, const char *name, OSyncFilterFunction hook, OSyncError **error) |
| Creates a new custom filter. | |
| OSyncCustomFilter * | osync_custom_filter_ref (OSyncCustomFilter *filter) |
| Increase the reference count on a custom filter. | |
| OSYNC_TEST_EXPORT void | osync_custom_filter_unref (OSyncCustomFilter *filter) |
| Decrease the reference count on a custom filter. | |
| osync_bool | osync_custom_filter_invoke (OSyncCustomFilter *filter, OSyncData *data, const char *config) |
| Invokes a custom filter on a data object. | |
| enum OSyncFilterAction |
The action that should be invoked.
Definition at line 37 of file opensync_filter_internals.h.
| OSYNC_TEST_EXPORT OSyncFilter* osync_filter_new | ( | const char * | objtype, | |
| OSyncFilterAction | action, | |||
| OSyncError ** | error | |||
| ) |
Creates a new filter.
| objtype | the object type handled by the filter | |
| action | the action that should be invoked by the filter | |
| error | Pointer to an error struct |
Definition at line 29 of file opensync_filter.c.
| OSYNC_TEST_EXPORT OSyncFilter* osync_filter_new_custom | ( | OSyncCustomFilter * | custom_filter, | |
| const char * | config, | |||
| OSyncFilterAction | action, | |||
| OSyncError ** | error | |||
| ) |
Creates a new filter that uses a custom filter.
| custom_filter | Custom filter to use | |
| config | configuration to be used by the custom filter. Must be a null-terminated string. | |
| action | the action that should be invoked by the filter | |
| error | Pointer to an error struct |
Definition at line 50 of file opensync_filter.c.
| OSyncFilter* osync_filter_ref | ( | OSyncFilter * | filter | ) |
Increase the reference count on a filter.
| filter | Pointer to the filter |
Definition at line 74 of file opensync_filter.c.
Referenced by osync_group_add_filter().
| OSYNC_TEST_EXPORT void osync_filter_unref | ( | OSyncFilter * | filter | ) |
Decrease the reference count on a filter.
| filter | Pointer to the filter |
Definition at line 83 of file opensync_filter.c.
Referenced by osync_group_remove_filter().
| OSYNC_TEST_EXPORT void osync_filter_set_config | ( | OSyncFilter * | filter, | |
| const char * | config | |||
| ) |
Sets the config for a filter.
Config must be a null-terminated string
| filter | The filter | |
| config | The new config for this filter |
Definition at line 98 of file opensync_filter.c.
| OSYNC_TEST_EXPORT const char* osync_filter_get_config | ( | OSyncFilter * | filter | ) |
Gets the config of a filter.
| filter | The filter |
Definition at line 110 of file opensync_filter.c.
| OSYNC_TEST_EXPORT const char* osync_filter_get_objtype | ( | OSyncFilter * | filter | ) |
Gets the object type of a filter.
| filter | The filter |
Definition at line 116 of file opensync_filter.c.
| OSyncFilterAction osync_filter_invoke | ( | OSyncFilter * | filter, | |
| OSyncData * | data | |||
| ) |
Invokes a filter on a data object.
| filter | The filter | |
| data | The data to be passed into the filter |
Definition at line 122 of file opensync_filter.c.
| OSYNC_TEST_EXPORT OSyncCustomFilter* osync_custom_filter_new | ( | const char * | objtype, | |
| const char * | objformat, | |||
| const char * | name, | |||
| OSyncFilterFunction | hook, | |||
| OSyncError ** | error | |||
| ) |
Creates a new custom filter.
| objtype | the object type handled by the custom filter | |
| objformat | the object format handled by the custom filter | |
| name | name of the custom filter | |
| hook | the filter callback function | |
| error | Pointer to an error struct |
Definition at line 147 of file opensync_filter.c.
| OSyncCustomFilter* osync_custom_filter_ref | ( | OSyncCustomFilter * | filter | ) |
Increase the reference count on a custom filter.
| filter | Pointer to the custom filter |
Definition at line 170 of file opensync_filter.c.
Referenced by osync_filter_new_custom(), and osync_format_env_register_filter().
| OSYNC_TEST_EXPORT void osync_custom_filter_unref | ( | OSyncCustomFilter * | filter | ) |
Decrease the reference count on a custom filter.
| filter | Pointer to the custom filter |
Definition at line 179 of file opensync_filter.c.
Referenced by osync_format_env_unref().
| osync_bool osync_custom_filter_invoke | ( | OSyncCustomFilter * | filter, | |
| OSyncData * | data, | |||
| const char * | config | |||
| ) |
Invokes a custom filter on a data object.
| filter | The custom filter | |
| data | The data to be passed into the custom filter | |
| config | Configuration to be used by the custom filter. Must be a null-terminated string. |
Definition at line 197 of file opensync_filter.c.
Referenced by osync_filter_invoke().
1.5.7.1