Typedefs | |
| typedef osync_bool(* | OSyncFormatDetectFunc )(const char *data, int size, void *userdata) |
| typedef osync_bool(* | OSyncFormatConvertFunc )(char *input, unsigned int inpsize, char **output, unsigned int *outpsize, osync_bool *free_input, const char *config, void *userdata, OSyncError **error) |
| typedef void *(* | OSyncFormatConverterInitializeFunc )(const char *config, OSyncError **error) |
| typedef void(* | OSyncFormatConverterFinalizeFunc )(void *userdata) |
Enumerations | |
| enum | OSyncConverterType { OSYNC_CONVERTER_CONV = 1, OSYNC_CONVERTER_ENCAP = 2, OSYNC_CONVERTER_DECAP = 3, OSYNC_CONVERTER_DETECTOR = 4 } |
Functions | |
| OSYNC_EXPORT OSyncFormatConverter * | osync_converter_new (OSyncConverterType type, OSyncObjFormat *sourceformat, OSyncObjFormat *targetformat, OSyncFormatConvertFunc convert_func, OSyncError **error) |
| Creates a new converter. | |
| OSYNC_EXPORT OSyncFormatConverter * | osync_converter_new_detector (OSyncObjFormat *sourceformat, OSyncObjFormat *targetformat, OSyncFormatDetectFunc detect_func, OSyncError **error) |
| Creates a new detector. | |
| OSYNC_EXPORT OSyncFormatConverter * | osync_converter_ref (OSyncFormatConverter *converter) |
| Increase the reference count on a converter. | |
| OSYNC_EXPORT void | osync_converter_unref (OSyncFormatConverter *converter) |
| Decrease the reference count on a converter. | |
| OSYNC_EXPORT OSyncObjFormat * | osync_converter_get_sourceformat (OSyncFormatConverter *converter) |
| Returns the source format of a converter. | |
| OSYNC_EXPORT OSyncObjFormat * | osync_converter_get_targetformat (OSyncFormatConverter *converter) |
| Returns the target format of a converter. | |
| OSYNC_EXPORT OSyncConverterType | osync_converter_get_type (OSyncFormatConverter *converter) |
| Returns the type of a converter. | |
| OSYNC_EXPORT OSyncObjFormat * | osync_converter_detect (OSyncFormatConverter *converter, OSyncData *data) |
| Detects the Object Format of passed OSyncData. | |
| OSYNC_EXPORT osync_bool | osync_converter_invoke (OSyncFormatConverter *converter, OSyncData *data, const char *config, OSyncError **error) |
| Invokes converter for OSyncData object with passed format converter configuration. | |
| OSYNC_EXPORT osync_bool | osync_converter_matches (OSyncFormatConverter *converter, OSyncData *data) |
| Checks if the Format Converter fits the Object Format of OSyncData object. | |
| OSYNC_EXPORT OSyncFormatConverterPath * | osync_converter_path_new (OSyncError **error) |
| Creates a new converter path. | |
| OSYNC_EXPORT OSyncFormatConverterPath * | osync_converter_path_ref (OSyncFormatConverterPath *path) |
| Increase the reference count on a converter path. | |
| OSYNC_EXPORT void | osync_converter_path_unref (OSyncFormatConverterPath *path) |
| Decrease the reference count on a converter path. | |
| OSYNC_EXPORT void | osync_converter_path_add_edge (OSyncFormatConverterPath *path, OSyncFormatConverter *edge) |
| Add a converter to a converter path. | |
| OSYNC_EXPORT unsigned int | osync_converter_path_num_edges (OSyncFormatConverterPath *path) |
| Returns the number of converters in a converter path. | |
| OSYNC_EXPORT OSyncFormatConverter * | osync_converter_path_nth_edge (OSyncFormatConverterPath *path, unsigned int nth) |
| Returns the nth converter in a converter path. | |
| OSYNC_EXPORT const char * | osync_converter_path_get_config (OSyncFormatConverterPath *path) |
| Returns configuration for converter path. | |
| OSYNC_EXPORT void | osync_converter_path_set_config (OSyncFormatConverterPath *path, const char *config) |
| Sets the configuration for converter path. | |
| OSYNC_EXPORT void | osync_converter_set_initialize_func (OSyncFormatConverter *converter, OSyncFormatConverterInitializeFunc initialize_func) |
| Sets the initialize function of a converter. | |
| OSYNC_EXPORT void | osync_converter_set_finalize_func (OSyncFormatConverter *converter, OSyncFormatConverterFinalizeFunc finalize_func) |
| Sets the finalize function of a converter. | |
| OSYNC_EXPORT void | osync_converter_initialize (OSyncFormatConverter *converter, const char *config, OSyncError **error) |
| Invokes initialize function of a converter. | |
| OSYNC_EXPORT void | osync_converter_finalize (OSyncFormatConverter *converter) |
| Invokes finalize function of a converter. | |
| enum OSyncConverterType |
Type of the converter
| OSYNC_CONVERTER_CONV | Simple converter |
| OSYNC_CONVERTER_ENCAP | Encapsulator |
| OSYNC_CONVERTER_DECAP | Desencapsulator |
| OSYNC_CONVERTER_DETECTOR | Detector |
Definition at line 33 of file opensync_converter.h.
| OSYNC_EXPORT OSyncFormatConverter* osync_converter_new | ( | OSyncConverterType | type, | |
| OSyncObjFormat * | sourceformat, | |||
| OSyncObjFormat * | targetformat, | |||
| OSyncFormatConvertFunc | convert_func, | |||
| OSyncError ** | error | |||
| ) |
Creates a new converter.
| type | the type of converter | |
| sourceformat | the source format for the converter | |
| targetformat | the target format for the converter | |
| convert_func | the converter function | |
| error | Pointer to an error struct |
Definition at line 32 of file opensync_converter.c.
| OSYNC_EXPORT OSyncFormatConverter* osync_converter_new_detector | ( | OSyncObjFormat * | sourceformat, | |
| OSyncObjFormat * | targetformat, | |||
| OSyncFormatDetectFunc | detect_func, | |||
| OSyncError ** | error | |||
| ) |
Creates a new detector.
| sourceformat | the source format for the converter | |
| targetformat | the target format for the converter | |
| detect_func | the detection function | |
| error | Pointer to an error struct |
Definition at line 60 of file opensync_converter.c.
Referenced by osync_format_env_register_converter().
| OSYNC_EXPORT OSyncFormatConverter* osync_converter_ref | ( | OSyncFormatConverter * | converter | ) |
Increase the reference count on a converter.
| converter | Pointer to the converter |
Definition at line 88 of file opensync_converter.c.
Referenced by osync_converter_path_add_edge(), and osync_format_env_register_converter().
| OSYNC_EXPORT void osync_converter_unref | ( | OSyncFormatConverter * | converter | ) |
Decrease the reference count on a converter.
| converter | Pointer to the converter |
Definition at line 97 of file opensync_converter.c.
Referenced by osync_converter_path_unref(), and osync_format_env_unref().
| OSYNC_EXPORT OSyncObjFormat* osync_converter_get_sourceformat | ( | OSyncFormatConverter * | converter | ) |
Returns the source format of a converter.
| converter | Pointer to the converter |
Definition at line 112 of file opensync_converter.c.
Referenced by osync_format_env_find_converter(), osync_format_env_find_converters(), and osync_format_env_register_converter().
| OSYNC_EXPORT OSyncObjFormat* osync_converter_get_targetformat | ( | OSyncFormatConverter * | converter | ) |
Returns the target format of a converter.
| converter | Pointer to the converter |
Definition at line 118 of file opensync_converter.c.
Referenced by osync_entry_engine_convert(), osync_format_env_convert(), osync_format_env_detect_objformat(), osync_format_env_find_converter(), osync_format_env_find_converters(), and osync_format_env_register_converter().
| OSYNC_EXPORT OSyncConverterType osync_converter_get_type | ( | OSyncFormatConverter * | converter | ) |
Returns the type of a converter.
| converter | Pointer to the converter |
Definition at line 124 of file opensync_converter.c.
Referenced by osync_format_env_detect_objformat(), osync_format_env_detect_objformat_full(), and osync_format_env_register_converter().
| OSYNC_EXPORT OSyncObjFormat* osync_converter_detect | ( | OSyncFormatConverter * | converter, | |
| OSyncData * | data | |||
| ) |
Detects the Object Format of passed OSyncData.
| converter | Pointer to the converter | |
| data | Pointer to OSyncData object which should be detected |
Definition at line 130 of file opensync_converter.c.
Referenced by osync_format_env_detect_objformat().
| OSYNC_EXPORT osync_bool osync_converter_invoke | ( | OSyncFormatConverter * | converter, | |
| OSyncData * | data, | |||
| const char * | config, | |||
| OSyncError ** | error | |||
| ) |
Invokes converter for OSyncData object with passed format converter configuration.
| converter | Pointer to the converter | |
| data | Pointer to OSyncData object which should be detected | |
| config | Format converter configuration | |
| error | Pointer to an error struct |
Definition at line 171 of file opensync_converter.c.
Referenced by osync_format_env_convert(), and osync_format_env_detect_objformat_full().
| OSYNC_EXPORT osync_bool osync_converter_matches | ( | OSyncFormatConverter * | converter, | |
| OSyncData * | data | |||
| ) |
Checks if the Format Converter fits the Object Format of OSyncData object.
| converter | Pointer to the converter | |
| data | Pointer to OSyncData object which should be converted |
Definition at line 220 of file opensync_converter.c.
Referenced by osync_format_env_detect_objformat(), and osync_format_env_detect_objformat_full().
| OSYNC_EXPORT OSyncFormatConverterPath* osync_converter_path_new | ( | OSyncError ** | error | ) |
Creates a new converter path.
| error | Pointer to an error struct |
Definition at line 232 of file opensync_converter.c.
| OSYNC_EXPORT OSyncFormatConverterPath* osync_converter_path_ref | ( | OSyncFormatConverterPath * | path | ) |
Increase the reference count on a converter path.
| path | Pointer to the converter path |
Definition at line 243 of file opensync_converter.c.
Referenced by osync_entry_engine_convert().
| OSYNC_EXPORT void osync_converter_path_unref | ( | OSyncFormatConverterPath * | path | ) |
Decrease the reference count on a converter path.
| path | Pointer to the converter path |
Definition at line 252 of file opensync_converter.c.
Referenced by osync_entry_engine_convert().
| OSYNC_EXPORT void osync_converter_path_add_edge | ( | OSyncFormatConverterPath * | path, | |
| OSyncFormatConverter * | edge | |||
| ) |
Add a converter to a converter path.
| path | Pointer to the converter path | |
| edge | Pointer to the converter to add |
Definition at line 270 of file opensync_converter.c.
| OSYNC_EXPORT unsigned int osync_converter_path_num_edges | ( | OSyncFormatConverterPath * | path | ) |
Returns the number of converters in a converter path.
| path | Pointer to the converter path |
Definition at line 279 of file opensync_converter.c.
Referenced by osync_entry_engine_convert(), and osync_format_env_convert().
| OSYNC_EXPORT OSyncFormatConverter* osync_converter_path_nth_edge | ( | OSyncFormatConverterPath * | path, | |
| unsigned int | nth | |||
| ) |
Returns the nth converter in a converter path.
| path | Pointer to the converter path | |
| nth | The position of the converter to retrieve |
Definition at line 285 of file opensync_converter.c.
Referenced by osync_entry_engine_convert(), and osync_format_env_convert().
| OSYNC_EXPORT const char* osync_converter_path_get_config | ( | OSyncFormatConverterPath * | path | ) |
Returns configuration for converter path.
| path | Pointer to the converter path |
Definition at line 291 of file opensync_converter.c.
Referenced by osync_format_env_convert().
| OSYNC_EXPORT void osync_converter_path_set_config | ( | OSyncFormatConverterPath * | path, | |
| const char * | config | |||
| ) |
Sets the configuration for converter path.
| path | Pointer to the converter path | |
| config | The converter path configuration |
Definition at line 297 of file opensync_converter.c.
Referenced by osync_entry_engine_convert().
| OSYNC_EXPORT void osync_converter_set_initialize_func | ( | OSyncFormatConverter * | converter, | |
| OSyncFormatConverterInitializeFunc | initialize_func | |||
| ) |
Sets the initialize function of a converter.
| converter | Pointer to the converter | |
| initialize_func | Pointer to the initialize function |
Definition at line 311 of file opensync_converter.c.
| OSYNC_EXPORT void osync_converter_set_finalize_func | ( | OSyncFormatConverter * | converter, | |
| OSyncFormatConverterFinalizeFunc | finalize_func | |||
| ) |
Sets the finalize function of a converter.
| converter | Pointer to the converter | |
| finalize_func | Pointer to the finalize function |
Definition at line 318 of file opensync_converter.c.
| OSYNC_EXPORT void osync_converter_initialize | ( | OSyncFormatConverter * | converter, | |
| const char * | config, | |||
| OSyncError ** | error | |||
| ) |
Invokes initialize function of a converter.
| converter | Pointer to the converter which should be initialized | |
| config | configuration | |
| error | Pointer to an error struct |
Definition at line 324 of file opensync_converter.c.
| OSYNC_EXPORT void osync_converter_finalize | ( | OSyncFormatConverter * | converter | ) |
Invokes finalize function of a converter.
| converter | Pointer to the converter which should be finalized |
Definition at line 333 of file opensync_converter.c.
1.5.7.1