Changeset 3320
- Timestamp:
- 05/04/08 22:44:55 (4 months ago)
- Files:
-
- trunk/opensync/format/opensync_objformat.c (modified) (3 diffs)
- trunk/opensync/format/opensync_objformat.h (modified) (1 diff)
- trunk/opensync/format/opensync_objformat_internals.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/opensync/format/opensync_objformat.c
r3201 r3320 50 50 format->name = g_strdup(name); 51 51 format->objtype_name = g_strdup(objtype_name); 52 format->config = NULL;53 52 format->ref_count = 1; 54 53 … … 87 86 g_free(format->objtype_name); 88 87 89 if (format->config)90 g_free(format->config);91 92 88 g_free(format); 93 89 } … … 114 110 osync_assert(format); 115 111 return format->objtype_name; 116 }117 118 /**119 * @brief Returns the conversion path config of an object format120 * @param format Pointer to the object format121 * @return The conversion config of the specified object format's object type122 */123 const char *osync_objformat_get_config(OSyncObjFormat *format)124 {125 osync_assert(format);126 return format->config;127 }128 129 /**130 * @brief Set the conversion path config of an object format131 * @param format Pointer to the object format132 * @param format_config Format specific configuration133 * @return The conversion config of the specified object format's object type134 */135 void osync_objformat_set_config(OSyncObjFormat *format, const char *format_config)136 {137 osync_assert(format);138 139 if (format->config)140 g_free(format->config);141 142 format->config = g_strdup(format_config);143 112 } 144 113 trunk/opensync/format/opensync_objformat.h
r2995 r3320 38 38 OSYNC_EXPORT const char *osync_objformat_get_name(OSyncObjFormat *format); 39 39 OSYNC_EXPORT const char *osync_objformat_get_objtype(OSyncObjFormat *format); 40 OSYNC_EXPORT const char *osync_objformat_get_config(OSyncObjFormat *format);41 OSYNC_EXPORT void osync_objformat_set_config(OSyncObjFormat *format, const char *format_config);42 40 43 41 OSYNC_EXPORT void osync_objformat_set_compare_func(OSyncObjFormat *format, OSyncFormatCompareFunc cmp_func); trunk/opensync/format/opensync_objformat_internals.h
r2995 r3320 43 43 * would be "contact" */ 44 44 char *objtype_name; 45 /** the config for the conversion path */ 46 char *config; 45 47 46 OSyncFormatCompareFunc cmp_func; 48 47 OSyncFormatDuplicateFunc duplicate_func;
