From: <dg...@su...> - 2009-01-20 18:20:47
|
Author: savago Date: Tue Jan 20 19:19:44 2009 New Revision: 5213 URL: http://www.opensync.org/changeset/5213 Log: Removing unneeded functions. Modified: format-plugins/xsltformat/src/xsltformat.c Modified: format-plugins/xsltformat/src/xsltformat.c ============================================================================== --- format-plugins/xsltformat/src/xsltformat.c Tue Jan 20 19:15:10 2009 (r5212) +++ format-plugins/xsltformat/src/xsltformat.c Tue Jan 20 19:19:44 2009 (r5213) @@ -33,39 +33,6 @@ #include <opensync/opensync-format.h> #include "xslt_aux.h" -static OSyncConvCmpResult compare_format1(const char *leftdata, unsigned int leftsize, - const char *rightdata, unsigned int rightsize, - void *user_data) -{ - /* - * This function can be used to compare two types of your formats. - * This is optional. For example, you can only provide a conversion - * from and to the xml format and let all the comparison be done there - * - */ - - /* - * Compare your objects here. You might need to cast the data of the change - * objects to you own defined types. - * - * The possible result of the comparison are: - * - * return OSYNC_CONV_DATA_SAME; - * The objects are exactly the same. (they might differ in some uid or - * timestamp though, but ALL the "real" information is the same) - * - * return OSYNC_CONV_DATA_SIMILAR; - * The objects are not _exactly_ the same, but they look similar. This is used - * to detect conflicts. It is up to you to decide what "similar" means for your - * object - * - * return OSYNC_CONV_DATA_MISMATCH; - * This means the objects are not the same and not similar. - * - */ - return OSYNC_CONV_DATA_MISMATCH; -} - static osync_bool conv_xslt_to_contact(char *input, unsigned int inpsize, char **output, unsigned int *outpsize, osync_bool *free_input, const char *config, void *userdata, OSyncError **error) { osync_bool result = FALSE; @@ -121,48 +88,12 @@ */ } -static osync_bool duplicate_format1(const char *uid, const char *input, unsigned int insize, char **newuid, char **output, unsigned int *outsize, osync_bool *dirty, OSyncError **error) -{ - /* - * This function can be used to duplicate your format. - * Duplication does not mean to make 2 objects out of one, - * but to change to uid of the object in such a way that it - * differes from the original uid. - * - * Most format will never need this. - * - */ - - return TRUE; -} - -static char *print_format1(const char *data, unsigned int size) -{ - /* - * If your format is not in a human printable format already - * you have to return a human readable string here describing the object - * as closely as possible. This information will be used by the user to decide - * which object to pick in a conflict. - * - */ - return NULL; -} - osync_bool get_format_info(OSyncFormatEnv *env, OSyncError **error) { - /* - * this function is called to register a new format - */ OSyncObjFormat *format = osync_objformat_new("xslt", "contact", error); if (!format) return FALSE; - osync_objformat_set_compare_func(format, compare_format1); - osync_objformat_set_destroy_func(format, destroy_format1); - //osync_objformat_set_duplicate_func(format, duplicate_format1); - //osync_objformat_set_print_func(format, print_format1); - - osync_format_env_register_objformat(env, format); osync_objformat_unref(format); |