Functions | |
| OSYNC_EXPORT OSyncGroupEnv * | osync_group_env_new (OSyncError **error) |
| This will create a new opensync group environment. | |
| OSYNC_EXPORT OSyncGroupEnv * | osync_group_env_ref (OSyncGroupEnv *env) |
| Increase the reference count on an OSyncGroupEnv. | |
| OSYNC_EXPORT void | osync_group_env_unref (OSyncGroupEnv *env) |
| Decrements the reference count on an OSyncGroupEnv. | |
| OSYNC_EXPORT osync_bool | osync_group_env_load_groups (OSyncGroupEnv *env, const char *path, OSyncError **error) |
| Loads the plugins from a given directory. | |
| OSYNC_EXPORT OSyncGroup * | osync_group_env_find_group (OSyncGroupEnv *env, const char *name) |
| Finds the group with the given name. | |
| OSYNC_EXPORT osync_bool | osync_group_env_add_group (OSyncGroupEnv *env, OSyncGroup *group, OSyncError **error) |
| Adds the given group to the environment. | |
| OSYNC_EXPORT void | osync_group_env_remove_group (OSyncGroupEnv *env, OSyncGroup *group) |
| Removes the given group from the enviroment. | |
| OSYNC_EXPORT int | osync_group_env_num_groups (OSyncGroupEnv *env) |
| Counts the groups in the environment. | |
| OSYNC_EXPORT OSyncGroup * | osync_group_env_nth_group (OSyncGroupEnv *env, int nth) |
| Returns the nth group. | |
| OSYNC_EXPORT OSyncGroupEnv* osync_group_env_new | ( | OSyncError ** | error | ) |
This will create a new opensync group environment.
The environment will hold all information about plugins, groups etc
Definition at line 42 of file opensync_group_env.c.
| OSYNC_EXPORT OSyncGroupEnv* osync_group_env_ref | ( | OSyncGroupEnv * | env | ) |
Increase the reference count on an OSyncGroupEnv.
Use when storing a reference to the group environment. When the reference is no longer needed use osync_group_env_unref
Definition at line 60 of file opensync_group_env.c.
| OSYNC_EXPORT void osync_group_env_unref | ( | OSyncGroupEnv * | env | ) |
Decrements the reference count on an OSyncGroupEnv.
If the reference count reaches zero then the environment is freed and all resources are freed or unrefed
| env | Pointer to the environment to free |
Definition at line 71 of file opensync_group_env.c.
| OSYNC_EXPORT osync_bool osync_group_env_load_groups | ( | OSyncGroupEnv * | env, | |
| const char * | path, | |||
| OSyncError ** | error | |||
| ) |
Loads the plugins from a given directory.
Loads all plugins from a directory into a osync environment. The directory must exist prior to opening.
| env | Pointer to a OSyncGroupEnv environment | |
| path | The path where to look for groups | |
| error | Pointer to a error struct to return a error |
Definition at line 92 of file opensync_group_env.c.
| OSYNC_EXPORT OSyncGroup* osync_group_env_find_group | ( | OSyncGroupEnv * | env, | |
| const char * | name | |||
| ) |
Finds the group with the given name.
Finds the group with the given name
| env | Pointer to a OSyncGroupEnv environment | |
| name | Name of the group to search |
Definition at line 184 of file opensync_group_env.c.
Referenced by osync_group_env_add_group().
| OSYNC_EXPORT osync_bool osync_group_env_add_group | ( | OSyncGroupEnv * | env, | |
| OSyncGroup * | group, | |||
| OSyncError ** | error | |||
| ) |
Adds the given group to the environment.
Adds the given group to the environment.
| env | Pointer to a OSyncGroupEnv environment | |
| group | The group to add. The group must have a name. | |
| error | Pointer to a error struct to return a error |
Definition at line 199 of file opensync_group_env.c.
Referenced by osync_group_env_load_groups().
| OSYNC_EXPORT void osync_group_env_remove_group | ( | OSyncGroupEnv * | env, | |
| OSyncGroup * | group | |||
| ) |
Removes the given group from the enviroment.
Removes the given group from the environment
| env | Pointer to a OSyncGroupEnv environment | |
| group | The group to add |
Definition at line 231 of file opensync_group_env.c.
| OSYNC_EXPORT int osync_group_env_num_groups | ( | OSyncGroupEnv * | env | ) |
Counts the groups in the environment.
Returns the number of groups
| env | Pointer to a OSyncGroupEnv environment |
Definition at line 240 of file opensync_group_env.c.
| OSYNC_EXPORT OSyncGroup* osync_group_env_nth_group | ( | OSyncGroupEnv * | env, | |
| int | nth | |||
| ) |
Returns the nth group.
Returns the nth groups from the environment
| env | Pointer to a OSyncGroupEnv environment | |
| nth | Which group to return |
Definition at line 246 of file opensync_group_env.c.
1.5.7.1