OpenSync
0.22
|
Allows filtering of changes and applying hooks to changes as they pass through opensync. More...
Typedefs | |
typedef enum OSyncFilterAction | OSyncFilterAction |
The action that should be invoked. | |
Enumerations | |
enum | OSyncFilterAction { OSYNC_FILTER_IGNORE = 0, OSYNC_FILTER_ALLOW = 1, OSYNC_FILTER_DENY = 2 } |
The action that should be invoked. More... | |
Functions | |
void | osync_filter_register (OSyncGroup *group, OSyncFilter *filter) |
Registers a filter with a group. More... | |
OSyncFilter * | osync_filter_new (void) |
Creates a new filter. More... | |
void | osync_filter_free (OSyncFilter *filter) |
Frees a filter. More... | |
OSyncFilter * | osync_filter_add (OSyncGroup *group, OSyncMember *sourcemember, OSyncMember *destmember, const char *sourceobjtype, const char *destobjtype, const char *detectobjtype, OSyncFilterAction action) |
Register a new filter. More... | |
void | osync_filter_remove (OSyncGroup *group, OSyncFilter *filter) |
Removes a filter from a group. More... | |
OSyncFilter * | osync_filter_add_custom (OSyncGroup *group, OSyncMember *sourcemember, OSyncMember *destmember, const char *sourceobjtype, const char *destobjtype, const char *detectobjtype, const char *function_name) |
Register a new custom filter. More... | |
void | osync_filter_set_config (OSyncFilter *filter, const char *config) |
Sets the config for a filter. More... | |
const char * | osync_filter_get_config (OSyncFilter *filter) |
Gets the config of a filter. More... | |
Allows filtering of changes and applying hooks to changes as they pass through opensync.
enum OSyncFilterAction |
The action that should be invoked.
Definition at line 5 of file opensync_filter.h.
void osync_filter_register | ( | OSyncGroup * | group, |
OSyncFilter * | filter | ||
) |
Registers a filter with a group.
group | The group in which to register the filter |
filter | The filter to register |
Definition at line 185 of file opensync_filter.c.
Referenced by osync_group_load().
OSyncFilter* osync_filter_new | ( | void | ) |
Creates a new filter.
Definition at line 197 of file opensync_filter.c.
Referenced by osync_group_load().
void osync_filter_free | ( | OSyncFilter * | filter | ) |
Frees a filter.
filter | The filter to free |
Definition at line 210 of file opensync_filter.c.
Referenced by osync_group_flush_filters().
OSyncFilter* osync_filter_add | ( | OSyncGroup * | group, |
OSyncMember * | sourcemember, | ||
OSyncMember * | destmember, | ||
const char * | sourceobjtype, | ||
const char * | destobjtype, | ||
const char * | detectobjtype, | ||
OSyncFilterAction | action | ||
) |
Register a new filter.
group | For which group to register the filter |
sourcemember | The member reporting the object. NULL for any |
destmember | The member receiving the object. NULL for any |
sourceobjtype | The objtype as reported by the member without detection. NULL for any |
destobjtype | The objtype as about being saved by the member without detection. NULL for any |
detectobjtype | The objtype as detected. NULL for ignore |
action | Set this to the action the filter should return for the object |
Definition at line 236 of file opensync_filter.c.
void osync_filter_remove | ( | OSyncGroup * | group, |
OSyncFilter * | filter | ||
) |
Removes a filter from a group.
group | The group to remove from |
filter | The filter to remove |
Definition at line 260 of file opensync_filter.c.
OSyncFilter* osync_filter_add_custom | ( | OSyncGroup * | group, |
OSyncMember * | sourcemember, | ||
OSyncMember * | destmember, | ||
const char * | sourceobjtype, | ||
const char * | destobjtype, | ||
const char * | detectobjtype, | ||
const char * | function_name | ||
) |
Register a new custom filter.
group | The group that should store the filter |
sourcemember | The member reporting the object. NULL for any |
destmember | The member receiving the object. NULL for any |
sourceobjtype | The objtype as reported by the member without detection. NULL for any |
destobjtype | The object type has it is being added on the target. NULL for any |
detectobjtype | The objtype as detected. NULL for any |
function_name | The filter function to call to decide if to filter the object. |
Definition at line 280 of file opensync_filter.c.
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 305 of file opensync_filter.c.
const char* osync_filter_get_config | ( | OSyncFilter * | filter | ) |
Gets the config of a filter.
filter | The filter |
Definition at line 320 of file opensync_filter.c.