2 * libopensync - A synchronization engine for the opensync framework
3 * Copyright (C) 2004-2005 Armin Bauer <armin.bauer@opensync.org>
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.
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.
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
21 #ifndef OPENSYNC_ENGINE_PRIVATE_H_
22 #define OPENSYNC_ENGINE_PRIVATE_H_
25 OSYNC_ENGINE_SOLVE_DUPLICATE
,
26 OSYNC_ENGINE_SOLVE_CHOOSE
,
27 OSYNC_ENGINE_SOLVE_IGNORE
,
28 OSYNC_ENGINE_SOLVE_USE_LATEST
29 } OSyncEngineSolveType
;
31 typedef struct OSyncEngineCommand
{
33 OSyncMappingEngine
*mapping_engine
;
35 OSyncEngineSolveType solve_type
;
41 /** The opensync group **/
43 OSyncArchive
*archive
;
48 #ifdef OPENSYNC_UNITTESTS
50 #endif /* OPENSYNC_UNITTESTS */
51 OSyncFormatEnv
*formatenv
;
52 OSyncPluginEnv
*pluginenv
;
54 OSyncEngineState state
;
56 osync_conflict_cb conflict_callback
;
57 void *conflict_userdata
;
59 osync_status_change_cb changestat_callback
;
60 void *changestat_userdata
;
62 osync_status_member_cb mebstat_callback
;
63 void *mebstat_userdata
;
65 osync_status_engine_cb engstat_callback
;
66 void *engstat_userdata
;
68 osync_status_mapping_cb mapstat_callback
;
69 void *mapstat_userdata
;
71 //void *(* plgmsg_callback) (OSyncEngine *, OSyncClient *, const char *, void *, void *);
72 //void *plgmsg_userdata;
74 /** The g_main_loop of this engine **/
76 GMainContext
*context
;
78 GAsyncQueue
*command_queue
;
79 GSourceFuncs
*command_functions
;
80 GSource
*command_source
;
83 GMutex
* syncing_mutex
;
86 GMutex
* started_mutex
;
88 /** proxies contains a list of all OSyncClientProxy objects **/
91 /** object_engines contains a list of all OSyncObjEngine objects **/
92 GList
*object_engines
;
94 osync_bool man_dispatch
;
95 osync_bool allow_sync_alert
;
100 int proxy_disconnects
;
101 int proxy_get_changes
;
115 GHashTable
*internalFormats
;
116 GHashTable
*internalSchemas
;
117 /** converter_paths contains a hash of all OSyncFormatConverterPath objects **/
118 GHashTable
*converterPathes
;
121 #endif /* OPENSYNC_ENGINE_PRIVATE_H_ */