OpenSync Conversion
[OpenSync Public API]

Used to convert, compare and detect changes. More...


Functions

OSyncFormatEnvosync_conv_env_new (OSyncEnv *env)
 This will create a new opensync format environment.
void osync_conv_env_free (OSyncFormatEnv *env)
 Frees a osync format environment.
osync_bool osync_conv_set_common_format (OSyncFormatEnv *env, const char *objtypestr, const char *formatname, OSyncError **error)
 Sets the common format for a object type.
OSyncObjTypeosync_conv_find_objtype (OSyncFormatEnv *env, const char *name)
 Finds the object type with the given name.
int osync_conv_num_objtypes (OSyncFormatEnv *env)
 Returns the number of available object types.
OSyncObjTypeosync_conv_nth_objtype (OSyncFormatEnv *env, int nth)
 Gets the nth object type.
OSyncObjFormatosync_conv_find_objformat (OSyncFormatEnv *env, const char *name)
 Finds the object format with the given name.
int osync_conv_num_objformats (OSyncObjType *type)
 Returns the number of available object formats.
OSyncObjFormatosync_conv_nth_objformat (OSyncObjType *type, int nth)
 Gets the nth object format.
OSyncFormatConverterosync_conv_find_converter (OSyncFormatEnv *env, const char *sourcename, const char *targetname)
 Finds the converter with the given source and target format.
OSyncFormatExtensionosync_conv_find_extension (OSyncFormatEnv *env, OSyncObjFormat *from_format, OSyncObjFormat *to_format, const char *extension_name)
 Finds the extension that will be invoked when going from the given source to the target format with the given name.
const char * osync_objtype_get_name (OSyncObjType *type)
 Returns the name of a object type.
const char * osync_objformat_get_name (OSyncObjFormat *format)
 Returns the name of a object format.
OSyncObjTypeosync_objformat_get_objtype (OSyncObjFormat *format)
 Returns the object type of a format.


Detailed Description

Used to convert, compare and detect changes.

Function Documentation

OSyncFormatEnv* osync_conv_env_new ( OSyncEnv *  env  ) 

This will create a new opensync format environment.

The environment will hold all information about plugins, formats etc

Returns:
A pointer to a newly allocated environment. NULL on error.

Definition at line 568 of file opensync_convert.c.

Referenced by osync_group_new().

void osync_conv_env_free ( OSyncFormatEnv env  ) 

Frees a osync format environment.

Frees a osync format environment and all resources.

Parameters:
env Pointer to the environment to free

Definition at line 685 of file opensync_convert.c.

Referenced by osync_group_free().

osync_bool osync_conv_set_common_format ( OSyncFormatEnv env,
const char *  objtypestr,
const char *  formatname,
OSyncError **  error 
)

Sets the common format for a object type.

Parameters:
env Pointer to the environment
objtypestr The object type name for which to set the common format
formatname The name of the format
error Pointer to a error struct
Returns:
TRUE if the format was successfully set

Definition at line 703 of file opensync_convert.c.

Referenced by osync_conv_env_new().

OSyncObjType* osync_conv_find_objtype ( OSyncFormatEnv env,
const char *  name 
)

Finds the object type with the given name.

Parameters:
env Pointer to the environment
name Name of the object type to find
Returns:
The object type, or NULL if not found

Definition at line 726 of file opensync_convert.c.

Referenced by osync_change_get_objtype(), osync_conv_env_new(), osync_conv_set_common_format(), osync_group_get_slow_sync(), osync_group_reset_slow_sync(), osync_group_set_slow_sync(), and osync_member_make_random_data().

int osync_conv_num_objtypes ( OSyncFormatEnv env  ) 

Returns the number of available object types.

Parameters:
env Pointer to the environment
Returns:
The number of object types

Definition at line 747 of file opensync_convert.c.

OSyncObjType* osync_conv_nth_objtype ( OSyncFormatEnv env,
int  nth 
)

Gets the nth object type.

Parameters:
env Pointer to the environment
nth The number
Returns:
The object type, or NULL if there is no such object type

Definition at line 760 of file opensync_convert.c.

OSyncObjFormat* osync_conv_find_objformat ( OSyncFormatEnv env,
const char *  name 
)

Finds the object format with the given name.

Parameters:
env Pointer to the environment
name Name of the format type to find
Returns:
The object format, or NULL if not found

Definition at line 773 of file opensync_convert.c.

Referenced by osync_change_get_initial_objformat(), osync_change_get_objformat(), osync_conv_env_new(), osync_conv_find_converter(), and osync_conv_set_common_format().

int osync_conv_num_objformats ( OSyncObjType type  ) 

Returns the number of available object formats.

Parameters:
type The object type for whih to lookup the formats
Returns:
The number of object formats

Definition at line 793 of file opensync_convert.c.

OSyncObjFormat* osync_conv_nth_objformat ( OSyncObjType type,
int  nth 
)

Gets the nth object format.

Parameters:
type The object for which to get the nth format
nth The number
Returns:
The object format, or NULL if there is no such object type

Definition at line 806 of file opensync_convert.c.

OSyncFormatConverter* osync_conv_find_converter ( OSyncFormatEnv env,
const char *  sourcename,
const char *  targetname 
)

Finds the converter with the given source and target format.

Parameters:
env Pointer to the environment
sourcename Name of the source format
targetname Name of the target format
Returns:
The converter, or NULL if not found

Definition at line 820 of file opensync_convert.c.

Referenced by osync_conv_env_new().

OSyncFormatExtension* osync_conv_find_extension ( OSyncFormatEnv env,
OSyncObjFormat from_format,
OSyncObjFormat to_format,
const char *  extension_name 
)

Finds the extension that will be invoked when going from the given source to the target format with the given name.

Parameters:
env Pointer to the environment
from_format From Format
to_format To Format
extension_name The name of the extension to search
Returns:
The extension, or NULL if not found

Definition at line 845 of file opensync_convert.c.

const char* osync_objtype_get_name ( OSyncObjType type  ) 

Returns the name of a object type.

Parameters:
type The object type
Returns:
The name of the object type

Definition at line 866 of file opensync_convert.c.

Referenced by _new_change_receiver(), and osync_hashtable_detect_change().

const char* osync_objformat_get_name ( OSyncObjFormat format  ) 

Returns the name of a object format.

Parameters:
format The object format
Returns:
The name of the object format

Definition at line 878 of file opensync_convert.c.

Referenced by _new_change_receiver().

OSyncObjType* osync_objformat_get_objtype ( OSyncObjFormat format  ) 

Returns the object type of a format.

Parameters:
format The object format
Returns:
The object type

Definition at line 890 of file opensync_convert.c.

Referenced by osync_member_has_read_function().


Generated on Sun Jul 26 17:47:24 2009 for OpenSync by  doxygen 1.5.9