00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef OPENSYNC_HASHTABLE_H_
00023 #define OPENSYNC_HASHTABLE_H_
00024
00025 #include <opensync/opensync_list.h>
00026
00027 typedef void (*OSyncHashtableForEach) (const char *uid, const char *hash, void *user_data);
00028
00086
00098 OSYNC_EXPORT OSyncHashTable *osync_hashtable_new(const char *path, const char *objtype, OSyncError **error);
00099
00105 OSYNC_EXPORT OSyncHashTable *osync_hashtable_ref(OSyncHashTable *table);
00106
00114 OSYNC_EXPORT void osync_hashtable_unref(OSyncHashTable *table);
00115
00116
00127 OSYNC_EXPORT osync_bool osync_hashtable_load(OSyncHashTable *table, OSyncError **error);
00128
00138 OSYNC_EXPORT osync_bool osync_hashtable_save(OSyncHashTable *table, OSyncError **error);
00139
00140
00152 OSYNC_EXPORT osync_bool osync_hashtable_slowsync(OSyncHashTable *table, OSyncError **error);
00153
00154
00161 OSYNC_EXPORT unsigned int osync_hashtable_num_entries(OSyncHashTable *table);
00162
00170 OSYNC_EXPORT void osync_hashtable_foreach(OSyncHashTable *table, OSyncHashtableForEach func, void *user_data);
00171
00172
00183 OSYNC_EXPORT void osync_hashtable_update_change(OSyncHashTable *table, OSyncChange *change);
00184
00185
00186
00187
00188
00196 OSYNC_EXPORT OSyncList *osync_hashtable_get_deleted(OSyncHashTable *table);
00197
00210 OSYNC_EXPORT OSyncChangeType osync_hashtable_get_changetype(OSyncHashTable *table, OSyncChange *change);
00211
00219 OSYNC_EXPORT const char *osync_hashtable_get_hash(OSyncHashTable *table, const char *uid);
00220
00223 #endif