From: <dg...@su...> - 2009-01-04 22:19:17
|
Author: dgollub Date: Sun Jan 4 22:46:52 2009 New Revision: 5006 URL: http://www.opensync.org/changeset/5006 Log: Porting xmlformat-plugin to demerge/merge-function API change. Make use of OSyncMerge. Modified: format-plugins/xmlformat/trunk/src/xmlformat.c format-plugins/xmlformat/trunk/src/xmlformat.h Modified: format-plugins/xmlformat/trunk/src/xmlformat.c ============================================================================== --- format-plugins/xmlformat/trunk/src/xmlformat.c Sun Jan 4 22:36:43 2009 (r5005) +++ format-plugins/xmlformat/trunk/src/xmlformat.c Sun Jan 4 22:46:52 2009 (r5006) @@ -83,7 +83,7 @@ return buffer; } -osync_bool marshal_xmlformat(const char *input, unsigned int inpsize, OSyncMessage *message, OSyncError **error) +osync_bool marshal_xmlformat(const char *input, unsigned int inpsize, OSyncMarshal *marshal, OSyncError **error) { char *buffer; unsigned int size; @@ -91,19 +91,19 @@ if(!osync_xmlformat_assemble((OSyncXMLFormat *)input, &buffer, &size)) return FALSE; - osync_message_write_buffer(message, buffer, (int)size); + osync_marshal_write_buffer(marshal, buffer, (int)size); g_free(buffer); return TRUE; } -osync_bool demarshal_xmlformat(OSyncMessage *message, char **output, unsigned int *outpsize, OSyncError **error) +osync_bool demarshal_xmlformat(OSyncMarshal *marshal, char **output, unsigned int *outpsize, OSyncError **error) { void *buffer = NULL; unsigned int size = 0; OSyncXMLFormat *xmlformat = NULL; - osync_message_read_buffer(message, &buffer, (int *)&size); + osync_marshal_read_buffer(marshal, &buffer, (int *)&size); xmlformat = osync_xmlformat_parse((char *)buffer, size, error); if (!xmlformat) { Modified: format-plugins/xmlformat/trunk/src/xmlformat.h ============================================================================== --- format-plugins/xmlformat/trunk/src/xmlformat.h Sun Jan 4 22:36:43 2009 (r5005) +++ format-plugins/xmlformat/trunk/src/xmlformat.h Sun Jan 4 22:46:52 2009 (r5006) @@ -33,7 +33,6 @@ #include <opensync/opensync.h> #include <opensync/opensync-xmlformat.h> -#include <opensync/opensync-serializer.h> #include <opensync/opensync-format.h> #include <opensync/opensync-time.h> @@ -66,9 +65,6 @@ osync_bool copy_xmlformat(const char *input, unsigned int inpsize, char **output, unsigned int *outpsize, OSyncError **error); char *print_xmlformat(const char *data, unsigned int size); -osync_bool marshal_xmlformat(const char *input, unsigned int inpsize, OSyncMessage *message, OSyncError **error); -osync_bool demarshal_xmlformat(OSyncMessage *message, char **output, unsigned int *outpsize, OSyncError **error); - int xmlformat_get_points(OSyncXMLPoints points[], int* cur_pos, int basic_points, const char* fieldname); OSyncConvCmpResult xmlformat_compare(OSyncXMLFormat *xmlformat1, OSyncXMLFormat *xmlformat2, OSyncXMLPoints points[], int basic_points, int treshold); |