| opensync.h | | opensync.h | |
|
| | | /* | |
| | | * libopensync - A synchronization framework | |
| | | * Copyright (C) 2004-2005 Armin Bauer <armin.bauer@opensync.org> | |
| | | * | |
| | | * This library is free software; you can redistribute it and/or | |
| | | * modify it under the terms of the GNU Lesser General Public | |
| | | * License as published by the Free Software Foundation; either | |
| | | * version 2.1 of the License, or (at your option) any later version. | |
| | | * | |
| | | * This library is distributed in the hope that it will be useful, | |
| | | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| | | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
| | | * Lesser General Public License for more details. | |
| | | * | |
| | | * You should have received a copy of the GNU Lesser General Public | |
| | | * License along with this library; if not, write to the Free Software | |
| | | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
| | | * | |
| | | */ | |
| | | | |
| #ifndef HAVE_OPENSYNC_H | | #ifndef HAVE_OPENSYNC_H | |
| #define HAVE_OPENSYNC_H | | #define HAVE_OPENSYNC_H | |
| | | | |
|
| | | #ifdef _WIN32 | |
| | | | |
| | | #include <windows.h> | |
| | | #include <process.h> | |
| | | #define __func__ __FUNCTION__ | |
| | | #define OSYNC_EXPORT __declspec(dllexport) | |
| | | | |
| | | #else | |
| | | | |
| #include <unistd.h> | | #include <unistd.h> | |
|
| | | #define OSYNC_EXPORT | |
| | | | |
| | | #endif | |
| | | | |
| #include <sys/types.h> | | #include <sys/types.h> | |
| #include <time.h> | | #include <time.h> | |
| #include <fcntl.h> | | #include <fcntl.h> | |
| | | | |
| #ifdef __cplusplus | | #ifdef __cplusplus | |
|
| extern "C" | | | |
| { | | #define OPENSYNC_BEGIN_DECLS extern "C" { | |
| | | #define OPENSYNC_END_DECLS } | |
| | | | |
| | | #else | |
| | | | |
| | | #define OPENSYNC_BEGIN_DECLS | |
| | | #define OPENSYNC_END_DECLS | |
| | | | |
| #endif | | #endif | |
| | | | |
|
| | | OPENSYNC_BEGIN_DECLS | |
| | | | |
| /************************************************************** | | /************************************************************** | |
| * Defines | | * Defines | |
| *************************************************************/ | | *************************************************************/ | |
| #ifndef TRUE | | #ifndef TRUE | |
| #define TRUE 1 | | #define TRUE 1 | |
| #endif | | #endif | |
| | | | |
| #ifndef FALSE | | #ifndef FALSE | |
| #define FALSE 0 | | #define FALSE 0 | |
| #endif | | #endif | |
| | | | |
|
| | | /************************************************************** | |
| | | * Enums | |
| | | *************************************************************/ | |
| | | | |
| | | typedef enum { | |
| | | OSYNC_START_TYPE_UNKNOWN, | |
| | | OSYNC_START_TYPE_PROCESS, | |
| | | OSYNC_START_TYPE_THREAD, | |
| | | OSYNC_START_TYPE_EXTERNAL | |
| | | } OSyncStartType; | |
| | | | |
| | | /*! @ingroup OSyncChangeCmds | |
| | | * @brief The possible returns of a change comparison | |
| | | */ | |
| | | typedef enum { | |
| | | /** The result is unknown, there was a error */ | |
| | | OSYNC_CONV_DATA_UNKNOWN = 0, | |
| | | /** The changes are not the same */ | |
| | | OSYNC_CONV_DATA_MISMATCH = 1, | |
| | | /** The changs are not the same but look similar */ | |
| | | OSYNC_CONV_DATA_SIMILAR = 2, | |
| | | /** The changes are exactly the same */ | |
| | | OSYNC_CONV_DATA_SAME = 3 | |
| | | } OSyncConvCmpResult; | |
| | | | |
| /*! | | /*! | |
| * @ingroup OSyncChange | | * @ingroup OSyncChange | |
| * @brief The changetypes of a change object */ | | * @brief The changetypes of a change object */ | |
| typedef enum { | | typedef enum { | |
| /** Unknown changetype */ | | /** Unknown changetype */ | |
|
| CHANGE_UNKNOWN = 0, | | OSYNC_CHANGE_TYPE_UNKNOWN = 0, | |
| /** Object was added */ | | /** Object was added */ | |
|
| CHANGE_ADDED = 1, | | OSYNC_CHANGE_TYPE_ADDED = 1, | |
| /** Object is unmodifed */ | | /** Object is unmodifed */ | |
|
| CHANGE_UNMODIFIED = 2, | | OSYNC_CHANGE_TYPE_UNMODIFIED = 2, | |
| /** Object is deleted */ | | /** Object is deleted */ | |
|
| CHANGE_DELETED = 3, | | OSYNC_CHANGE_TYPE_DELETED = 3, | |
| /** Object has been modified */ | | /** Object has been modified */ | |
|
| CHANGE_MODIFIED = 4 | | OSYNC_CHANGE_TYPE_MODIFIED = 4 | |
| } OSyncChangeType; | | } OSyncChangeType; | |
| | | | |
| /************************************************************** | | /************************************************************** | |
| * Structs | | * Structs | |
| *************************************************************/ | | *************************************************************/ | |
|
| typedef struct OSyncError OSyncError; | | | |
| typedef struct OSyncEnv OSyncEnv; | | /* Data Component */ | |
| | | typedef struct OSyncData OSyncData; | |
| | | typedef struct OSyncChange OSyncChange; | |
| | | | |
| | | /* Format Component */ | |
| | | typedef struct OSyncFormatEnv OSyncFormatEnv; | |
| | | typedef struct OSyncObjFormat OSyncObjFormat; | |
| | | typedef struct OSyncFormatConverterPath OSyncFormatConverterPath; | |
| | | typedef struct OSyncFormatConverter OSyncFormatConverter; | |
| | | typedef struct OSyncFilter OSyncFilter; | |
| | | typedef struct OSyncObjFormatSink OSyncObjFormatSink; | |
| | | typedef struct OSyncObjTypeSink OSyncObjTypeSink; | |
| | | | |
| | | /* Plugin component */ | |
| typedef struct OSyncPlugin OSyncPlugin; | | typedef struct OSyncPlugin OSyncPlugin; | |
|
| | | typedef struct OSyncPluginInfo OSyncPluginInfo; | |
| | | typedef struct OSyncPluginEnv OSyncPluginEnv; | |
| | | typedef struct OSyncModule OSyncModule; | |
| | | | |
| | | /* Engine component */ | |
| | | typedef struct OSyncEngine OSyncEngine; | |
| | | typedef struct OSyncObjEngine OSyncObjEngine; | |
| | | typedef struct OSyncClient OSyncClient; | |
| | | typedef struct OSyncClientProxy OSyncClientProxy; | |
| | | | |
| | | /* Mapping component */ | |
| | | typedef struct OSyncMapping OSyncMapping; | |
| | | typedef struct OSyncMappingTable OSyncMappingTable; | |
| | | typedef struct OSyncMappingView OSyncMappingView; | |
| | | typedef struct OSyncMappingEntry OSyncMappingEntry; | |
| | | | |
| | | /* Helper component */ | |
| | | typedef struct OSyncAnchorDB OSyncAnchorDB; | |
| | | | |
| | | /* Group component */ | |
| typedef struct OSyncGroup OSyncGroup; | | typedef struct OSyncGroup OSyncGroup; | |
|
| typedef struct OSyncUserInfo OSyncUserInfo; | | typedef struct OSyncGroupEnv OSyncGroupEnv; | |
| typedef struct OSyncMember OSyncMember; | | typedef struct OSyncMember OSyncMember; | |
|
| typedef struct OSyncChange OSyncChange; | | | |
| | | /* Merger component */ | |
| | | typedef struct OSyncArchive OSyncArchive; | |
| | | typedef struct OSyncCapabilities OSyncCapabilities; | |
| | | typedef struct OSyncCapability OSyncCapability; | |
| | | typedef struct OSyncXMLFormat OSyncXMLFormat; | |
| | | typedef struct OSyncXMLField OSyncXMLField; | |
| | | typedef struct OSyncXMLFieldList OSyncXMLFieldList; | |
| | | typedef struct OSyncMerger OSyncMerger; | |
| | | typedef struct OSyncVersion OSyncVersion; | |
| | | | |
| | | typedef struct OSyncError OSyncError; | |
| | | typedef struct OSyncUserInfo OSyncUserInfo; | |
| typedef struct OSyncContext OSyncContext; | | typedef struct OSyncContext OSyncContext; | |
| typedef struct OSyncHashTable OSyncHashTable; | | typedef struct OSyncHashTable OSyncHashTable; | |
|
| typedef struct OSyncFormatEnv OSyncFormatEnv; | | | |
| typedef struct OSyncObjType OSyncObjType; | | | |
| typedef struct OSyncObjFormat OSyncObjFormat; | | | |
| typedef struct OSyncFormatConverter OSyncFormatConverter; | | | |
| typedef struct OSyncFormatProperty OSyncFormatProperty; | | typedef struct OSyncFormatProperty OSyncFormatProperty; | |
|
| typedef struct OSyncFilter OSyncFilter; | | | |
| typedef struct OSyncCustomFilter OSyncCustomFilter; | | typedef struct OSyncCustomFilter OSyncCustomFilter; | |
| typedef struct OSyncMessage OSyncMessage; | | typedef struct OSyncMessage OSyncMessage; | |
| typedef struct OSyncQueue OSyncQueue; | | typedef struct OSyncQueue OSyncQueue; | |
|
| | | typedef struct OSyncDB OSyncDB; | |
| typedef int osync_bool; | | typedef int osync_bool; | |
| | | | |
|
| #include "opensync_debug.h" | | OPENSYNC_END_DECLS | |
| #include "opensync_env.h" | | | |
| #include "opensync_plugin.h" | | | |
| #include "opensync_group.h" | | | |
| #include "opensync_member.h" | | | |
| #include "opensync_error.h" | | | |
| #include "opensync_hashtable.h" | | | |
| #include "opensync_change.h" | | | |
| #include "opensync_context.h" | | | |
| #include "opensync_filter.h" | | | |
| #include "opensync_convert.h" | | | |
| #include "opensync_changecmds.h" | | | |
| #include "opensync_convreg.h" | | | |
| #include "opensync_anchor.h" | | | |
| #include "opensync_time.h" | | | |
| #include "opensync_serializer.h" | | | |
| | | | |
|
| #ifdef __cplusplus | | #include "opensync-support.h" | |
| } | | #include "opensync-error.h" | |
| #endif | | | |
| | | | |
| #endif | | #endif | |
| | | | |
End of changes. 20 change blocks. |
| 35 lines changed or deleted | | 127 lines changed or added | |
|
| opensync_change.h | | opensync_change.h | |
| #ifndef _OPENSYNC_CHANGE_H_ | | #ifndef _OPENSYNC_CHANGE_H_ | |
| #define _OPENSYNC_CHANGE_H_ | | #define _OPENSYNC_CHANGE_H_ | |
| | | | |
|
| OSyncChange *osync_change_new(void); | | OSyncChange *osync_change_new(OSyncError **error); | |
| OSyncChangeType osync_change_get_changetype(OSyncChange *change); | | void osync_change_ref(OSyncChange *change); | |
| | | void osync_change_unref(OSyncChange *change); | |
| | | | |
| | | OSyncChange *osync_change_clone(OSyncChange *source, OSyncError **error); | |
| | | | |
| void osync_change_set_hash(OSyncChange *change, const char *hash); | | void osync_change_set_hash(OSyncChange *change, const char *hash); | |
|
| void osync_change_set_uid(OSyncChange *change, const char *uid); | | | |
| void osync_change_set_data(OSyncChange *change, char *data, int size, osync | | | |
| _bool has_data); | | | |
| void osync_change_set_objformat(OSyncChange *change, OSyncObjFormat *format | | | |
| ); | | | |
| OSyncObjType *osync_change_get_objtype(OSyncChange *change); | | | |
| const char *osync_change_get_sourceobjtype(OSyncChange *change); | | | |
| void osync_change_set_changetype(OSyncChange *change, OSyncChangeType type) | | | |
| ; | | | |
| const char *osync_change_get_hash(OSyncChange *change); | | const char *osync_change_get_hash(OSyncChange *change); | |
|
| | | | |
| | | void osync_change_set_uid(OSyncChange *change, const char *uid); | |
| const char *osync_change_get_uid(OSyncChange *change); | | const char *osync_change_get_uid(OSyncChange *change); | |
|
| char *osync_change_get_data(OSyncChange *change); | | | |
| int osync_change_get_datasize(OSyncChange *change); | | OSyncChangeType osync_change_get_changetype(OSyncChange *change); | |
| | | void osync_change_set_changetype(OSyncChange *change, OSyncChangeType type) | |
| | | ; | |
| | | | |
| | | void osync_change_set_data(OSyncChange *change, OSyncData *data); | |
| | | OSyncData *osync_change_get_data(OSyncChange *change); | |
| | | | |
| | | OSyncConvCmpResult osync_change_compare(OSyncChange *leftchange, OSyncChang | |
| | | e *rightchange); | |
| | | osync_bool osync_change_duplicate(OSyncChange *change, osync_bool *dirty, O | |
| | | SyncError **error); | |
| | | | |
| OSyncObjFormat *osync_change_get_objformat(OSyncChange *change); | | OSyncObjFormat *osync_change_get_objformat(OSyncChange *change); | |
|
| long long int osync_change_get_mappingid(OSyncChange *entry); | | const char *osync_change_get_objtype(OSyncChange *change); | |
| void *osync_change_get_engine_data(OSyncChange *change); | | void osync_change_set_objtype(OSyncChange *change, const char *objtype); | |
| void osync_change_set_engine_data(OSyncChange *change, void *engine_data); | | | |
| OSyncMember *osync_change_get_member(OSyncChange *change); | | | |
| void osync_change_update(OSyncChange *source, OSyncChange *target); | | | |
| void osync_change_set_objtype(OSyncChange *change, OSyncObjType *type); | | | |
| void osync_change_set_objtype_string(OSyncChange *change, const char *name) | | | |
| ; | | | |
| void osync_change_set_member(OSyncChange *change, OSyncMember *member); | | | |
| void osync_change_set_objformat_string(OSyncChange *change, const char *nam | | | |
| e); | | | |
| void osync_change_prepend_objformat(OSyncChange *change, OSyncObjFormat *ob | | | |
| jformat); | | | |
| long long int osync_change_get_id(OSyncChange *change); | | | |
| osync_bool osync_change_has_data(OSyncChange *change); | | | |
| void osync_change_free(OSyncChange *change); | | | |
| void osync_change_reset(OSyncChange *change); | | | |
| char *osync_change_get_printable(OSyncChange *change); | | | |
| osync_bool osync_change_save(OSyncChange *change, osync_bool save_format, O | | | |
| SyncError **error); | | | |
| osync_bool osync_change_delete(OSyncChange *change, OSyncError **error); | | | |
| osync_bool osync_changes_load(OSyncGroup *group, OSyncChange ***changes, OS | | | |
| yncError **error); | | | |
| void osync_changes_close(OSyncGroup *group); | | | |
| void osync_change_free_data(OSyncChange *change); | | | |
| void osync_change_set_mappingid(OSyncChange *change, long long int mappingi | | | |
| d); | | | |
| void osync_change_set_conv_env(OSyncChange *change, OSyncFormatEnv *env); | | | |
| | | | |
| #endif //_OPENSYNC_CHANGE_H_ | | #endif //_OPENSYNC_CHANGE_H_ | |
| | | | |
End of changes. 5 change blocks. |
| 41 lines changed or deleted | | 23 lines changed or added | |
|
| opensync_filter.h | | opensync_filter.h | |
|
| | | /* | |
| | | * libopensync - A synchronization framework | |
| | | * Copyright (C) 2004-2005 Armin Bauer <armin.bauer@opensync.org> | |
| | | * | |
| | | * This library is free software; you can redistribute it and/or | |
| | | * modify it under the terms of the GNU Lesser General Public | |
| | | * License as published by the Free Software Foundation; either | |
| | | * version 2.1 of the License, or (at your option) any later version. | |
| | | * | |
| | | * This library is distributed in the hope that it will be useful, | |
| | | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| | | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
| | | * Lesser General Public License for more details. | |
| | | * | |
| | | * You should have received a copy of the GNU Lesser General Public | |
| | | * License along with this library; if not, write to the Free Software | |
| | | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
| | | * | |
| | | */ | |
| | | | |
| | | #ifndef _OPENSYNC_FILTER_H_ | |
| | | #define _OPENSYNC_FILTER_H_ | |
| | | | |
| /*! @brief The action that should be invoked | | /*! @brief The action that should be invoked | |
| * @ingroup OSyncFilterAPI | | * @ingroup OSyncFilterAPI | |
| **/ | | **/ | |
| typedef enum OSyncFilterAction { | | typedef enum OSyncFilterAction { | |
| /** This filter should be ignored */ | | /** This filter should be ignored */ | |
| OSYNC_FILTER_IGNORE = 0, | | OSYNC_FILTER_IGNORE = 0, | |
|
| /** The change should be allowed to pass (Overwrites previous action
) */ | | /** The change should be allowed to pass (overrides previous action)
*/ | |
| OSYNC_FILTER_ALLOW = 1, | | OSYNC_FILTER_ALLOW = 1, | |
|
| /** The change should be denied to pass (Overwrites previous action)
*/ | | /** The change should be prevented from passing (overrides previous
action) */ | |
| OSYNC_FILTER_DENY = 2 | | OSYNC_FILTER_DENY = 2 | |
| } OSyncFilterAction; | | } OSyncFilterAction; | |
| | | | |
|
| typedef OSyncFilterAction (* OSyncFilterFunction)(OSyncChange *, char *conf
ig); | | OSYNC_EXPORT typedef osync_bool (* OSyncFilterFunction) (OSyncData *data, c
onst char *config); | |
| | | | |
|
| osync_bool osync_filter_change_allowed(OSyncMember *destmember, OSyncChange | | OSYNC_EXPORT OSyncFilter *osync_filter_new(const char *objtype, OSyncFilter | |
| *change); | | Action action, OSyncError **error); | |
| OSyncFilter *osync_filter_add(OSyncGroup *group, OSyncMember *sourcemember, | | OSYNC_EXPORT OSyncFilter *osync_filter_new_custom(OSyncCustomFilter *custom | |
| OSyncMember *destmember, const char *sourceobjtype, const char *destobjtyp | | _filter, const char *config, OSyncFilterAction action, OSyncError **error); | |
| e, const char *detectobjtype, OSyncFilterAction action); | | OSYNC_EXPORT void osync_filter_ref(OSyncFilter *filter); | |
| OSyncFilter *osync_filter_add_custom(OSyncGroup *group, OSyncMember *source | | OSYNC_EXPORT void osync_filter_unref(OSyncFilter *filter); | |
| member, OSyncMember *destmember, const char *sourceobjtype, const char *des | | OSYNC_EXPORT void osync_filter_set_config(OSyncFilter *filter, const char * | |
| tobjtype, const char *detectobjtype, const char *function_name); | | config); | |
| void osync_filter_remove(OSyncGroup *group, OSyncFilter *filter); | | OSYNC_EXPORT const char *osync_filter_get_config(OSyncFilter *filter); | |
| void osync_filter_free(OSyncFilter *filter); | | OSYNC_EXPORT const char *osync_filter_get_objtype(OSyncFilter *filter); | |
| void osync_filter_set_config(OSyncFilter *filter, const char *config); | | OSYNC_EXPORT OSyncFilterAction osync_filter_invoke(OSyncFilter *filter, OSy | |
| const char *osync_filter_get_config(OSyncFilter *filter); | | ncData *data); | |
| | | | |
|
| const char *osync_filter_get_sourceobjtype(OSyncFilter *filter); | | OSYNC_EXPORT OSyncCustomFilter *osync_custom_filter_new(const char *objtype | |
| const char *osync_filter_get_destobjtype(OSyncFilter *filter); | | , const char *objformat, const char *name, OSyncFilterFunction hook, OSyncE | |
| const char *osync_filter_get_detectobjtype(OSyncFilter *filter); | | rror **error); | |
| OSyncFilterAction osync_filter_get_action(OSyncFilter *filter); | | OSYNC_EXPORT void osync_custom_filter_ref(OSyncCustomFilter *filter); | |
| OSyncMember *osync_filter_get_sourcemember(OSyncFilter *filter); | | OSYNC_EXPORT void osync_custom_filter_unref(OSyncCustomFilter *filter); | |
| OSyncMember *osync_filter_get_destmember(OSyncFilter *filter); | | OSYNC_EXPORT osync_bool osync_custom_filter_invoke(OSyncCustomFilter *filte | |
| | | r, OSyncData *data, const char *config); | |
| | | | |
| | | #endif //_OPENSYNC_FILTER_H_ | |
| | | | |
End of changes. 6 change blocks. |
| 15 lines changed or deleted | | 37 lines changed or added | |
|
| opensync_group.h | | opensync_group.h | |
|
| OSyncGroup *osync_group_new(OSyncEnv *osinfo); | | /* | |
| void osync_group_free(OSyncGroup *group); | | * libopensync - A synchronization framework | |
| | | * Copyright (C) 2004-2005 Armin Bauer <armin.bauer@opensync.org> | |
| | | * | |
| | | * This library is free software; you can redistribute it and/or | |
| | | * modify it under the terms of the GNU Lesser General Public | |
| | | * License as published by the Free Software Foundation; either | |
| | | * version 2.1 of the License, or (at your option) any later version. | |
| | | * | |
| | | * This library is distributed in the hope that it will be useful, | |
| | | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| | | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
| | | * Lesser General Public License for more details. | |
| | | * | |
| | | * You should have received a copy of the GNU Lesser General Public | |
| | | * License along with this library; if not, write to the Free Software | |
| | | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
| | | * | |
| | | */ | |
| | | | |
| | | #ifndef _OPENSYNC_GROUP_H_ | |
| | | #define _OPENSYNC_GROUP_H_ | |
| | | | |
| /*! @ingroup OSyncGroupAPI | | /*! @ingroup OSyncGroupAPI | |
| * @brief The lock state of a group | | * @brief The lock state of a group | |
| */ | | */ | |
| typedef enum { | | typedef enum { | |
| OSYNC_LOCK_OK, | | OSYNC_LOCK_OK, | |
| OSYNC_LOCKED, | | OSYNC_LOCKED, | |
| OSYNC_LOCK_STALE | | OSYNC_LOCK_STALE | |
| } OSyncLockState; | | } OSyncLockState; | |
| | | | |
|
| OSyncLockState osync_group_lock(OSyncGroup *group); | | typedef enum { | |
| void osync_group_unlock(OSyncGroup *group, osync_bool remove_file); | | OSYNC_CONFLICT_RESOLUTION_UNKNOWN, | |
| | | OSYNC_CONFLICT_RESOLUTION_DUPLICATE, | |
| | | OSYNC_CONFLICT_RESOLUTION_IGNORE, | |
| | | OSYNC_CONFLICT_RESOLUTION_NEWER, | |
| | | OSYNC_CONFLICT_RESOLUTION_SELECT | |
| | | } OSyncConflictResolution; | |
| | | | |
|
| void osync_group_set_name(OSyncGroup *group, const char *name); | | OSYNC_EXPORT OSyncGroup *osync_group_new(OSyncError **error); | |
| const char *osync_group_get_name(OSyncGroup *group); | | OSYNC_EXPORT void osync_group_ref(OSyncGroup *group); | |
| osync_bool osync_group_save(OSyncGroup *group, OSyncError **error); | | OSYNC_EXPORT void osync_group_unref(OSyncGroup *group); | |
| OSyncGroup *osync_group_load(OSyncEnv *env, const char *path, OSyncError ** | | | |
| error); | | | |
| osync_bool osync_group_delete(OSyncGroup *group, OSyncError **error); | | | |
| void osync_group_reset(OSyncGroup *group); | | | |
| | | | |
|
| void osync_group_add_member(OSyncGroup *group, OSyncMember *member); | | OSYNC_EXPORT OSyncLockState osync_group_lock(OSyncGroup *group); | |
| void osync_group_remove_member(OSyncGroup *group, OSyncMember *member); | | OSYNC_EXPORT void osync_group_unlock(OSyncGroup *group); | |
| OSyncMember *osync_group_nth_member(OSyncGroup *group, int nth); | | | |
| int osync_group_num_members(OSyncGroup *group); | | | |
| | | | |
|
| const char *osync_group_get_configdir(OSyncGroup *group); | | OSYNC_EXPORT void osync_group_set_name(OSyncGroup *group, const char *name) | |
| void osync_group_set_configdir(OSyncGroup *group, const char *directory); | | ; | |
| OSyncEnv *osync_group_get_env(OSyncGroup *group); | | OSYNC_EXPORT const char *osync_group_get_name(OSyncGroup *group); | |
| void *osync_group_get_data(OSyncGroup *group); | | | |
| void osync_group_set_data(OSyncGroup *group, void *data); | | | |
| long long int osync_group_create_member_id(OSyncGroup *group); | | | |
| void osync_group_set_slow_sync(OSyncGroup *group, const char *objtype, osyn | | | |
| c_bool slow_sync); | | | |
| osync_bool osync_group_get_slow_sync(OSyncGroup *group, const char *objtype | | | |
| ); | | | |
| void osync_group_reset_slow_sync(OSyncGroup *group, const char *objtypestr) | | | |
| ; | | | |
| osync_bool osync_group_objtype_enabled(OSyncGroup *group, const char *objty | | | |
| pe); | | | |
| void osync_group_set_objtype_enabled(OSyncGroup *group, const char *objtype | | | |
| , osync_bool enabled); | | | |
| OSyncFormatEnv *osync_group_get_format_env(OSyncGroup *group); | | | |
| | | | |
|
| int osync_group_num_filters(OSyncGroup *group); | | OSYNC_EXPORT osync_bool osync_group_save(OSyncGroup *group, OSyncError **er | |
| OSyncFilter *osync_group_nth_filter(OSyncGroup *group, int nth); | | ror); | |
| void osync_group_flush_filters(OSyncGroup *group); | | OSYNC_EXPORT osync_bool osync_group_delete(OSyncGroup *group, OSyncError ** | |
| | | error); | |
| | | OSYNC_EXPORT osync_bool osync_group_reset(OSyncGroup *group, OSyncError **e | |
| | | rror); | |
| | | OSYNC_EXPORT osync_bool osync_group_load(OSyncGroup *group, const char *pat | |
| | | h, OSyncError **error); | |
| | | | |
|
| osync_bool osync_group_open_changelog(OSyncGroup *group, char ***uids, char | | OSYNC_EXPORT void osync_group_add_member(OSyncGroup *group, OSyncMember *me | |
| ***objtype, long long int **memberids, int **changetypes, OSyncError **err | | mber); | |
| or); | | OSYNC_EXPORT void osync_group_remove_member(OSyncGroup *group, OSyncMember | |
| osync_bool osync_group_save_changelog(OSyncGroup *group, OSyncChange *chang | | *member); | |
| e, OSyncError **error); | | OSYNC_EXPORT OSyncMember *osync_group_find_member(OSyncGroup *group, int id | |
| osync_bool osync_group_remove_changelog(OSyncGroup *group, OSyncChange *cha | | ); | |
| nge, OSyncError **error); | | OSYNC_EXPORT OSyncMember *osync_group_nth_member(OSyncGroup *group, int nth | |
| | | ); | |
| | | OSYNC_EXPORT int osync_group_num_members(OSyncGroup *group); | |
| | | | |
|
| void osync_group_set_last_synchronization(OSyncGroup *group, time_t last_sy | | OSYNC_EXPORT const char *osync_group_get_configdir(OSyncGroup *group); | |
| nc); | | OSYNC_EXPORT void osync_group_set_configdir(OSyncGroup *group, const char * | |
| time_t osync_group_get_last_synchronization(OSyncGroup *group); | | directory); | |
| | | | |
| | | OSYNC_EXPORT int osync_group_num_objtypes(OSyncGroup *group); | |
| | | OSYNC_EXPORT const char *osync_group_nth_objtype(OSyncGroup *group, int nth | |
| | | ); | |
| | | OSYNC_EXPORT void osync_group_set_objtype_enabled(OSyncGroup *group, const | |
| | | char *objtype, osync_bool enabled); | |
| | | OSYNC_EXPORT int osync_group_objtype_enabled(OSyncGroup *group, const char | |
| | | *objtype); | |
| | | | |
| | | OSYNC_EXPORT void osync_group_add_filter(OSyncGroup *group, OSyncFilter *fi | |
| | | lter); | |
| | | OSYNC_EXPORT void osync_group_remove_filter(OSyncGroup *group, OSyncFilter | |
| | | *filter); | |
| | | OSYNC_EXPORT int osync_group_num_filters(OSyncGroup *group); | |
| | | OSYNC_EXPORT OSyncFilter *osync_group_nth_filter(OSyncGroup *group, int nth | |
| | | ); | |
| | | | |
| | | OSYNC_EXPORT void osync_group_set_last_synchronization(OSyncGroup *group, t | |
| | | ime_t last_sync); | |
| | | OSYNC_EXPORT time_t osync_group_get_last_synchronization(OSyncGroup *group) | |
| | | ; | |
| | | | |
| | | OSYNC_EXPORT void osync_group_set_conflict_resolution(OSyncGroup *group, OS | |
| | | yncConflictResolution res, int num); | |
| | | OSYNC_EXPORT void osync_group_get_conflict_resolution(OSyncGroup *group, OS | |
| | | yncConflictResolution *res, int *num); | |
| | | | |
| | | OSYNC_EXPORT osync_bool osync_group_get_merger_enabled(OSyncGroup *group); | |
| | | OSYNC_EXPORT void osync_group_set_merger_enabled(OSyncGroup *group, osync_b | |
| | | ool enable_merger); | |
| | | | |
| | | OSYNC_EXPORT osync_bool osync_group_get_converter_enabled(OSyncGroup *group | |
| | | ); | |
| | | OSYNC_EXPORT void osync_group_set_converter_enabled(OSyncGroup *group, osyn | |
| | | c_bool enable_converter); | |
| | | | |
| | | #endif /* _OPENSYNC_GROUP_H_ */ | |
| | | | |
End of changes. 8 change blocks. |
| 42 lines changed or deleted | | 54 lines changed or added | |
|
| opensync_hashtable.h | | opensync_hashtable.h | |
|
| osync_bool osync_hashtable_load(OSyncHashTable *table, OSyncMember *member, | | /* | |
| OSyncError **error); | | * libopensync - A synchronization framework | |
| void osync_hashtable_close(OSyncHashTable *table); | | * Copyright (C) 2004-2005 Armin Bauer <armin.bauer@opensync.org> | |
| void osync_hashtable_update_hash(OSyncHashTable *table, OSyncChange *change | | * | |
| ); | | * This library is free software; you can redistribute it and/or | |
| osync_bool osync_hashtable_detect_change(OSyncHashTable *table, OSyncChange | | * modify it under the terms of the GNU Lesser General Public | |
| *change); | | * License as published by the Free Software Foundation; either | |
| void osync_hashtable_report_deleted(OSyncHashTable *table, OSyncContext *co | | * version 2.1 of the License, or (at your option) any later version. | |
| ntext, const char *objtype); | | * | |
| OSyncHashTable *osync_hashtable_new(void); | | * This library is distributed in the hope that it will be useful, | |
| | | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| | | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
| | | * Lesser General Public License for more details. | |
| | | * | |
| | | * You should have received a copy of the GNU Lesser General Public | |
| | | * License along with this library; if not, write to the Free Software | |
| | | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
| | | * | |
| | | */ | |
| | | | |
| | | #ifndef OPENSYNC_HASHTABLE_H_ | |
| | | #define OPENSYNC_HASHTABLE_H_ | |
| | | | |
| | | OSyncHashTable *osync_hashtable_new(const char *path, const char *objtype, | |
| | | OSyncError **error); | |
| void osync_hashtable_free(OSyncHashTable *table); | | void osync_hashtable_free(OSyncHashTable *table); | |
|
| void osync_hashtable_forget(OSyncHashTable *table); | | | |
| | | void osync_hashtable_reset(OSyncHashTable *table); | |
| int osync_hashtable_num_entries(OSyncHashTable *table); | | int osync_hashtable_num_entries(OSyncHashTable *table); | |
| osync_bool osync_hashtable_nth_entry(OSyncHashTable *table, int i, char **u
id, char **hash); | | osync_bool osync_hashtable_nth_entry(OSyncHashTable *table, int i, char **u
id, char **hash); | |
|
| void osync_hashtable_set_slow_sync(OSyncHashTable *table, const char *objty | | void osync_hashtable_write(OSyncHashTable *table, const char *uid, const ch | |
| pe); | | ar *hash); | |
| | | void osync_hashtable_delete(OSyncHashTable *table, const char *uid); | |
| | | void osync_hashtable_update_hash(OSyncHashTable *table, OSyncChangeType typ | |
| | | e, const char *uid, const char *hash); | |
| void osync_hashtable_report(OSyncHashTable *table, const char *uid); | | void osync_hashtable_report(OSyncHashTable *table, const char *uid); | |
|
| void osync_hashtable_get_hash(OSyncHashTable *table, OSyncChange *chg); | | char **osync_hashtable_get_deleted(OSyncHashTable *table); | |
| OSyncChangeType osync_hashtable_get_changetype(OSyncHashTable *table, const | | OSyncChangeType osync_hashtable_get_changetype(OSyncHashTable *table, const | |
| char *uid, const char *objtype, const char *hash); | | char *uid, const char *hash); | |
| char **osync_hashtable_get_deleted(OSyncHashTable *table, const char *objty | | char *osync_hashtable_get_hash(OSyncHashTable *table, const char *uid); | |
| pe); | | | |
| | | #endif /* OPENSYNC_HASHTABLE_H_ */ | |
| | | | |
End of changes. 4 change blocks. |
| 13 lines changed or deleted | | 32 lines changed or added | |
|
| opensync_member.h | | opensync_member.h | |
|
| | | /* | |
| | | * libopensync - A synchronization framework | |
| | | * Copyright (C) 2004-2005 Armin Bauer <armin.bauer@opensync.org> | |
| | | * | |
| | | * This library is free software; you can redistribute it and/or | |
| | | * modify it under the terms of the GNU Lesser General Public | |
| | | * License as published by the Free Software Foundation; either | |
| | | * version 2.1 of the License, or (at your option) any later version. | |
| | | * | |
| | | * This library is distributed in the hope that it will be useful, | |
| | | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| | | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
| | | * Lesser General Public License for more details. | |
| | | * | |
| | | * You should have received a copy of the GNU Lesser General Public | |
| | | * License along with this library; if not, write to the Free Software | |
| | | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
| | | * | |
| | | */ | |
| | | | |
|
| /*! @brief Represents the functions that a member will call to inform the s | | #ifndef _OPENSYNC_MEMBER_H_ | |
| yncengine */ | | #define _OPENSYNC_MEMBER_H_ | |
| typedef struct OSyncMemberFunctions { | | | |
| /** The callback function that will receive the new changes from the | | | |
| plugins */ | | | |
| void (* rf_change) (OSyncMember *, OSyncChange *, void *); | | | |
| /** The callback function that will receive custom message calls fro | | | |
| m the plugin */ | | | |
| void *(* rf_message) (OSyncMember *, const char *, void *, osync_boo | | | |
| l); | | | |
| /** The callback function that will receive sync alerts from the plu | | | |
| gin */ | | | |
| void (* rf_sync_alert) (OSyncMember *); | | | |
| /** The callback function that will receive log messages */ | | | |
| void (*rf_log) (OSyncMember *, char *); | | | |
| } OSyncMemberFunctions; | | | |
| | | | |
|
| typedef void (* OSyncEngCallback)(OSyncMember *, void *, OSyncError **); | | OSYNC_EXPORT OSyncMember *osync_member_new(OSyncError **error); | |
| | | OSYNC_EXPORT void osync_member_ref(OSyncMember *member); | |
| | | OSYNC_EXPORT void osync_member_unref(OSyncMember *member); | |
| | | | |
|
| OSyncMember *osync_member_new(OSyncGroup *group); | | OSYNC_EXPORT const char *osync_member_get_pluginname(OSyncMember *member); | |
| void osync_member_free(OSyncMember *member); | | OSYNC_EXPORT void osync_member_set_pluginname(OSyncMember *member, const ch | |
| | | ar *pluginname); | |
| | | | |
|
| osync_bool osync_member_instance_plugin(OSyncMember *member, const char *pl | | OSYNC_EXPORT const char *osync_member_get_name(OSyncMember *member); | |
| uginname, OSyncError **error); | | OSYNC_EXPORT void osync_member_set_name(OSyncMember *member, const char *na | |
| OSyncPlugin *osync_member_get_plugin(OSyncMember *member); | | me); | |
| | | | |
|
| const char *osync_member_get_configdir(OSyncMember *member); | | OSYNC_EXPORT const char *osync_member_get_configdir(OSyncMember *member); | |
| osync_bool osync_member_get_config(OSyncMember *member, char **data, int *s | | OSYNC_EXPORT void osync_member_set_configdir(OSyncMember *member, const cha | |
| ize, OSyncError **error); | | r *configdir); | |
| osync_bool osync_member_get_config_or_default(OSyncMember *member, char **d | | | |
| ata, int *size, OSyncError **error); | | | |
| osync_bool osync_member_need_config(OSyncMember *member, OSyncConfiguration | | | |
| Types *type, OSyncError **error); | | | |
| | | | |
|
| void osync_member_set_config(OSyncMember *member, const char *data, int siz | | OSYNC_EXPORT osync_bool osync_member_has_config(OSyncMember *member); | |
| e); | | OSYNC_EXPORT const char *osync_member_get_config_or_default(OSyncMember *me | |
| osync_bool osync_member_has_configuration(OSyncMember *member); | | mber, OSyncError **error); | |
| const char *osync_member_get_pluginname(OSyncMember *member); | | OSYNC_EXPORT const char *osync_member_get_config(OSyncMember *member, OSync | |
| osync_bool osync_member_initialize(OSyncMember *member, OSyncError **error) | | Error **error); | |
| ; | | OSYNC_EXPORT void osync_member_set_config(OSyncMember *member, const char * | |
| void *osync_member_get_enginedata(OSyncMember *member); | | data); | |
| void osync_member_set_enginedata(OSyncMember *member, void *data); | | | |
| void *osync_member_get_report_function(OSyncMember *member); | | | |
| void osync_member_set_report_function(OSyncMember *member, void *function); | | | |
| OSyncGroup *osync_member_get_group(OSyncMember *member); | | | |
| void *osync_member_get_data(OSyncMember *member); | | | |
| void osync_member_set_data(OSyncMember *member, void *data); | | | |
| OSyncMemberFunctions *osync_member_get_memberfunctions(OSyncMember *member) | | | |
| ; | | | |
| OSyncMember *osync_member_from_id(OSyncGroup *group, int id); | | | |
| OSyncChange *osync_member_get_changeentry(OSyncMember *member, char *uid); | | | |
| int osync_member_num_changeentries(OSyncMember *member); | | | |
| OSyncChange *osync_member_nth_changeentry(OSyncMember *member, int n); | | | |
| long long int osync_member_get_id(OSyncMember *member); | | | |
| OSyncMember *osync_member_load(OSyncGroup *group, const char *path, OSyncEr | | | |
| ror **error); | | | |
| osync_bool osync_member_save(OSyncMember *member, OSyncError **error); | | | |
| void osync_member_connect(OSyncMember *member, OSyncEngCallback function, v | | | |
| oid *user_data); | | | |
| void osync_member_disconnect(OSyncMember *member, OSyncEngCallback function | | | |
| , void *user_data); | | | |
| void osync_member_get_changeinfo(OSyncMember *member, OSyncEngCallback func | | | |
| tion, void *user_data); | | | |
| void osync_member_read_change(OSyncMember *member, OSyncChange *change, OSy | | | |
| ncEngCallback function, void *user_data); | | | |
| void osync_member_committed_all(OSyncMember *member, OSyncEngCallback funct | | | |
| ion, void *user_data); | | | |
| void osync_member_set_name(OSyncMember *member, const char *name); | | | |
| const char *osync_member_get_name(OSyncMember *member); | | | |
| | | | |
|
| void *osync_member_call_plugin(OSyncMember *member, const char *function, v | | OSYNC_EXPORT osync_bool osync_member_load(OSyncMember *member, const char * | |
| oid *data, OSyncError **error); | | path, OSyncError **error); | |
| void osync_member_commit_change(OSyncMember *member, OSyncChange *change, O | | OSYNC_EXPORT osync_bool osync_member_save(OSyncMember *member, OSyncError * | |
| SyncEngCallback function, void *user_data); | | *error); | |
| void osync_member_get_change_data(OSyncMember *member, OSyncChange *change, | | OSYNC_EXPORT osync_bool osync_member_delete(OSyncMember *member, OSyncError | |
| OSyncEngCallback function, void *user_data); | | **error); | |
| OSyncFormatEnv *osync_member_get_format_env(OSyncMember *member); | | | |
| void osync_member_sync_done(OSyncMember *member, OSyncEngCallback function, | | | |
| void *user_data); | | | |
| OSyncChange *osync_member_find_change(OSyncMember *member, const char *uid) | | | |
| ; | | | |
| void osync_member_add_changeentry(OSyncMember *member, OSyncChange *entry); | | | |
| void osync_member_request_synchronization(OSyncMember *member); | | | |
| OSyncChange *osync_member_add_random_data(OSyncMember *member, const char * | | | |
| objtype); | | | |
| void osync_member_finalize(OSyncMember *member); | | | |
| void osync_member_remove_changeentry(OSyncMember *member, OSyncChange *entr | | | |
| y); | | | |
| osync_bool osync_member_modify_random_data(OSyncMember *member, OSyncChange | | | |
| *change); | | | |
| osync_bool osync_member_delete_data(OSyncMember *member, OSyncChange *chang | | | |
| e); | | | |
| void osync_member_set_slow_sync(OSyncMember *member, const char *objtypestr | | | |
| , osync_bool slow_sync); | | | |
| osync_bool osync_member_get_slow_sync(OSyncMember *member, const char *objt | | | |
| ypestr); | | | |
| osync_bool osync_member_objtype_enabled(OSyncMember *member, const char *ob | | | |
| jtype); | | | |
| osync_bool osync_member_update_change(OSyncMember *member, OSyncChange **ch | | | |
| ange); | | | |
| void osync_member_set_objtype_enabled(OSyncMember *member, const char *objt | | | |
| ypestr, osync_bool enabled); | | | |
| void osync_member_set_pluginname(OSyncMember *member, const char *pluginnam | | | |
| e); | | | |
| void osync_member_set_configdir(OSyncMember *member, const char *configdir) | | | |
| ; | | | |
| void *osync_member_get_plugindata(OSyncMember *member); | | | |
| osync_bool osync_member_has_read_function(OSyncMember *member, OSyncObjType | | | |
| *objtype); | | | |
| | | | |
|
| void *osync_member_get_loop(OSyncMember *member); | | OSYNC_EXPORT long long int osync_member_get_id(OSyncMember *member); | |
| void osync_member_set_loop(OSyncMember *member, void *loop); | | | |
| | | OSYNC_EXPORT int osync_member_num_objtypes(OSyncMember *member); | |
| | | OSYNC_EXPORT const char *osync_member_nth_objtype(OSyncMember *member, int | |
| | | nth); | |
| | | | |
| | | OSYNC_EXPORT void osync_member_add_objtype_sink(OSyncMember *member, OSyncO | |
| | | bjTypeSink *sink); | |
| | | OSYNC_EXPORT OSyncObjTypeSink *osync_member_find_objtype_sink(OSyncMember * | |
| | | member, const char *objtype); | |
| | | | |
| | | OSYNC_EXPORT osync_bool osync_member_objtype_enabled(OSyncMember *member, c | |
| | | onst char *objtype); | |
| | | OSYNC_EXPORT void osync_member_set_objtype_enabled(OSyncMember *member, con | |
| | | st char *objtype, osync_bool enabled); | |
| | | | |
| | | OSYNC_EXPORT const OSyncList *osync_member_get_objformats(OSyncMember *memb | |
| | | er, const char *objtype, OSyncError **error); | |
| | | OSYNC_EXPORT void osync_member_add_objformat(OSyncMember *member, const cha | |
| | | r *objtype, const char *format); | |
| | | | |
| | | OSYNC_EXPORT OSyncCapabilities *osync_member_get_capabilities(OSyncMember * | |
| | | member); | |
| | | OSYNC_EXPORT osync_bool osync_member_set_capabilities(OSyncMember *member, | |
| | | OSyncCapabilities *capabilities, OSyncError **error); | |
| | | | |
| | | OSYNC_EXPORT OSyncMerger *osync_member_get_merger(OSyncMember *member); | |
| | | | |
| | | OSYNC_EXPORT void osync_member_flush_objtypes(OSyncMember *member); | |
| | | | |
| | | #endif /* _OPENSYNC_MEMBER_H_ */ | |
| | | | |
End of changes. 9 change blocks. |
| 103 lines changed or deleted | | 46 lines changed or added | |
|
| opensync_plugin.h | | opensync_plugin.h | |
|
| | | /* | |
| /*! @brief The functions that can be called on a plugin | | * libopensync - A synchronization framework | |
| * @ingroup OSyncPluginAPI | | * Copyright (C) 2004-2005 Armin Bauer <armin.bauer@opensync.org> | |
| **/ | | | |
| typedef struct OSyncPluginFunctions { | | | |
| /** The function that gets a configuration file for this plugin (opt | | | |
| ional) */ | | | |
| osync_bool (* get_config) (char *, char **, int *); | | | |
| /** The function that stores the configuration file for this plugin | | | |
| (optional) */ | | | |
| osync_bool (* store_config) (char *, const char *, int); | | | |
| /** A function to check if the backend is available. (optional) */ | | | |
| osync_bool (* is_available) (OSyncError **); | | | |
| /** The function to initialize the plugin. */ | | | |
| void * (* initialize) (OSyncMember *, OSyncError **); | | | |
| /** The function to finalize the plugin. The input will be the outpu | | | |
| t of the initialize function */ | | | |
| void (* finalize) (void *); | | | |
| /** Make a connection to your device here */ | | | |
| void (* connect) (OSyncContext *); | | | |
| /** This function gets called if the sync was successfull (Optional) | | | |
| */ | | | |
| void (* sync_done) (OSyncContext *ctx); | | | |
| /** Disconnect from the device */ | | | |
| void (* disconnect) (OSyncContext *); | | | |
| /** Get all available changes here. */ | | | |
| void (* get_changeinfo) (OSyncContext *); | | | |
| /** Get the data for a change here (Optional) */ | | | |
| void (* get_data) (OSyncContext *, OSyncChange *); | | | |
| /** */ | | | |
| } OSyncPluginFunctions; | | | |
| | | | |
| /*! @brief The timeouts for the asynchronous functions of a plugin | | | |
| * | | * | |
|
| * The default timeout it 60 seconds. Set this to 0 if you dont want | | * This library is free software; you can redistribute it and/or | |
| * to have a timeout | | * modify it under the terms of the GNU Lesser General Public | |
| | | * License as published by the Free Software Foundation; either | |
| | | * version 2.1 of the License, or (at your option) any later version. | |
| * | | * | |
|
| * @ingroup OSyncPluginAPI | | * This library is distributed in the hope that it will be useful, | |
| **/ | | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| typedef struct OSyncPluginTimeouts { | | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
| /** The timeout of the connect function */ | | * Lesser General Public License for more details. | |
| unsigned int connect_timeout; | | * | |
| /** The timeout of the syncdone function */ | | * You should have received a copy of the GNU Lesser General Public | |
| unsigned int sync_done_timeout; | | * License along with this library; if not, write to the Free Software | |
| /** The timeout of the disconnect function */ | | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
| unsigned int disconnect_timeout; | | * | |
| /** The timeout of the function that gets the changes */ | | */ | |
| unsigned int get_changeinfo_timeout; | | | |
| /** The timeout of the function that gets the data of change */ | | | |
| unsigned int get_data_timeout; | | | |
| /** The timeout of the commit function */ | | | |
| unsigned int commit_timeout; | | | |
| /** The timeout of the function that reads a change */ | | | |
| unsigned int read_change_timeout; | | | |
| } OSyncPluginTimeouts; | | | |
| | | | |
|
| typedef osync_bool (* OSyncFormatCommitFn) (OSyncContext *, OSyncChange *); | | #ifndef _OPENSYNC_PLUGIN_H_ | |
| typedef osync_bool (* OSyncFormatAccessFn) (OSyncContext *, OSyncChange *); | | #define _OPENSYNC_PLUGIN_H_ | |
| typedef void (* OSyncFormatCommittedAllFn) (OSyncContext *); | | | |
| typedef void (* OSyncFormatReadFn) (OSyncContext *, OSyncChange *); | | | |
| typedef void (* OSyncFormatBatchCommitFn) (OSyncContext *, OSyncContext **, | | | |
| OSyncChange **); | | | |
| | | | |
|
| /*! @brief The functions for accessing formats on a plugin | | typedef void * (* initialize_fn) (OSyncPlugin *, OSyncPluginInfo *, OSyncEr | |
| * @ingroup OSyncPluginAPI | | ror **); | |
| **/ | | typedef void (* finalize_fn) (void *); | |
| typedef struct OSyncFormatFunctions { | | typedef osync_bool (* discover_fn) (void *, OSyncPluginInfo *, OSyncError * | |
| /** The commit function of this format */ | | *); | |
| OSyncFormatCommitFn commit_change; | | typedef osync_bool (* usable_fn) (OSyncError **); | |
| /** The function that will be called once the plugin has received al | | | |
| l commits */ | | | |
| OSyncFormatCommittedAllFn committed_all; | | | |
| /** This function will be called by opensync with an array of change | | | |
| s to commit */ | | | |
| OSyncFormatBatchCommitFn batch_commit; | | | |
| /** The function to write a change WITHOUT updating hashtables or si | | | |
| milar stuff */ | | | |
| OSyncFormatAccessFn access; | | | |
| /** The function to read a change by its uid */ | | | |
| OSyncFormatReadFn read; | | | |
| } OSyncFormatFunctions; | | | |
| | | | |
| /*! @brief Gives information about wether the plugin | | /*! @brief Gives information about wether the plugin | |
| * has to be configured or not | | * has to be configured or not | |
| * | | * | |
| * @ingroup OSyncPluginAPI | | * @ingroup OSyncPluginAPI | |
| **/ | | **/ | |
| typedef enum { | | typedef enum { | |
| /** Plugin has no configuration options */ | | /** Plugin has no configuration options */ | |
|
| NO_CONFIGURATION = 0, | | OSYNC_PLUGIN_NO_CONFIGURATION = 0, | |
| /** Plugin can be configured, but will accept the default config in
the initialize function */ | | /** Plugin can be configured, but will accept the default config in
the initialize function */ | |
|
| OPTIONAL_CONFIGURATION = 1, | | OSYNC_PLUGIN_OPTIONAL_CONFIGURATION = 1, | |
| /** Plugin must be configured to run correctly */ | | /** Plugin must be configured to run correctly */ | |
|
| NEEDS_CONFIGURATION = 2 | | OSYNC_PLUGIN_NEEDS_CONFIGURATION = 2 | |
| } OSyncConfigurationTypes; | | } OSyncConfigurationType; | |
| | | | |
|
| /*! @brief Gives information about a plugin | | OSYNC_EXPORT OSyncPlugin *osync_plugin_new(OSyncError **error); | |
| * @ingroup OSyncPluginAPI | | OSYNC_EXPORT void osync_plugin_unref(OSyncPlugin *plugin); | |
| **/ | | OSYNC_EXPORT void osync_plugin_ref(OSyncPlugin *plugin); | |
| typedef struct OSyncPluginInfo { | | | |
| /** The version of Opensync API this plugin uses*/ | | | |
| int version; | | | |
| /** The name of this plugin */ | | | |
| const char *name; | | | |
| /** The longer, more descriptive name of the plugin */ | | | |
| const char *longname; | | | |
| /** A short description what the plugin does */ | | | |
| const char *description; | | | |
| /** Is this plugin considered thread-safe? (unused atm) */ | | | |
| osync_bool is_threadsafe; | | | |
| /** The functions of your plugin */ | | | |
| OSyncPluginFunctions functions; | | | |
| /** The timeouts of your plugin */ | | | |
| OSyncPluginTimeouts timeouts; | | | |
| /** Does the plugin have configuration options? */ | | | |
| OSyncConfigurationTypes config_type; | | | |
| /** The pointer to the plugin (for internal use) */ | | | |
| OSyncPlugin *plugin; | | | |
| /** Plugin-specific data | | | |
| * | | | |
| * Can be used when a single module registers many plugins, | | | |
| * such as the python-module plugin | | | |
| */ | | | |
| void *plugin_data; | | | |
| } OSyncPluginInfo; | | | |
| | | | |
|
| OSyncPlugin *osync_plugin_new(OSyncEnv *env); | | OSYNC_EXPORT const char *osync_plugin_get_name(OSyncPlugin *plugin); | |
| OSyncPluginInfo *osync_plugin_new_info(OSyncEnv *env); | | OSYNC_EXPORT void osync_plugin_set_name(OSyncPlugin *plugin, const char *na | |
| void osync_plugin_free(OSyncPlugin *plugin); | | me); | |
| | | | |
|
| osync_bool osync_module_load(OSyncEnv *env, const char *path, OSyncError ** | | OSYNC_EXPORT const char *osync_plugin_get_longname(OSyncPlugin *plugin); | |
| error); | | OSYNC_EXPORT void osync_plugin_set_longname(OSyncPlugin *plugin, const char | |
| osync_bool osync_module_load_dir(OSyncEnv *env, const char *path, osync_boo | | *longname); | |
| l must_exist, OSyncError **oserror); | | | |
| | | | |
|
| OSyncPlugin *osync_plugin_from_name(OSyncEnv *osinfo, const char *name); | | OSYNC_EXPORT OSyncConfigurationType osync_plugin_get_config_type(OSyncPlugi | |
| const char *osync_plugin_get_name(OSyncPlugin *plugin); | | n *plugin); | |
| const char *osync_plugin_get_longname(OSyncPlugin *plugin); | | OSYNC_EXPORT void osync_plugin_set_config_type(OSyncPlugin *plugin, OSyncCo | |
| const char *osync_plugin_get_description(OSyncPlugin *plugin); | | nfigurationType type); | |
| OSyncPluginTimeouts osync_plugin_get_timeouts(OSyncPlugin *plugin); | | | |
| void *osync_plugin_get_plugin_data(OSyncPlugin *plugin); | | | |
| const char *osync_plugin_get_path(OSyncPlugin *plugin); | | | |
| | | | |
|
| void *osync_plugin_get_function(OSyncPlugin *plugin, const char *name, OSyn | | OSYNC_EXPORT OSyncStartType osync_plugin_get_start_type(OSyncPlugin *plugin | |
| cError **error); | | ); | |
| void osync_plugin_accept_objtype(OSyncPluginInfo *info, const char *objtype | | OSYNC_EXPORT void osync_plugin_set_start_type(OSyncPlugin *plugin, OSyncSta | |
| str); | | rtType type); | |
| void osync_plugin_accept_objformat(OSyncPluginInfo *info, const char *objty | | | |
| pestr, const char *formatstr, const char *extension); | | OSYNC_EXPORT const char *osync_plugin_get_description(OSyncPlugin *plugin); | |
| void osync_plugin_set_commit_objformat(OSyncPluginInfo *info, const char *o | | OSYNC_EXPORT void osync_plugin_set_description(OSyncPlugin *plugin, const c | |
| bjtypestr, const char *formatstr, OSyncFormatCommitFn commit_change); | | har *description); | |
| void osync_plugin_set_access_objformat(OSyncPluginInfo *info, const char *o | | | |
| bjtypestr, const char *formatstr, OSyncFormatAccessFn access_fn); | | OSYNC_EXPORT void osync_plugin_set_initialize(OSyncPlugin *plugin, initiali | |
| void osync_plugin_set_read_objformat(OSyncPluginInfo *info, const char *obj | | ze_fn init); | |
| typestr, const char *formatstr, OSyncFormatReadFn read_fn); | | OSYNC_EXPORT void osync_plugin_set_finalize(OSyncPlugin *plugin, finalize_f | |
| void osync_plugin_set_batch_commit_objformat(OSyncPluginInfo *info, const c | | n fin); | |
| har *objtypestr, const char *formatstr, OSyncFormatBatchCommitFn batch); | | OSYNC_EXPORT void osync_plugin_set_discover(OSyncPlugin *plugin, discover_f | |
| void osync_plugin_set_committed_all_objformat(OSyncPluginInfo *info, const | | n discover); | |
| char *objtypestr, const char *formatstr, OSyncFormatCommittedAllFn committe | | | |
| d_all); | | OSYNC_EXPORT void *osync_plugin_get_data(OSyncPlugin *plugin); | |
| | | OSYNC_EXPORT void osync_plugin_set_data(OSyncPlugin *plugin, void *data); | |
| | | | |
| | | OSYNC_EXPORT void *osync_plugin_initialize(OSyncPlugin *plugin, OSyncPlugin | |
| | | Info *info, OSyncError **error); | |
| | | OSYNC_EXPORT void osync_plugin_finalize(OSyncPlugin *plugin, void *data); | |
| | | OSYNC_EXPORT osync_bool osync_plugin_discover(OSyncPlugin *plugin, void *da | |
| | | ta, OSyncPluginInfo *info, OSyncError **error); | |
| | | OSYNC_EXPORT osync_bool osync_plugin_is_usable(OSyncPlugin *plugin, OSyncEr | |
| | | ror **error); | |
| | | | |
| | | #endif //_OPENSYNC_PLUGIN_H_ | |
| | | | |
End of changes. 13 change blocks. |
| 124 lines changed or deleted | | 42 lines changed or added | |
|
| opensync_serializer.h | | opensync_serializer.h | |
| | | | |
| skipping to change at line 24 | | skipping to change at line 24 | |
| * | | * | |
| * You should have received a copy of the GNU Lesser General Public | | * You should have received a copy of the GNU Lesser General Public | |
| * License along with this library; if not, write to the Free Software | | * License along with this library; if not, write to the Free Software | |
| * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
| * | | * | |
| */ | | */ | |
| | | | |
| #ifndef _OPENSYNC_SERIALIZER_H_ | | #ifndef _OPENSYNC_SERIALIZER_H_ | |
| #define _OPENSYNC_SERIALIZER_H_ | | #define _OPENSYNC_SERIALIZER_H_ | |
| | | | |
|
| #define TYPE_OSYNC_CHANGE 1 | | osync_bool osync_marshal_data(OSyncMessage *message, OSyncData *data, OSync | |
| #define TYPE_OSYNC_MEMBER 2 | | Error **error); | |
| | | osync_bool osync_demarshal_data(OSyncMessage *message, OSyncData **data, OS | |
| int osync_marshal_get_size_changetype( OSyncChangeType changetype ); | | yncFormatEnv *env, OSyncError **error); | |
| void osync_marshal_changetype( OSyncMessage *message, OSyncChangeType chang | | | |
| etype ); | | | |
| void osync_demarshal_changetype( OSyncMessage *message, OSyncChangeType *ch | | | |
| angetype ); | | | |
| | | | |
| int osync_marshal_get_size_change( OSyncChange *change ); | | | |
| void osync_marshal_change( OSyncMessage *message, OSyncChange *change ); | | | |
| void osync_demarshal_change( OSyncMessage *message, OSyncFormatEnv *conv_en | | | |
| v, OSyncChange **change ); | | | |
| | | | |
| int osync_marshal_get_size_member( OSyncMember *member ); | | | |
| void osync_marshal_member( OSyncMessage *message, OSyncMember *member ); | | | |
| void osync_demarshal_member( OSyncMessage *message, OSyncMember **member ); | | | |
| | | | |
|
| int osync_marshal_get_size_error( OSyncError **error ); | | osync_bool osync_marshal_change(OSyncMessage *message, OSyncChange *change, | |
| void osync_marshal_error( OSyncMessage *message, OSyncError *error ); | | OSyncError **error); | |
| void osync_demarshal_error( OSyncMessage *message, OSyncError **error ); | | osync_bool osync_demarshal_change(OSyncMessage *message, OSyncChange **chan | |
| | | ge, OSyncFormatEnv *env, OSyncError **error); | |
| | | | |
|
| int osync_marshal_get_size_message( OSyncMessage *message ); | | void osync_marshal_error(OSyncMessage *message, OSyncError *error); | |
| | | void osync_demarshal_error(OSyncMessage *message, OSyncError **error); | |
| | | | |
|
| void osync_marshal_changedata(OSyncMessage *message, OSyncChange *change); | | osync_bool osync_marshal_objtype_sink(OSyncMessage *message, OSyncObjTypeSi | |
| void osync_demarshal_changedata(OSyncMessage *message, OSyncChange *change) | | nk *sink, OSyncError **error); | |
| ; | | osync_bool osync_demarshal_objtype_sink(OSyncMessage *message, OSyncObjType | |
| | | Sink **sink, OSyncError **error); | |
| | | | |
| #endif | | #endif | |
| | | | |
End of changes. 4 change blocks. |
| 24 lines changed or deleted | | 14 lines changed or added | |
|
| opensync_time.h | | opensync_time.h | |
| #ifndef _OPENSYNC_TIME_H_ | | #ifndef _OPENSYNC_TIME_H_ | |
| #define _OPENSYNC_TIME_H_ | | #define _OPENSYNC_TIME_H_ | |
| | | | |
|
| | | /* | |
| | | * Note: in all functions below that require a timezone offset, | |
| | | * they *require* the caller to be completely accurate with it, | |
| | | * including in the DST case. The result is only as accurate | |
| | | * as the offset you provide. | |
| | | */ | |
| | | | |
| /* Timeformat helper */ | | /* Timeformat helper */ | |
| char *osync_time_timestamp(const char *vtime); | | char *osync_time_timestamp(const char *vtime); | |
| char *osync_time_datestamp(const char *vtime); | | char *osync_time_datestamp(const char *vtime); | |
| osync_bool osync_time_isdate(const char *vformat); | | osync_bool osync_time_isdate(const char *vformat); | |
| osync_bool osync_time_isutc(const char *vformat); | | osync_bool osync_time_isutc(const char *vformat); | |
| //char *osync_time_set_vtime(const char *vtime, const char *time, osync_boo
l is_utc); | | //char *osync_time_set_vtime(const char *vtime, const char *time, osync_boo
l is_utc); | |
| | | | |
|
| /* Timetype helper */ | | /* String <-> struct converters, no smarts */ | |
| struct tm *osync_time_vtime2tm(const char *vtime); | | struct tm *osync_time_vtime2tm(const char *vtime); | |
| char *osync_time_tm2vtime(const struct tm *time, osync_bool is_utc); | | char *osync_time_tm2vtime(const struct tm *time, osync_bool is_utc); | |
|
| | | | |
| | | /* Timetype helper */ | |
| time_t osync_time_vtime2unix(const char *vtime, int offset); | | time_t osync_time_vtime2unix(const char *vtime, int offset); | |
| char *osync_time_unix2vtime(const time_t *timestamp); | | char *osync_time_unix2vtime(const time_t *timestamp); | |
|
| time_t osync_time_tm2unix(const struct tm *tmtime); | | | |
| struct tm *osync_time_unix2tm(const time_t *timestamp); | | /* Unix time_t converters */ | |
| | | time_t osync_time_localtm2unix(const struct tm *tmtime); // aka, mktime() | |
| | | time_t osync_time_utctm2unix(const struct tm *tmtime); // actually usef | |
| | | ul! | |
| | | struct tm *osync_time_unix2localtm(const time_t *timestamp);// aka, localti | |
| | | me() | |
| | | struct tm *osync_time_unix2utctm(const time_t *timestamp); // aka, gmtime( | |
| | | ) | |
| | | | |
| /* Timezone helper */ | | /* Timezone helper */ | |
| /* System Timezone-Reliable Helpers */ | | /* System Timezone-Reliable Helpers */ | |
|
| int osync_time_timezone_diff(const struct tm *time); | | int osync_time_timezone_diff(const struct tm *local); | |
| struct tm *osync_time_tm2utc(const struct tm *ltime, int offset); | | struct tm *osync_time_tm2utc(const struct tm *ltime, int offset); | |
| struct tm *osync_time_tm2localtime(const struct tm *utime, int offset); | | struct tm *osync_time_tm2localtime(const struct tm *utime, int offset); | |
| char *osync_time_vtime2utc(const char* localtime, int offset); | | char *osync_time_vtime2utc(const char* localtime, int offset); | |
| char *osync_time_vtime2localtime(const char* utc, int offset); | | char *osync_time_vtime2localtime(const char* utc, int offset); | |
| | | | |
| /* XXX This functions should only be used as workaround for plugins which | | /* XXX This functions should only be used as workaround for plugins which | |
| only supports localtime without any timezone information. */ | | only supports localtime without any timezone information. */ | |
| char *osync_time_vcal2localtime(const char *vcal); | | char *osync_time_vcal2localtime(const char *vcal); | |
| char *osync_time_vcal2utc(const char *vcal); | | char *osync_time_vcal2utc(const char *vcal); | |
| | | | |
|
| /* Smart Timezone Helpers */ | | | |
| // TODO | | | |
| | | | |
| /* Alarm Duration Timeformat helper */ | | /* Alarm Duration Timeformat helper */ | |
| char *osync_time_sec2alarmdu(int seconds); | | char *osync_time_sec2alarmdu(int seconds); | |
| int osync_time_alarmdu2sec(const char *alarm); | | int osync_time_alarmdu2sec(const char *alarm); | |
| | | | |
| /* Timezone ID helper */ | | /* Timezone ID helper */ | |
|
| | | // FIXME: how do we handle iCal weekday strings with multiple days? | |
| | | // something like the following? | |
| | | //int osync_time_str2wday(const char *weekday, int *wdaymap); | |
| int osync_time_str2wday(const char *weekday); | | int osync_time_str2wday(const char *weekday); | |
| struct tm *osync_time_relative2tm(const char *byday, const int bymonth, con
st int year); | | struct tm *osync_time_relative2tm(const char *byday, const int bymonth, con
st int year); | |
| int osync_time_utcoffset2sec(const char *offset); | | int osync_time_utcoffset2sec(const char *offset); | |
| | | | |
|
| | | /* Recurrence API */ | |
| | | //struct OSyncRecur *osync_recur_parse_rules(OSyncXMLFormat *event); | |
| | | // hmmm, recurrence rules only pertain to a certain | |
| | | // field.... how do we get that data? can we get a sub | |
| | | // field of a field? | |
| | | //struct tm *osync_recur_get_next(OSyncRecur *recur, struct tm *current); | |
| | | | |
| | | /* Smart Timezone Helpers */ | |
| | | /* | |
| | | struct tm *osync_time_dstchange(xmlNode *dstNode); | |
| | | osync_bool osync_time_isdst(const char *vtime, xmlNode *tzid); | |
| | | int osync_time_tzoffset(const char *vtime, xmlNode *tz); | |
| | | char *osync_time_tzid(xmlNode *tz); | |
| | | char *osync_time_tzlocation(xmlNode *tz); | |
| | | xmlNode *osync_time_tzinfo(xmlNode *root, const char *tzid); | |
| | | char *osync_time_tzlocal2utc(xmlNode *root, const char *field); | |
| | | */ | |
| | | | |
| | | //struct tm *osync_time_dstchange(OSyncXMLFormat *event, OSyncXMLField *dat | |
| | | eTimeContent); | |
| | | //osync_bool osync_time_isdst(OSyncXMLFormat *event, OSyncXMLField *dateTim | |
| | | eContent); | |
| | | //int osync_time_tzoffset(const char *vtime, xmlNode *tz); | |
| | | //char *osync_time_tzid(xmlNode *tz); | |
| | | //char *osync_time_tzlocation(xmlNode *tz); | |
| | | //xmlNode *osync_time_tzinfo(xmlNode *root, const char *tzid); | |
| | | //char *osync_time_tzlocal2utc(xmlNode *root, const char *field); | |
| | | | |
| | | time_t osync_time_xml2unix(OSyncXMLFormat *event, OSyncXMLField *dateTimeCo | |
| | | ntent); | |
| | | | |
| #endif // _OPENSYNC_TIME_H_ | | #endif // _OPENSYNC_TIME_H_ | |
| | | | |
End of changes. 8 change blocks. |
| 7 lines changed or deleted | | 54 lines changed or added | |
|
| opensync_xml.h | | opensync_xml.h | |
|
| #ifndef _OPENSYNC_XML_H | | /* | |
| #define _OPENSYNC_XML_H | | * libopensync - A synchronization framework | |
| | | * Copyright (C) 2004-2005 Armin Bauer <armin.bauer@opensync.org> | |
| | | * | |
| | | * This library is free software; you can redistribute it and/or | |
| | | * modify it under the terms of the GNU Lesser General Public | |
| | | * License as published by the Free Software Foundation; either | |
| | | * version 2.1 of the License, or (at your option) any later version. | |
| | | * | |
| | | * This library is distributed in the hope that it will be useful, | |
| | | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| | | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
| | | * Lesser General Public License for more details. | |
| | | * | |
| | | * You should have received a copy of the GNU Lesser General Public | |
| | | * License along with this library; if not, write to the Free Software | |
| | | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
| | | * | |
| | | */ | |
| | | | |
| | | #ifndef OPENSYNC_XML_H_ | |
| | | #define OPENSYNC_XML_H_ | |
| | | | |
| #include <libxml/xmlmemory.h> | | #include <libxml/xmlmemory.h> | |
| #include <libxml/parser.h> | | #include <libxml/parser.h> | |
|
| #include <libxml/xpath.h> | | | |
| | | | |
| #ifdef __cplusplus | | | |
| extern "C" | | | |
| { | | | |
| #endif | | | |
| | | | |
|
| typedef enum osxmlEncoding { | | osync_bool osync_open_xml_file(xmlDocPtr *doc, xmlNodePtr *cur, const char | |
| OSXML_8BIT = 0, | | *path, const char *topentry, OSyncError **error); | |
| OSXML_QUOTED_PRINTABLE = 1, | | | |
| OSXML_BASE64 = 2 | | | |
| } osxmlEncoding; | | | |
| | | | |
| typedef enum osxmlCharset { | | | |
| OSXML_ASCII = 0, | | | |
| OSXML_UTF8 = 1 | | | |
| } osxmlCharset; | | | |
| | | | |
| typedef struct OSyncXMLEncoding OSyncXMLEncoding; | | | |
| struct OSyncXMLEncoding { | | | |
| osxmlEncoding encoding; | | | |
| osxmlCharset charset; | | | |
| }; | | | |
| | | | |
| xmlNode *osxml_node_add_root(xmlDoc *doc, const char *name); | | | |
| xmlNode *osxml_node_get_root(xmlDoc *doc, const char *name, OSyncError **er | | | |
| ror); | | | |
| xmlNode *osxml_get_node(xmlNode *parent, const char *name); | | | |
| | | | |
| xmlNode *osxml_node_add(xmlNode *parent, const char *name, const char *data | | | |
| ); | | | |
| //void osxml_format_dump(OSyncXML *xml, char **data, int *size); | | | |
| xmlNode *osxml_format_parse(const char *input, int size, const char *rootna | | | |
| me, OSyncError **error); | | | |
| char *osxml_find_node(xmlNode *parent, const char *name); | | | |
| void osxml_node_add_property(xmlNode *parent, const char *name, const char | | | |
| *data); | | | |
| char *osxml_find_property(xmlNode *parent, const char *name); | | | |
| osync_bool osxml_has_property(xmlNode *parent, const char *name); | | | |
| osync_bool osxml_has_property_full(xmlNode *parent, const char *name, const | | | |
| char *data); | | | |
| | | | |
| void osxml_node_mark_unknown(xmlNode *parent); | | | |
| void osxml_node_remove_unknown_mark(xmlNode *node); | | | |
| void osxml_map_unknown_param(xmlNode *node, const char *paramname, const ch | | | |
| ar *newname); | | | |
| | | | |
| void osxml_node_set(xmlNode *node, const char *name, const char *data, OSyn | | | |
| cXMLEncoding encoding); | | | |
| xmlXPathObject *osxml_get_nodeset(xmlDoc *doc, const char *expression); | | | |
| xmlXPathObject *osxml_get_unknown_nodes(xmlDoc *doc); | | | |
| xmlChar *osxml_write_to_string(xmlDoc *doc); | | | |
| osync_bool osxml_copy(const char *input, int inpsize, char **output, int *o | | | |
| utpsize); | | | |
| | | | |
| osync_bool osxml_marshall(const char *input, int inpsize, char **output, in | | | |
| t *outpsize, OSyncError **error); | | | |
| osync_bool osxml_demarshall(const char *input, int inpsize, char **output, | | | |
| int *outpsize, OSyncError **error); | | | |
| | | | |
| #ifdef __cplusplus | | | |
| } | | | |
| #endif | | | |
| | | | |
|
| #endif // _OPENSYNC_XML_H | | #endif /*OPENSYNC_XML_H_*/ | |
| | | | |
End of changes. 4 change blocks. |
| 64 lines changed or deleted | | 24 lines changed or added | |
|