libsyncml 0.5.4

- Main Page
- Modules
- Data Structures
- Files

- File List

data_sync_callbacks.h
1 /*
2 * syncml plugin - A syncml plugin for OpenSync
3 * Copyright (C) 2008 Michael Bell <michael.bell@opensync.org>
4 *
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
9 *
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 *
19 */
20
21 #ifndef _SML_DATA_SYNC_CALLBACKS_H
22 #define _SML_DATA_SYNC_CALLBACKS_H
23
24 #include "data_sync.h"
25
26 /* **************************************** */
27 /* ***** Management Callbacks ***** */
28 /* **************************************** */
29
30 void smlDataSyncEventCallback(
31 SmlManager *manager,
32 SmlManagerEventType type,
33 SmlSession *session,
34 SmlError *error,
35 void *userdata);
36
37 /* *************************************** */
38 /* ***** DsSession Callbacks ***** */
39 /* *************************************** */
40
41 void smlDataSyncDatastoreConnectCallback(
42 SmlDsSession *dsession,
43 void *userdata);
44
45 /* *********************************** */
46 /* ***** Alert Callbacks ***** */
47 /* *********************************** */
48
49 /* The real alert callbacks are specific for DS clients and servers.
50 * So please check data_sync_client.h and data_sync_server.h for more details.
51 */
52
53 void smlDataSyncAlertStatusCallback(
54 SmlSession *session,
55 SmlStatus *status,
56 void *userdata);
57
58 /* ********************************** */
59 /* ***** Sync Callbacks ***** */
60 /* ********************************** */
61
62 void smlDataSyncSyncCallback(
63 SmlDsSession *dsession,
64 unsigned int numchanges,
65 void *userdata);
66
67 void smlDataSyncSyncStatusCallback(
68 SmlSession *session,
69 SmlStatus *status,
70 void *userdata);
71
72 /* ************************************ */
73 /* ***** Change Callbacks ***** */
74 /* ************************************ */
75
76 SmlBool smlDataSyncChangeCallback(
77 SmlDsSession *dsession,
78 SmlChangeType type,
79 const char *uid,
80 char *data,
81 unsigned int size,
82 const char *contenttype,
83 void *userdata,
84 SmlError **smlerror);
85
86 void smlDataSyncChangeStatusCallback(
87 SmlDsSession *dsession,
88 SmlStatus *status,
89 const char *newuid,
90 void *userdata);
91
92 void smlDataSyncMappingCallback(
93 SmlDsSession *dsession,
94 SmlLocation *orig,
95 SmlLocation *newuid,
96 void *userdata);
97
98 /* ********************************* */
99 /* ***** Map Callbacks ***** */
100 /* ********************************* */
101
102 void smlDataSyncMapStatusCallback(
103 SmlSession *session,
104 SmlStatus *status,
105 void *userdata);
106
107 /* ******************************************* */
108 /* ***** Authentication Callback ***** */
109 /* ******************************************* */
110
111 SmlBool smlDataSyncVerifyUserCallback(
112 SmlChal *chal,
113 SmlCred *cred,
114 const char *username,
115 void *userdata,
116 SmlError **error);
117
118 #endif /* _SML_DATA_SYNC_CALLBACKS_H */