You can subscribe to this list here.
2005 |
Jan
|
Feb
|
Mar
(56) |
Apr
(109) |
May
(15) |
Jun
(3) |
Jul
(37) |
Aug
(96) |
Sep
(40) |
Oct
(4) |
Nov
(54) |
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
(47) |
Feb
(30) |
Mar
(102) |
Apr
(120) |
May
(68) |
Jun
(54) |
Jul
(53) |
Aug
(122) |
Sep
(190) |
Oct
(71) |
Nov
(85) |
Dec
(108) |
2007 |
Jan
(72) |
Feb
(190) |
Mar
(53) |
Apr
(101) |
May
(145) |
Jun
(148) |
Jul
(167) |
Aug
(143) |
Sep
(23) |
Oct
(198) |
Nov
(223) |
Dec
(195) |
2008 |
Jan
(100) |
Feb
(129) |
Mar
(79) |
Apr
(77) |
May
(34) |
Jun
(95) |
Jul
(112) |
Aug
(160) |
Sep
(82) |
Oct
(124) |
Nov
(199) |
Dec
(355) |
2009 |
Jan
(436) |
Feb
(89) |
Mar
(298) |
Apr
(189) |
May
(33) |
Jun
(88) |
Jul
(105) |
Aug
(44) |
Sep
(181) |
Oct
(87) |
Nov
(75) |
Dec
(1) |
2010 |
Jan
(63) |
Feb
(21) |
Mar
(3) |
Apr
(1) |
May
(1) |
Jun
(3) |
Jul
(26) |
Aug
(37) |
Sep
(26) |
Oct
(15) |
Nov
(13) |
Dec
|
From: <dg...@su...> - 2009-01-10 22:29:22
|
Author: dgollub Date: Sat Jan 10 23:00:32 2009 New Revision: 5076 URL: http://www.opensync.org/changeset/5076 Log: Drop file- and plain-format from OpenSync core repo. Deleted: trunk/formats/ Modified: trunk/CMakeLists.txt Modified: trunk/CMakeLists.txt ============================================================================== --- trunk/CMakeLists.txt Sat Jan 10 22:34:02 2009 (r5075) +++ trunk/CMakeLists.txt Sat Jan 10 23:00:32 2009 (r5076) @@ -82,7 +82,6 @@ # sub directories ADD_SUBDIRECTORY( opensync ) -ADD_SUBDIRECTORY( formats ) ADD_SUBDIRECTORY( tools ) ADD_SUBDIRECTORY( misc ) ADD_SUBDIRECTORY( cmake ) |
From: <dg...@su...> - 2009-01-10 22:25:59
|
Author: mkoller Date: Sat Jan 10 23:25:23 2009 New Revision: 5080 URL: http://www.opensync.org/changeset/5080 Log: adapt to new anchor API Modified: plugins/syncml/src/syncml_callbacks.c plugins/syncml/src/syncml_ds_client.c plugins/syncml/src/syncml_ds_server.c Modified: plugins/syncml/src/syncml_callbacks.c ============================================================================== --- plugins/syncml/src/syncml_callbacks.c Sat Jan 10 23:24:51 2009 (r5079) +++ plugins/syncml/src/syncml_callbacks.c Sat Jan 10 23:25:23 2009 (r5080) @@ -213,7 +213,11 @@ SmlError **error) { SmlPluginEnv *env = userdata; - return osync_anchor_retrieve(env->anchor_path, name); + OSyncObjTypeSink *sink = osync_plugin_info_get_sink(env->pluginInfo); + OSyncAnchor *anchor = osync_objtype_sink_get_anchor(sink); + OSyncError *oerror = NULL; + // TODO error handling + return osync_anchor_retrieve(anchor, &oerror); } SmlBool _set_anchor( @@ -224,8 +228,11 @@ SmlError **error) { SmlPluginEnv *env = userdata; - osync_anchor_update(env->anchor_path, name, value); - return TRUE; + OSyncObjTypeSink *sink = osync_plugin_info_get_sink(env->pluginInfo); + OSyncAnchor *anchor = osync_objtype_sink_get_anchor(sink); + OSyncError *oerror = NULL; + // TODO error handling + return osync_anchor_update(anchor, value, &oerror); } /* ************************************ */ Modified: plugins/syncml/src/syncml_ds_client.c ============================================================================== --- plugins/syncml/src/syncml_ds_client.c Sat Jan 10 23:24:51 2009 (r5079) +++ plugins/syncml/src/syncml_ds_client.c Sat Jan 10 23:25:23 2009 (r5080) @@ -30,6 +30,9 @@ functions.sync_done = sync_done; functions.batch_commit = ds_client_batch_commit; + // Request an anchor from the framework. + osync_objtype_sink_enable_anchor(sink, TRUE); + const char *objtype = osync_objtype_sink_get_name(sink); OSyncPluginResource *res = osync_plugin_config_find_active_resource(config, objtype); if (!(database = syncml_config_parse_database(env, res, oerror))) Modified: plugins/syncml/src/syncml_ds_server.c ============================================================================== --- plugins/syncml/src/syncml_ds_server.c Sat Jan 10 23:24:51 2009 (r5079) +++ plugins/syncml/src/syncml_ds_server.c Sat Jan 10 23:25:23 2009 (r5080) @@ -27,6 +27,9 @@ functions.sync_done = sync_done; functions.batch_commit = ds_server_batch_commit; + // Request an anchor from the framework. + osync_objtype_sink_enable_anchor(sink, TRUE); + const char *objtype = osync_objtype_sink_get_name(sink); OSyncPluginResource *res = osync_plugin_config_find_active_resource(config, objtype); if (!(database = syncml_config_parse_database(env, res, oerror))) |
From: <dg...@su...> - 2009-01-10 22:25:27
|
Author: dgollub Date: Sat Jan 10 23:24:51 2009 New Revision: 5079 URL: http://www.opensync.org/changeset/5079 Log: Clear format/plugin-env loading errors. Print at least a warning. Modified: trunk/tools/osyncplugin.c Modified: trunk/tools/osyncplugin.c ============================================================================== --- trunk/tools/osyncplugin.c Sat Jan 10 23:08:29 2009 (r5078) +++ trunk/tools/osyncplugin.c Sat Jan 10 23:24:51 2009 (r5079) @@ -348,9 +348,21 @@ if (!osync_format_env_load_plugins(format_env, formatpath, error)) goto error_free_formatenv; + if (osync_error_is_set(error)) { + fprintf(stderr, "WARNING! Some plugins couldn't get loaded in " + "format plugin environment: %s\n", osync_error_print(error)); + osync_error_unref(error); + } + if (!osync_plugin_env_load(plugin_env, pluginpath, error)) goto error_free_pluginenv; + if (osync_error_is_set(error)) { + fprintf(stderr, "WARNING! Some plugins couldn't get loaded in " + "plugin environment: %s\n", osync_error_print(error)); + osync_error_unref(error); + } + if (!(plugin = osync_plugin_env_find_plugin(plugin_env, pluginname))) { osync_error_set(error, OSYNC_ERROR_PLUGIN_NOT_FOUND, "Plugin not found: \"%s\"", pluginname); goto error_free_pluginenv; |
From: <dg...@su...> - 2009-01-10 22:12:45
|
Author: dgollub Date: Sat Jan 10 22:34:02 2009 New Revision: 5075 URL: http://www.opensync.org/changeset/5075 Log: Add file-/plain-format to build environment. Dropped config.h include, since there is no declaration inside file-format plugin which has influence on any conditional. Modified: plugins/file-sync/src/CMakeLists.txt plugins/file-sync/src/file.c Modified: plugins/file-sync/src/CMakeLists.txt ============================================================================== --- plugins/file-sync/src/CMakeLists.txt Sat Jan 10 22:31:15 2009 (r5074) +++ plugins/file-sync/src/CMakeLists.txt Sat Jan 10 22:34:02 2009 (r5075) @@ -3,9 +3,20 @@ OPENSYNC_PLUGIN_ADD( file-sync file_sync.c ) + +OPENSYNC_FORMAT_ADD( file file.c ) +OPENSYNC_FORMAT_ADD( plain plain.c ) + TARGET_LINK_LIBRARIES( file-sync ${OPENSYNC_LIBRARIES} ${GLIB2_LIBRARIES} ${LIBXML2_LIBRARIES} ) +TARGET_LINK_LIBRARIES( file ${OPENSYNC_LIBRARIES} ${GLIB2_LIBRARIES} ) +TARGET_LINK_LIBRARIES( plain ${OPENSYNC_LIBRARIES} ${GLIB2_LIBRARIES} ) + ###### INSTALL ################### OPENSYNC_PLUGIN_INSTALL( file-sync ) OPENSYNC_PLUGIN_CONFIG( file-sync ) + +OPENSYNC_FORMAT_INSTALL( file ) +OPENSYNC_FORMAT_INSTALL( plain ) + Modified: plugins/file-sync/src/file.c ============================================================================== --- plugins/file-sync/src/file.c Sat Jan 10 22:31:15 2009 (r5074) +++ plugins/file-sync/src/file.c Sat Jan 10 22:34:02 2009 (r5075) @@ -18,8 +18,6 @@ * */ -#include "config.h" - #include <string.h> #include <glib.h> |
From: <dg...@su...> - 2009-01-10 22:09:03
|
Author: dgollub Date: Sat Jan 10 23:08:29 2009 New Revision: 5078 URL: http://www.opensync.org/changeset/5078 Log: Use G_DIR_SEPERATOR to build a path in write/commit function. Fix compiler warning about wrong return value. Modified: plugins/file-sync/src/file_sync.c Modified: plugins/file-sync/src/file_sync.c ============================================================================== --- plugins/file-sync/src/file_sync.c Sat Jan 10 23:06:42 2009 (r5077) +++ plugins/file-sync/src/file_sync.c Sat Jan 10 23:08:29 2009 (r5078) @@ -178,13 +178,12 @@ unsigned int size = 0; char *filename = NULL, *tmp = NULL; - if (!(tmp = strdup(osync_change_get_uid(change)))) { - osync_trace(TRACE_EXIT_ERROR, "%s", __func__); - return; - } + if (!(tmp = strdup(osync_change_get_uid(change)))) + goto error; + filename_scape_characters(tmp); - filename = g_strdup_printf ("%s/%s", dir->path, tmp); + filename = g_strdup_printf ("%s%c%s", dir->path, G_DIR_SEPARATOR, tmp); free(tmp); switch (osync_change_get_changetype(change)) { |
From: <dg...@su...> - 2009-01-10 21:23:01
|
Author: dgollub Date: Sat Jan 10 22:22:25 2009 New Revision: 5072 URL: http://www.opensync.org/changeset/5072 Log: Drop xmlformat-doc plugin from OpenSync core. xmlformat-doc plugin got moved to xmlformat-plugin repo. Deleted: trunk/formats/xmlformat-doc.c Modified: trunk/formats/CMakeLists.txt Modified: trunk/formats/CMakeLists.txt ============================================================================== --- trunk/formats/CMakeLists.txt Sat Jan 10 22:21:38 2009 (r5071) +++ trunk/formats/CMakeLists.txt Sat Jan 10 22:22:25 2009 (r5072) @@ -5,17 +5,14 @@ OPENSYNC_FORMAT_ADD( file file.c ) OPENSYNC_FORMAT_ADD( plain plain.c ) -OPENSYNC_FORMAT_ADD( xmlformat-doc xmlformat-doc.c ) TARGET_LINK_LIBRARIES( file opensync ${GLIB2_LIBRARIES} ) TARGET_LINK_LIBRARIES( plain opensync ${GLIB2_LIBRARIES} ) -TARGET_LINK_LIBRARIES( xmlformat-doc opensync ${GLIB2_LIBRARIES} ) ###### INSTALL ############## OPENSYNC_FORMAT_INSTALL( file ) OPENSYNC_FORMAT_INSTALL( plain ) -OPENSYNC_FORMAT_INSTALL( xmlformat-doc ) INSTALL( FILES file.h DESTINATION ${OPENSYNC_INCLUDE_DIR}/opensync ) |
From: <dg...@su...> - 2009-01-10 21:22:15
|
Author: dgollub Date: Sat Jan 10 22:21:38 2009 New Revision: 5071 URL: http://www.opensync.org/changeset/5071 Log: Add xmlformat-doc to xmlformat-plugin build environment. Modified: format-plugins/xmlformat/trunk/src/CMakeLists.txt Modified: format-plugins/xmlformat/trunk/src/CMakeLists.txt ============================================================================== --- format-plugins/xmlformat/trunk/src/CMakeLists.txt Sat Jan 10 22:19:59 2009 (r5070) +++ format-plugins/xmlformat/trunk/src/CMakeLists.txt Sat Jan 10 22:21:38 2009 (r5071) @@ -2,8 +2,10 @@ INCLUDE_DIRECTORIES( ${CMAKE_BINARY_DIR} ${OPENSYNC_INCLUDE_DIRS} ${GLIB2_INCLUDE_DIRS} ) OPENSYNC_FORMAT_ADD( xmlformat xmlformat.c xmlformat_compare.c xmlformat_merge.c ) +OPENSYNC_FORMAT_ADD( xmlformat-doc xmlformat-doc.c ) TARGET_LINK_LIBRARIES( xmlformat ${OPENSYNC_LIBRARIES} ${GLIB2_LIBRARIES} ) +TARGET_LINK_LIBRARIES( xmlformat ${OPENSYNC_LIBRARIES} ${GLIB2_LIBRARIES} ) # Required for UNITTESTING only ADD_LIBRARY( xmlformat-static STATIC xmlformat_compare.c xmlformat.c xmlformat_merge.c ) @@ -11,4 +13,5 @@ ###### INSTALL ################### OPENSYNC_FORMAT_INSTALL( xmlformat ) +OPENSYNC_FORMAT_INSTALL( xmlformat-doc ) |
From: <dg...@su...> - 2009-01-10 21:20:36
|
Author: dgollub Date: Sat Jan 10 22:19:59 2009 New Revision: 5070 URL: http://www.opensync.org/changeset/5070 Log: Get a copy of xmlformat-doc plugin. Added: format-plugins/xmlformat/trunk/src/xmlformat-doc.c - copied unchanged from r5067, trunk/formats/xmlformat-doc.c Copied: format-plugins/xmlformat/trunk/src/xmlformat-doc.c (from r5067, trunk/formats/xmlformat-doc.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ format-plugins/xmlformat/trunk/src/xmlformat-doc.c Sat Jan 10 22:19:59 2009 (r5070, copy of r5067, trunk/formats/xmlformat-doc.c) @@ -0,0 +1,194 @@ +/* + * xmlformat-doc - serialised textual versions of the XML event formats, for external plugins + * Copyright (C) 2007 Andrew Baumann <an...@cs...> + * + * 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 + * + */ + +#include <stdio.h> +#include <string.h> + +#include <glib.h> +#include <libxml/tree.h> + +#include <opensync/opensync.h> +#include <opensync/opensync-xmlformat.h> +#include <opensync/opensync-format.h> + +static osync_bool detect_plain_as_xmlformat(const char *objtype, const char *data, int size) +{ + GString *string = NULL; + xmlDocPtr doc = NULL; + xmlNodePtr cur = NULL; + int ret = 0; + + osync_assert(objtype); + + string = g_string_new("<?xml version=\"*\"?>*"); + g_string_append(string, "<"); + g_string_append(string, objtype); + g_string_append(string, ">*"); + if (!g_pattern_match_simple(g_string_free(string, FALSE), data)) + return FALSE; + + + doc = xmlReadMemory(data, size, NULL, NULL, XML_PARSE_NOBLANKS); + if (!doc) + return FALSE; + + cur = xmlDocGetRootElement(doc); + if (!cur) + return FALSE; + + xmlStrcmp(BAD_CAST objtype, cur->name); + + if (ret) + return FALSE; + + + return TRUE; +} + +static osync_bool detect_plain_as_xmlformat_contact(const char *data, int size, void *userdata) +{ + return detect_plain_as_xmlformat("contact", data, size); +} + +static osync_bool detect_plain_as_xmlformat_event(const char *data, int size, void *userdata) +{ + return detect_plain_as_xmlformat("event", data, size); +} + +static osync_bool detect_plain_as_xmlformat_todo(const char *data, int size, void *userdata) +{ + return detect_plain_as_xmlformat("todo", data, size); +} + +static osync_bool detect_plain_as_xmlformat_note(const char *data, int size, void *userdata) +{ + return detect_plain_as_xmlformat("note", data, size); +} + +static osync_bool from_xml(char *input, unsigned int inpsize, char **output, unsigned int *outpsize, osync_bool *free_input, const char *config, void *userdata, OSyncError **error) +{ + *free_input = TRUE; + return osync_xmlformat_assemble((OSyncXMLFormat *)input, output, outpsize); +} + +static osync_bool to_xml(char *input, unsigned int inpsize, char **output, unsigned int *outpsize, osync_bool *free_input, const char *config, void *userdata, OSyncError **error) +{ + OSyncXMLFormat *ret = osync_xmlformat_parse(input, inpsize, error); + *free_input = TRUE; + if (!ret) + return FALSE; + *output = (char *)ret; + return TRUE; +} + +static void destroy(char *input, unsigned int inpsize, void *user_data) +{ + free(input); +} + +static osync_bool register_format(OSyncFormatEnv *env, const char *name, const char *objtype) +{ + OSyncError *error = NULL; + + OSyncObjFormat *format = osync_objformat_new(name, objtype, &error); + if (!format) { + osync_trace(TRACE_ERROR, "Unable to register format: %s", osync_error_print(&error)); + osync_error_unref(&error); + return FALSE; + } + + osync_objformat_set_destroy_func(format, destroy); + osync_format_env_register_objformat(env, format); + osync_objformat_unref(format); + + return TRUE; +} + +void get_format_info(OSyncFormatEnv *env) +{ + if (!register_format(env, "xmlformat-contact-doc", "contact")) + return; + + if (!register_format(env, "xmlformat-event-doc", "event")) + return; + + if (!register_format(env, "xmlformat-todo-doc", "todo")) + return; + + if (!register_format(env, "xmlformat-note-doc", "note")) + return; +} + +static osync_bool register_converter(OSyncFormatEnv *env, const char *fromname, const char *toname, OSyncFormatDetectFunc detect_func) +{ + OSyncFormatConverter *conv; + OSyncError *error = NULL; + + OSyncObjFormat *fromformat = osync_format_env_find_objformat(env, fromname); + OSyncObjFormat *toformat = osync_format_env_find_objformat(env, toname); + + if (!fromformat || !toformat) { + osync_trace(TRACE_ERROR, "Unable to register converter for %s->%s, format not found\n", fromname, toname); + return FALSE; + } + + /* Converters */ + conv = osync_converter_new(OSYNC_CONVERTER_CONV, fromformat, toformat, to_xml, &error); + if (!conv) { + osync_trace(TRACE_ERROR, "Unable to register converter: %s", osync_error_print(&error)); + osync_error_unref(&error); + return FALSE; + } + osync_format_env_register_converter(env, conv); + osync_converter_unref(conv); + + conv = osync_converter_new(OSYNC_CONVERTER_CONV, toformat, fromformat, from_xml, &error); + if (!conv) { + osync_trace(TRACE_ERROR, "Unable to register converter: %s", osync_error_print(&error)); + osync_error_unref(&error); + return FALSE; + } + osync_format_env_register_converter(env, conv); + osync_converter_unref(conv); + + return TRUE; +} + +osync_bool get_conversion_info(OSyncFormatEnv *env) +{ + if (!register_converter(env, "xmlformat-contact-doc", "xmlformat-contact", detect_plain_as_xmlformat_contact)) + return FALSE; + + if (!register_converter(env, "xmlformat-event-doc", "xmlformat-event", detect_plain_as_xmlformat_event)) + return FALSE; + + if (!register_converter(env, "xmlformat-todo-doc", "xmlformat-todo", detect_plain_as_xmlformat_todo)) + return FALSE; + + if (!register_converter(env, "xmlformat-note-doc", "xmlformat-note", detect_plain_as_xmlformat_note)) + return FALSE; + + return TRUE; +} + +int get_version(void) +{ + return 1; +} |
From: <dg...@su...> - 2009-01-10 21:04:55
|
Author: dgollub Date: Sat Jan 10 22:04:12 2009 New Revision: 5069 URL: http://www.opensync.org/changeset/5069 Log: Introduce engine event/command PREPARE_WRITE. This is a placeholder for conversion and merging changes. Modified: trunk/opensync/engine/opensync_engine.c trunk/opensync/engine/opensync_engine.h trunk/opensync/engine/opensync_engine_private.h trunk/opensync/engine/opensync_obj_engine.c trunk/tests/support.c trunk/tests/support.h Modified: trunk/opensync/engine/opensync_engine.c ============================================================================== --- trunk/opensync/engine/opensync_engine.c Sat Jan 10 17:53:57 2009 (r5068) +++ trunk/opensync/engine/opensync_engine.c Sat Jan 10 22:04:12 2009 (r5069) @@ -876,6 +876,28 @@ } } +static void _osync_engine_generate_prepared_map(OSyncEngine *engine) +{ + + if (osync_bitcount(engine->obj_errors | engine->obj_prepared_map) == g_list_length(engine->object_engines)) { + if (osync_bitcount(engine->obj_errors)) { + OSyncError *locerror = NULL; + osync_error_set(&locerror, OSYNC_ERROR_GENERIC, "At least one object engine failed while preparing for mapping the changes. Aborting"); + osync_trace(TRACE_ERROR, "%s", osync_error_print(&locerror)); + osync_engine_set_error(engine, locerror); + osync_status_update_engine(engine, OSYNC_ENGINE_EVENT_ERROR, locerror); + osync_engine_event(engine, OSYNC_ENGINE_EVENT_ERROR); + osync_error_unref(&locerror); + } else { + osync_status_update_engine(engine, OSYNC_ENGINE_EVENT_PREPARED_MAP, NULL); + + osync_engine_event(engine, OSYNC_ENGINE_EVENT_PREPARED_MAP); + } + } else + osync_trace(TRACE_INTERNAL, "Not yet: %i", osync_bitcount(engine->obj_errors | engine->obj_prepared_map)); + +} + static void _osync_engine_generate_mapped_event(OSyncEngine *engine) { @@ -1261,6 +1283,9 @@ case OSYNC_ENGINE_EVENT_READ: engine->obj_get_changes = engine->obj_get_changes | (0x1 << position); break; + case OSYNC_ENGINE_EVENT_PREPARED_MAP: + engine->obj_prepared_map = engine->obj_prepared_map | (0x1 << position); + break; case OSYNC_ENGINE_EVENT_MAPPED: engine->obj_mapped = engine->obj_mapped | (0x1 << position); break; @@ -1302,6 +1327,9 @@ case OSYNC_ENGINE_EVENT_READ: _osync_engine_generate_get_changes_event(engine); break; + case OSYNC_ENGINE_EVENT_PREPARED_MAP: + _osync_engine_generate_prepared_map(engine); + break; case OSYNC_ENGINE_EVENT_MAPPED: _osync_engine_generate_mapped_event(engine); break; @@ -1583,6 +1611,7 @@ break; case OSYNC_ENGINE_COMMAND_CONNECT_DONE: case OSYNC_ENGINE_COMMAND_READ: + case OSYNC_ENGINE_COMMAND_PREPARE_MAP: case OSYNC_ENGINE_COMMAND_MAP: break; case OSYNC_ENGINE_COMMAND_END_CONFLICTS: @@ -1724,6 +1753,15 @@ break; case OSYNC_ENGINE_EVENT_READ: + /* Now that we have read everything, we prepare for mapping the changes */ + for (o = engine->object_engines; o; o = o->next) { + OSyncObjEngine *objengine = o->data; + if (!osync_obj_engine_command(objengine, OSYNC_ENGINE_COMMAND_PREPARE_MAP, &locerror)) + goto error; + } + + break; + case OSYNC_ENGINE_EVENT_PREPARED_MAP: /* Now that we have read everything, we map the changes */ for (o = engine->object_engines; o; o = o->next) { OSyncObjEngine *objengine = o->data; @@ -2261,6 +2299,9 @@ case OSYNC_ENGINE_COMMAND_PREPARE_WRITE: cmdstr = "PREPARE_WRITE"; break; + case OSYNC_ENGINE_COMMAND_PREPARE_MAP: + cmdstr = "PREPARE_MAP"; + break; } return cmdstr; @@ -2310,6 +2351,9 @@ case OSYNC_ENGINE_EVENT_PREPARED_WRITE: eventstr = "PREPARE_WRITE"; break; + case OSYNC_ENGINE_EVENT_PREPARED_MAP: + eventstr = "PREPARE_MAP"; + break; } return eventstr; Modified: trunk/opensync/engine/opensync_engine.h ============================================================================== --- trunk/opensync/engine/opensync_engine.h Sat Jan 10 17:53:57 2009 (r5068) +++ trunk/opensync/engine/opensync_engine.h Sat Jan 10 22:04:12 2009 (r5069) @@ -73,8 +73,9 @@ /* Check if all conflicts got solved */ OSYNC_ENGINE_COMMAND_END_CONFLICTS, /* Prepare write to peers */ - OSYNC_ENGINE_COMMAND_PREPARE_WRITE - + OSYNC_ENGINE_COMMAND_PREPARE_WRITE, + /* Prepare mapping of changes */ + OSYNC_ENGINE_COMMAND_PREPARE_MAP } OSyncEngineCmd; @@ -132,8 +133,10 @@ OSYNC_ENGINE_EVENT_MAPPED, /** Multiplying of all reported changes is completed */ OSYNC_ENGINE_EVENT_MULTIPLIED, - /* Engine completed with preparing a write */ - OSYNC_ENGINE_EVENT_PREPARED_WRITE + /** Engine completed with preparing a write */ + OSYNC_ENGINE_EVENT_PREPARED_WRITE, + /** Engien completed with preparing for the mapping */ + OSYNC_ENGINE_EVENT_PREPARED_MAP } OSyncEngineEvent; typedef enum { Modified: trunk/opensync/engine/opensync_engine_private.h ============================================================================== --- trunk/opensync/engine/opensync_engine_private.h Sat Jan 10 17:53:57 2009 (r5068) +++ trunk/opensync/engine/opensync_engine_private.h Sat Jan 10 22:04:12 2009 (r5069) @@ -121,6 +121,7 @@ int obj_connect_done; int obj_disconnects; int obj_get_changes; + int obj_prepared_map; int obj_mapped; int obj_solved; int obj_multiplied; Modified: trunk/opensync/engine/opensync_obj_engine.c ============================================================================== --- trunk/opensync/engine/opensync_obj_engine.c Sat Jan 10 17:53:57 2009 (r5068) +++ trunk/opensync/engine/opensync_obj_engine.c Sat Jan 10 22:04:12 2009 (r5069) @@ -1001,6 +1001,12 @@ } break; + case OSYNC_ENGINE_COMMAND_PREPARE_MAP: + + /* TODO: PLACEHOLDER for conversion and merge */ + + osync_obj_engine_event(engine, OSYNC_ENGINE_EVENT_PREPARED_MAP, *error); + break; case OSYNC_ENGINE_COMMAND_MAP: /* We are now done reading the changes. so we can now start to create the mappings, conflicts etc */ if (osync_obj_engine_map_changes(engine, error)) { Modified: trunk/tests/support.c ============================================================================== --- trunk/tests/support.c Sat Jan 10 17:53:57 2009 (r5068) +++ trunk/tests/support.c Sat Jan 10 22:04:12 2009 (r5069) @@ -371,6 +371,10 @@ fail_unless(!osync_error_is_set(&(status->error)), NULL); num_engine_read++; break; + case OSYNC_ENGINE_EVENT_PREPARED_MAP: + fail_unless(!osync_error_is_set(&(status->error)), NULL); + num_engine_prepared_map++; + break; case OSYNC_ENGINE_EVENT_MAPPED: fail_unless(!osync_error_is_set(&(status->error)), NULL); num_engine_mapped++; @@ -584,6 +588,7 @@ num_engine_connected = 0; num_engine_read = 0; + num_engine_prepared_map = 0; num_engine_mapped = 0; num_engine_multiplied = 0; num_engine_written = 0; Modified: trunk/tests/support.h ============================================================================== --- trunk/tests/support.h Sat Jan 10 17:53:57 2009 (r5068) +++ trunk/tests/support.h Sat Jan 10 22:04:12 2009 (r5069) @@ -36,6 +36,7 @@ int num_engine_connected; int num_engine_connect_done; int num_engine_read; +int num_engine_prepared_map; int num_engine_mapped; int num_engine_multiplied; int num_engine_prepared_write; |
From: <dg...@su...> - 2009-01-10 16:54:35
|
Author: dgollub Date: Sat Jan 10 17:53:57 2009 New Revision: 5068 URL: http://www.opensync.org/changeset/5068 Log: Introduce engine command/event PREPARE_WRITE/PREPRED_WRITE. This engine command is intended to seperate the engine WRITE command from demerge and conversion tasks. Modified: trunk/opensync/engine/opensync_engine.c trunk/opensync/engine/opensync_engine.h trunk/opensync/engine/opensync_engine_private.h trunk/opensync/engine/opensync_obj_engine.c trunk/tests/support.c trunk/tests/support.h Modified: trunk/opensync/engine/opensync_engine.c ============================================================================== --- trunk/opensync/engine/opensync_engine.c Sat Jan 10 17:16:11 2009 (r5067) +++ trunk/opensync/engine/opensync_engine.c Sat Jan 10 17:53:57 2009 (r5068) @@ -1012,6 +1012,27 @@ } +static void _osync_engine_generate_prepared_write_event(OSyncEngine *engine) +{ + if (osync_bitcount(engine->obj_errors | engine->obj_prepared_write) == g_list_length(engine->object_engines)) { + if (osync_bitcount(engine->obj_errors)) { + OSyncError *locerror = NULL; + osync_error_set(&locerror, OSYNC_ERROR_GENERIC, "At least one object engine failed while preparing the write event. Aborting"); + osync_trace(TRACE_ERROR, "%s", osync_error_print(&locerror)); + osync_engine_set_error(engine, locerror); + osync_status_update_engine(engine, OSYNC_ENGINE_EVENT_ERROR, locerror); + osync_engine_event(engine, OSYNC_ENGINE_EVENT_ERROR); + //osync_error_unref(&locerror); + } else { + osync_status_update_engine(engine, OSYNC_ENGINE_EVENT_PREPARED_WRITE, NULL); + osync_engine_event(engine, OSYNC_ENGINE_EVENT_PREPARED_WRITE); + + } + } else + osync_trace(TRACE_INTERNAL, "Not yet: %i", osync_bitcount(engine->obj_errors | engine->obj_prepared_write)); + +} + static void _osync_engine_generate_written_event(OSyncEngine *engine) { if (osync_bitcount(engine->proxy_errors | engine->proxy_written) != g_list_length(engine->proxies)) @@ -1249,6 +1270,9 @@ case OSYNC_ENGINE_EVENT_MULTIPLIED: engine->obj_multiplied = engine->obj_multiplied | (0x1 << position); break; + case OSYNC_ENGINE_EVENT_PREPARED_WRITE: + engine->obj_prepared_write = engine->obj_prepared_write | (0x1 << position); + break; case OSYNC_ENGINE_EVENT_WRITTEN: engine->obj_written = engine->obj_written | (0x1 << position); break; @@ -1287,6 +1311,9 @@ case OSYNC_ENGINE_EVENT_MULTIPLIED: _osync_engine_generate_multiplied_event(engine); break; + case OSYNC_ENGINE_EVENT_PREPARED_WRITE: + _osync_engine_generate_prepared_write_event(engine); + break; case OSYNC_ENGINE_EVENT_WRITTEN: _osync_engine_generate_written_event(engine); break; @@ -1574,6 +1601,14 @@ goto error; } break; + case OSYNC_ENGINE_COMMAND_PREPARE_WRITE: + /* Now that we have multiplied the change, we prepare the write event. */ + for (o = engine->object_engines; o; o = o->next) { + OSyncObjEngine *objengine = o->data; + if (!osync_obj_engine_command(objengine, OSYNC_ENGINE_COMMAND_PREPARE_WRITE, &locerror)) + goto error; + } + break; case OSYNC_ENGINE_COMMAND_WRITE: case OSYNC_ENGINE_COMMAND_DISCONNECT: case OSYNC_ENGINE_COMMAND_SYNC_DONE: @@ -1714,6 +1749,15 @@ /* Now that we have multiplied the changes, we write the changes */ for (o = engine->object_engines; o; o = o->next) { OSyncObjEngine *objengine = o->data; + if (!osync_obj_engine_command(objengine, OSYNC_ENGINE_COMMAND_PREPARE_WRITE, &locerror)) + goto error; + } + + break; + case OSYNC_ENGINE_EVENT_PREPARED_WRITE: + /* Now that we have prepared the write event, we finally write the changes */ + for (o = engine->object_engines; o; o = o->next) { + OSyncObjEngine *objengine = o->data; if (!osync_obj_engine_command(objengine, OSYNC_ENGINE_COMMAND_WRITE, &locerror)) goto error; } @@ -1806,6 +1850,7 @@ engine->obj_mapped = 0; engine->obj_solved = 0; engine->obj_multiplied = 0; + engine->obj_prepared_write = 0; engine->obj_written = 0; engine->obj_sync_done = 0; @@ -2213,6 +2258,9 @@ case OSYNC_ENGINE_COMMAND_END_CONFLICTS: cmdstr = "END_CONFLICTS"; break; + case OSYNC_ENGINE_COMMAND_PREPARE_WRITE: + cmdstr = "PREPARE_WRITE"; + break; } return cmdstr; @@ -2259,6 +2307,9 @@ case OSYNC_ENGINE_EVENT_MULTIPLIED: eventstr = "MULTIPLIED"; break; + case OSYNC_ENGINE_EVENT_PREPARED_WRITE: + eventstr = "PREPARE_WRITE"; + break; } return eventstr; Modified: trunk/opensync/engine/opensync_engine.h ============================================================================== --- trunk/opensync/engine/opensync_engine.h Sat Jan 10 17:16:11 2009 (r5067) +++ trunk/opensync/engine/opensync_engine.h Sat Jan 10 17:53:57 2009 (r5068) @@ -71,7 +71,9 @@ /* Multiply all reported changes to all peers */ OSYNC_ENGINE_COMMAND_MULTIPLY, /* Check if all conflicts got solved */ - OSYNC_ENGINE_COMMAND_END_CONFLICTS + OSYNC_ENGINE_COMMAND_END_CONFLICTS, + /* Prepare write to peers */ + OSYNC_ENGINE_COMMAND_PREPARE_WRITE } OSyncEngineCmd; @@ -129,7 +131,9 @@ /** All reported records got mapped */ OSYNC_ENGINE_EVENT_MAPPED, /** Multiplying of all reported changes is completed */ - OSYNC_ENGINE_EVENT_MULTIPLIED + OSYNC_ENGINE_EVENT_MULTIPLIED, + /* Engine completed with preparing a write */ + OSYNC_ENGINE_EVENT_PREPARED_WRITE } OSyncEngineEvent; typedef enum { Modified: trunk/opensync/engine/opensync_engine_private.h ============================================================================== --- trunk/opensync/engine/opensync_engine_private.h Sat Jan 10 17:16:11 2009 (r5067) +++ trunk/opensync/engine/opensync_engine_private.h Sat Jan 10 17:53:57 2009 (r5068) @@ -124,6 +124,7 @@ int obj_mapped; int obj_solved; int obj_multiplied; + int obj_prepared_write; int obj_written; int obj_sync_done; Modified: trunk/opensync/engine/opensync_obj_engine.c ============================================================================== --- trunk/opensync/engine/opensync_obj_engine.c Sat Jan 10 17:16:11 2009 (r5067) +++ trunk/opensync/engine/opensync_obj_engine.c Sat Jan 10 17:53:57 2009 (r5068) @@ -1065,6 +1065,12 @@ osync_obj_engine_event(engine, OSYNC_ENGINE_EVENT_MULTIPLIED, *error); break; + case OSYNC_ENGINE_COMMAND_PREPARE_WRITE: + + /* TODO: PLACEHOLDER for demerge and conversion */ + + osync_obj_engine_event(engine, OSYNC_ENGINE_EVENT_PREPARED_WRITE, *error); + break; case OSYNC_ENGINE_COMMAND_WRITE: if (engine->conflicts) { osync_trace(TRACE_INTERNAL, "We still have conflict. Delaying write"); Modified: trunk/tests/support.c ============================================================================== --- trunk/tests/support.c Sat Jan 10 17:16:11 2009 (r5067) +++ trunk/tests/support.c Sat Jan 10 17:53:57 2009 (r5068) @@ -379,6 +379,10 @@ fail_unless(!osync_error_is_set(&(status->error)), NULL); num_engine_multiplied++; break; + case OSYNC_ENGINE_EVENT_PREPARED_WRITE: + fail_unless(!osync_error_is_set(&(status->error)), NULL); + num_engine_prepared_write++; + break; case OSYNC_ENGINE_EVENT_WRITTEN: fail_unless(!osync_error_is_set(&(status->error)), NULL); num_engine_written++; Modified: trunk/tests/support.h ============================================================================== --- trunk/tests/support.h Sat Jan 10 17:16:11 2009 (r5067) +++ trunk/tests/support.h Sat Jan 10 17:53:57 2009 (r5068) @@ -38,6 +38,7 @@ int num_engine_read; int num_engine_mapped; int num_engine_multiplied; +int num_engine_prepared_write; int num_engine_written; int num_engine_disconnected; int num_engine_errors; |
From: <dg...@su...> - 2009-01-10 16:16:51
|
Author: bricks Date: Sat Jan 10 17:16:11 2009 New Revision: 5067 URL: http://www.opensync.org/changeset/5067 Log: reverted r5049 because it passed the wrong data to the plugin discovery function Modified: trunk/docs/examples/plugins/ (props changed) trunk/docs/examples/plugins/src/simple_plugin.c (props changed) trunk/libopensync.pc.in (props changed) trunk/opensync/capabilities/ (props changed) trunk/opensync/capabilities/opensync-capabilities_internals.h (props changed) trunk/opensync/capabilities/opensync_capability_private.h (props changed) trunk/opensync/client/opensync_client.c trunk/opensync/common/opensync_error.c (props changed) trunk/opensync/common/opensync_error.h (props changed) trunk/opensync/common/opensync_error_private.h (props changed) trunk/opensync/common/opensync_list.c (props changed) trunk/opensync/common/opensync_list.h (props changed) trunk/opensync/common/opensync_marshal.c (props changed) trunk/opensync/common/opensync_marshal_private.h (props changed) trunk/opensync/common/opensync_xml.c (props changed) trunk/opensync/common/opensync_xml_internals.h (props changed) trunk/opensync/engine/opensync_engine_private.h (props changed) trunk/opensync/engine/opensync_status_internals.h (props changed) trunk/opensync/format/opensync_objformat_private.h (props changed) trunk/opensync/format/opensync_objformat_sink_private.h (props changed) trunk/opensync/group/opensync_updater_private.h (props changed) trunk/opensync/helper/opensync_anchor_internals.h (props changed) trunk/opensync/ipc/opensync_message_internals.h (props changed) trunk/opensync/ipc/opensync_message_private.h (props changed) trunk/opensync/ipc/opensync_queue_private.h (props changed) trunk/opensync/opensync-capabilities.h (props changed) trunk/opensync/plugin/opensync_context.c (props changed) trunk/opensync/plugin/opensync_context.h (props changed) trunk/opensync/plugin/opensync_context_private.h (props changed) trunk/opensync/plugin/opensync_objtype_sink.c (props changed) trunk/opensync/plugin/opensync_objtype_sink.h (props changed) trunk/opensync/plugin/opensync_objtype_sink_private.h (props changed) trunk/opensync/plugin/opensync_plugin.c trunk/opensync/plugin/opensync_plugin.h trunk/opensync/plugin/opensync_plugin_advancedoptions_private.h (props changed) trunk/opensync/plugin/opensync_plugin_authentication_private.h (props changed) trunk/opensync/plugin/opensync_plugin_config_private.h (props changed) trunk/opensync/plugin/opensync_plugin_connection_private.h (props changed) trunk/opensync/plugin/opensync_plugin_env_private.h (props changed) trunk/opensync/plugin/opensync_plugin_info_private.h (props changed) trunk/opensync/plugin/opensync_plugin_localization_private.h (props changed) trunk/opensync/plugin/opensync_plugin_private.h (props changed) trunk/opensync/plugin/opensync_plugin_resource.c (props changed) trunk/opensync/plugin/opensync_plugin_resource.h (props changed) trunk/opensync/plugin/opensync_plugin_resource_private.h (props changed) trunk/opensync/version/opensync_version_private.h (props changed) trunk/opensync/xmlformat/opensync_xmlfield.c (props changed) trunk/opensync/xmlformat/opensync_xmlfield.h (props changed) trunk/opensync/xmlformat/opensync_xmlfield_internals.h (props changed) trunk/opensync/xmlformat/opensync_xmlfield_private.h (props changed) trunk/opensync/xmlformat/opensync_xmlfieldlist.c (props changed) trunk/opensync/xmlformat/opensync_xmlfieldlist.h (props changed) trunk/opensync/xmlformat/opensync_xmlfieldlist_internals.h (props changed) trunk/opensync/xmlformat/opensync_xmlfieldlist_private.h (props changed) trunk/opensync/xmlformat/opensync_xmlformat.c (props changed) trunk/opensync/xmlformat/opensync_xmlformat.h (props changed) trunk/opensync/xmlformat/opensync_xmlformat_internals.h (props changed) trunk/opensync/xmlformat/opensync_xmlformat_private.h (props changed) trunk/opensync/xmlformat/opensync_xmlformat_schema_private.h (props changed) trunk/tests/capabilities-tests/ (props changed) trunk/tests/data/capabilities/ (props changed) trunk/wrapper/opensync-plugin.i Modified: trunk/opensync/client/opensync_client.c ============================================================================== --- trunk/opensync/client/opensync_client.c Sat Jan 10 15:01:54 2009 (r5066) +++ trunk/opensync/client/opensync_client.c Sat Jan 10 17:16:11 2009 (r5067) @@ -837,7 +837,7 @@ osync_trace(TRACE_ENTRY, "%s(%p, %p, %p)", __func__, client, message, error); - if (!osync_plugin_discover(client->plugin, client->plugin_info, error)) + if (!osync_plugin_discover(client->plugin, client->plugin_data, client->plugin_info, error)) goto error; reply = osync_message_new_reply(message, error); Modified: trunk/opensync/plugin/opensync_plugin.c ============================================================================== --- trunk/opensync/plugin/opensync_plugin.c Sat Jan 10 15:01:54 2009 (r5066) +++ trunk/opensync/plugin/opensync_plugin.c Sat Jan 10 17:16:11 2009 (r5067) @@ -179,13 +179,13 @@ plugin->finalize(data); } -osync_bool osync_plugin_discover(OSyncPlugin *plugin, OSyncPluginInfo *info, OSyncError **error) +osync_bool osync_plugin_discover(OSyncPlugin *plugin, void *data, OSyncPluginInfo *info, OSyncError **error) { osync_assert(plugin); if (!plugin->discover) return TRUE; - return plugin->discover(info, plugin->plugin_data, error); + return plugin->discover(info, data, error); } osync_bool osync_plugin_is_usable(OSyncPlugin *plugin, OSyncError **error) Modified: trunk/opensync/plugin/opensync_plugin.h ============================================================================== --- trunk/opensync/plugin/opensync_plugin.h Sat Jan 10 15:01:54 2009 (r5066) +++ trunk/opensync/plugin/opensync_plugin.h Sat Jan 10 17:16:11 2009 (r5067) @@ -282,15 +282,15 @@ */ OSYNC_EXPORT void osync_plugin_finalize(OSyncPlugin *plugin, void *data); -/** @brief Call plugin discovery. - * osync_plugin_discover passes the plugin_data to the discovery function of the plugin. +/** @brief Call plugin discovery * * @param plugin Pointer to the plugin + * @param data Pointer to userdata which got returned by plugin initialize function * @param info Pointer to OSyncPluginInfo which describes the plugin * @param error Pointer to error-struct * @return TRUE on success, FALSE otherwise */ -OSYNC_EXPORT osync_bool osync_plugin_discover(OSyncPlugin *plugin, OSyncPluginInfo *info, OSyncError **error); +OSYNC_EXPORT osync_bool osync_plugin_discover(OSyncPlugin *plugin, void *data, OSyncPluginInfo *info, OSyncError **error); /*@}*/ Modified: trunk/wrapper/opensync-plugin.i ============================================================================== --- trunk/wrapper/opensync-plugin.i Sat Jan 10 15:01:54 2009 (r5066) +++ trunk/wrapper/opensync-plugin.i Sat Jan 10 17:16:11 2009 (r5067) @@ -70,9 +70,9 @@ osync_plugin_finalize(self, data); } - void discover(PluginInfo *info, void *data) { + void discover(void *data, PluginInfo *info) { Error *err = NULL; - bool ret = osync_plugin_discover(self, info, &err); + bool ret = osync_plugin_discover(self, data, info, &err); if (!raise_exception_on_error(err) && !ret) wrapper_exception("osync_plugin_discover failed but did not set error code"); } |
From: <dg...@su...> - 2009-01-10 14:02:36
|
Author: bricks Date: Sat Jan 10 15:01:54 2009 New Revision: 5066 URL: http://www.opensync.org/changeset/5066 Log: fixed compiler warning of maybe uninitialized variables Modified: trunk/opensync/engine/opensync_obj_engine.c Modified: trunk/opensync/engine/opensync_obj_engine.c ============================================================================== --- trunk/opensync/engine/opensync_obj_engine.c Sat Jan 10 14:36:42 2009 (r5065) +++ trunk/opensync/engine/opensync_obj_engine.c Sat Jan 10 15:01:54 2009 (r5066) @@ -922,9 +922,10 @@ osync_assert(engine); + int write_sinks = 0; + osync_bool proxy_disconnect = FALSE; + switch (cmd) { - int write_sinks = 0; - osync_bool proxy_disconnect = FALSE; case OSYNC_ENGINE_COMMAND_CONNECT: for (p = engine->sink_engines; p; p = p->next) { sinkengine = p->data; |
From: <dg...@su...> - 2009-01-10 13:37:17
|
Author: bricks Date: Sat Jan 10 14:36:42 2009 New Revision: 5065 URL: http://www.opensync.org/changeset/5065 Log: changed identation to tabs Modified: plugins/evolution2/src/evolution2_sync.c Modified: plugins/evolution2/src/evolution2_sync.c ============================================================================== --- plugins/evolution2/src/evolution2_sync.c Fri Jan 9 15:41:26 2009 (r5064) +++ plugins/evolution2/src/evolution2_sync.c Sat Jan 10 14:36:42 2009 (r5065) @@ -231,7 +231,7 @@ if (!evo2_ecal_initialize(env, info, "note", "vjournal", error)) goto error_free_env; - + osync_trace(TRACE_EXIT, "%s: %p", __func__, env); return (void *)env; @@ -244,15 +244,15 @@ static void evo2_finalize(void *data) { - osync_trace(TRACE_ENTRY, "%s(%p)", __func__, data); - OSyncEvoEnv *env = data; + osync_trace(TRACE_ENTRY, "%s(%p)", __func__, data); + OSyncEvoEnv *env = (OSyncEvoEnv *)data; /* cleanup OpenSync stuff */ - if (env->pluginInfo) { - osync_plugin_info_unref(env->pluginInfo); - env->pluginInfo = NULL; - } - osync_trace(TRACE_INTERNAL, "%s - plugin info cleaned", __func__); + if (env->pluginInfo) { + osync_plugin_info_unref(env->pluginInfo); + env->pluginInfo = NULL; + } + osync_trace(TRACE_INTERNAL, "%s - plugin info cleaned", __func__); /* Final cleanup */ free_env(env); @@ -261,7 +261,7 @@ static char *evo2_determine_version() { - char *version = osync_strdup_printf("%i.%i.%i", eds_major_version, eds_minor_version, eds_micro_version); + char *version = osync_strdup_printf("%i.%i.%i", eds_major_version, eds_minor_version, eds_micro_version); return version; } @@ -274,13 +274,13 @@ OSyncEvoEnv *env = (OSyncEvoEnv *)data; - int i, numobjs = osync_plugin_info_num_objtypes(info); - for (i = 0; i < numobjs; i++) { - OSyncObjTypeSink *sink = osync_plugin_info_nth_objtype(info, i); - g_assert(sink); + int i, numobjs = osync_plugin_info_num_objtypes(info); + for (i = 0; i < numobjs; i++) { + OSyncObjTypeSink *sink = osync_plugin_info_nth_objtype(info, i); + osync_assert(sink); - osync_objtype_sink_set_available(sink, TRUE); - } + osync_objtype_sink_set_available(sink, TRUE); + } OSyncVersion *version = osync_version_new(error); osync_version_set_plugin(version, "Evolution"); |
From: <dg...@su...> - 2009-01-09 14:42:06
|
Author: henrik Date: Fri Jan 9 15:41:26 2009 New Revision: 5064 URL: http://www.opensync.org/changeset/5064 Log: Return FALSE (not NULL) on error Modified: plugins/mozilla-sync/trunk/src/mozilla-xpcom.cpp Modified: plugins/mozilla-sync/trunk/src/mozilla-xpcom.cpp ============================================================================== --- plugins/mozilla-sync/trunk/src/mozilla-xpcom.cpp Fri Jan 9 12:01:41 2009 (r5063) +++ plugins/mozilla-sync/trunk/src/mozilla-xpcom.cpp Fri Jan 9 15:41:26 2009 (r5064) @@ -136,7 +136,7 @@ #ifdef XPCOM_GLUE LOG(10, "Starting up XPCOMGlue"); rv = XPCOMGlueStartup(nsnull); - MOZ_ERROR_CHECK(rv, "XPCOMGlueStartup"); + MOZ_ERROR_CHECK_FALSE(rv, "XPCOMGlueStartup"); LOG(10, "XPCOMGlue started up"); #endif @@ -156,56 +156,56 @@ nsCString csGre; rv = NS_CStringSetData(csGre, szGreDirectory); - MOZ_ERROR_CHECK(rv, "NS_CStringSetData for szGreDirectory"); + MOZ_ERROR_CHECK_FALSE(rv, "NS_CStringSetData for szGreDirectory"); nsCOMPtr<nsILocalFile> localFileGreDir; rv = NS_NewNativeLocalFile(csGre, PR_TRUE, getter_AddRefs(localFileGreDir)); - MOZ_ERROR_CHECK(rv, "NS_NewNativeLocalFile for localFileGreDir"); + MOZ_ERROR_CHECK_FALSE(rv, "NS_NewNativeLocalFile for localFileGreDir"); nsString s; rv=localFileGreDir->GetPath(s); - MOZ_ERROR_CHECK(rv, "GetPath"); + MOZ_ERROR_CHECK_FALSE(rv, "GetPath"); LOG(10, "GRE path: [%s]", NS_ConvertUTF16toUTF8(s).get()); nsCString csProfileDir; rv = NS_CStringSetData(csProfileDir, szProfileDirectory); - MOZ_ERROR_CHECK(rv, "NS_CStringSetData for szProfileDirectory"); + MOZ_ERROR_CHECK_FALSE(rv, "NS_CStringSetData for szProfileDirectory"); nsCOMPtr<nsILocalFile> localFileProfile; rv = NS_NewNativeLocalFile(csProfileDir, PR_TRUE, getter_AddRefs(localFileProfile)); - MOZ_ERROR_CHECK(rv, "NS_NewNativeLocalFile (for SetProfileDir)"); + MOZ_ERROR_CHECK_FALSE(rv, "NS_NewNativeLocalFile (for SetProfileDir)"); LOG(10, "Creating nsProfileDirServiceProvider"); nsCOMPtr<nsProfileDirServiceProvider> dirServiceProvider; rv = NS_NewProfileDirServiceProvider(PR_TRUE, getter_AddRefs(dirServiceProvider)); - MOZ_ERROR_CHECK(rv, "NS_NewProfileDirServiceProvider"); + MOZ_ERROR_CHECK_FALSE(rv, "NS_NewProfileDirServiceProvider"); rv=dirServiceProvider->SetDirectories(localFileGreDir, localFileProfile); - MOZ_ERROR_CHECK(rv, "SetDirectories"); + MOZ_ERROR_CHECK_FALSE(rv, "SetDirectories"); LOG(10, "NS_InitXPCOM2"); nsCOMPtr<nsIServiceManager> servMan; rv = NS_InitXPCOM2(getter_AddRefs(servMan), localFileGreDir, dirServiceProvider); //rv = NS_InitXPCOM2(nsnull, nsnull, nsnull); - MOZ_ERROR_CHECK(rv, "NS_InitXPCOM2"); + MOZ_ERROR_CHECK_FALSE(rv, "NS_InitXPCOM2"); LOG(10, "XPCOM initialized"); LOG(10, "Registering GRE services"); nsCOMPtr<nsIComponentRegistrar> registrar = do_QueryInterface(servMan); - MOZ_ERROR_CHECK(rv, "do_QueryInterface for nsIComponentRegistrar"); + MOZ_ERROR_CHECK_FALSE(rv, "do_QueryInterface for nsIComponentRegistrar"); nsCString csGreComponents; rv = NS_CStringSetData(csGreComponents, g_strdup_printf("%s" G_DIR_SEPARATOR_S "%s", szGreDirectory, "components")); - MOZ_ERROR_CHECK(rv, "NS_CStringSetData for csGreComponents"); + MOZ_ERROR_CHECK_FALSE(rv, "NS_CStringSetData for csGreComponents"); nsCOMPtr<nsILocalFile> localFileGreComponents; rv = NS_NewNativeLocalFile(csGreComponents, PR_TRUE, getter_AddRefs(localFileGreComponents)); rv=registrar->AutoRegister(localFileGreComponents); - //MOZ_ERROR_CHECK(rv, "AutoRegister"); + //MOZ_ERROR_CHECK_FALSE(rv, "AutoRegister"); if (NS_FAILED(rv)) LOG(0, "AutoRegister failed. Continuing anyway..."); nsString ss; rv=localFileGreComponents->GetPath(ss); LOG(10, "GRE component path: [%s]", NS_ConvertUTF16toUTF8(ss).get()); - MOZ_ERROR_CHECK(rv, "NS_StringContainerInit"); + MOZ_ERROR_CHECK_FALSE(rv, "NS_StringContainerInit"); LOG(10, "GRE services registered"); @@ -216,15 +216,15 @@ nsProfileDirServiceProvider *dirServiceProvider = nsnull; //nsCOMPtr<nsProfileDirServiceProvider> dirServiceProvider = nsnull; rv = NS_NewProfileDirServiceProvider(PR_TRUE, &dirServiceProvider); - MOZ_ERROR_CHECK(rv, "NS_NewProfileDirServiceProvider"); + MOZ_ERROR_CHECK_FALSE(rv, "NS_NewProfileDirServiceProvider"); rv = dirServiceProvider->Register(); - MOZ_ERROR_CHECK(rv, "dirServiceProvider->Register"); + MOZ_ERROR_CHECK_FALSE(rv, "dirServiceProvider->Register"); nsILocalFile *localFileProfile; rv = NS_CStringSetData(csc, szProfileDirectory); rv = NS_NewNativeLocalFile(csc,PR_TRUE, &localFileProfile); - MOZ_ERROR_CHECK(rv, "NS_NewNativeLocalFile (for SetProfileDir)"); + MOZ_ERROR_CHECK_FALSE(rv, "NS_NewNativeLocalFile (for SetProfileDir)"); rv=dirServiceProvider->SetProfileDir(localFileProfile); - MOZ_ERROR_CHECK(rv, "SetProfileDir"); + MOZ_ERROR_CHECK_FALSE(rv, "SetProfileDir"); NS_CStringContainerFinish(csc); NS_StringContainerFinish(sc); LOG(10, "ProfileDirServiceProvider initialized"); @@ -248,13 +248,13 @@ LOG(10, "Shutting down XPCOM"); rv = NS_ShutdownXPCOM(nsnull); - MOZ_ERROR_CHECK(rv, "NS_ShutdownXPCOM("); + MOZ_ERROR_CHECK_FALSE(rv, "NS_ShutdownXPCOM("); LOG(10, "XPCOM shut down"); #ifdef XPCOM_GLUE LOG(10, "Shutting down XPCOMGlue"); rv = XPCOMGlueShutdown(); - MOZ_ERROR_CHECK(rv, "XPCOMGlueShutdown"); + MOZ_ERROR_CHECK_FALSE(rv, "XPCOMGlueShutdown"); LOG(10, "XPCOMGlue shut down"); #endif @@ -298,9 +298,9 @@ nsCOMPtr<nsIServiceManager> servMan; rv = NS_GetServiceManager(getter_AddRefs(servMan)); - MOZ_ERROR_CHECK(rv, "NS_GetServiceManager"); + MOZ_ERROR_CHECK_FALSE(rv, "NS_GetServiceManager"); nsCOMPtr<nsIComponentRegistrar> registrar = do_QueryInterface(servMan); - MOZ_ERROR_CHECK(rv, "do_QueryInterface for nsIComponentRegistrar"); + MOZ_ERROR_CHECK_FALSE(rv, "do_QueryInterface for nsIComponentRegistrar"); // We want the contract IDs sorted, so we put them in a GTree GTree *pGT=g_tree_new((gint (*)(const void*, const void*))strcmp); @@ -308,22 +308,22 @@ LOG(10, "Collecting Contract IDs"); nsCOMPtr<nsISimpleEnumerator> enumerator; rv=registrar->EnumerateContractIDs(getter_AddRefs(enumerator)); - MOZ_ERROR_CHECK(rv, "EnumerateContractIDs"); + MOZ_ERROR_CHECK_FALSE(rv, "EnumerateContractIDs"); PRBool f; nsCOMPtr<nsISupports> supp; rv=enumerator->HasMoreElements(&f); - MOZ_ERROR_CHECK(rv, "HasMoreElements"); + MOZ_ERROR_CHECK_FALSE(rv, "HasMoreElements"); while (f) { rv=enumerator->GetNext(getter_AddRefs(supp)); - MOZ_ERROR_CHECK(rv, "GetNextElement"); + MOZ_ERROR_CHECK_FALSE(rv, "GetNextElement"); nsCOMPtr<nsISupportsCString> cs = do_QueryInterface(supp); - MOZ_ERROR_CHECK(rv, "do_QueryInterface for nsISupportsID"); + MOZ_ERROR_CHECK_FALSE(rv, "do_QueryInterface for nsISupportsID"); char* s; rv=cs->ToString(&s); g_tree_insert(pGT, strdup(s), NULL); - MOZ_ERROR_CHECK(rv, "HasMoreElements"); + MOZ_ERROR_CHECK_FALSE(rv, "HasMoreElements"); rv=enumerator->HasMoreElements(&f); - MOZ_ERROR_CHECK(rv, "HasMoreElements"); + MOZ_ERROR_CHECK_FALSE(rv, "HasMoreElements"); } LOG(10, "The component registrar has %d components registred, here are the Contract IDs:", g_tree_nnodes(pGT)); |
From: <dg...@su...> - 2009-01-09 11:02:13
|
Author: henrik Date: Fri Jan 9 12:01:41 2009 New Revision: 5063 URL: http://www.opensync.org/changeset/5063 Log: Added include for compilation on FreeBSD Modified: plugins/mozilla-sync/trunk/src/mozilla-sync-utils.h plugins/mozilla-sync/trunk/src/mozilla-sync.cpp Modified: plugins/mozilla-sync/trunk/src/mozilla-sync-utils.h ============================================================================== --- plugins/mozilla-sync/trunk/src/mozilla-sync-utils.h Fri Jan 9 11:59:51 2009 (r5062) +++ plugins/mozilla-sync/trunk/src/mozilla-sync-utils.h Fri Jan 9 12:01:41 2009 (r5063) @@ -27,6 +27,14 @@ ================================================================ */ + +// On FreeBSD we need libgen to define "basename" which is used in LOG + +#if defined(__FreeBSD__) +#include <libgen.h> +#endif + + /** Log a message using the @c pLogFunction passed **/ #define LOG(level, message ...) pLogFunction(level, false, basename(__FILE__), __LINE__, __func__, message); Modified: plugins/mozilla-sync/trunk/src/mozilla-sync.cpp ============================================================================== --- plugins/mozilla-sync/trunk/src/mozilla-sync.cpp Fri Jan 9 11:59:51 2009 (r5062) +++ plugins/mozilla-sync/trunk/src/mozilla-sync.cpp Fri Jan 9 12:01:41 2009 (r5063) @@ -84,6 +84,12 @@ #include "mozilla-sync.h" +// On FreeBSD we need libgen to define "basename" which is used in LOG +#if defined(__FreeBSD__) +#include <libgen.h> +#endif + + #define LOGLEVEL 10000 /** Log a message using the @c pLogFunction passed **/ |
From: <dg...@su...> - 2009-01-09 11:00:24
|
Author: henrik Date: Fri Jan 9 11:59:51 2009 New Revision: 5062 URL: http://www.opensync.org/changeset/5062 Log: Small change to match the updated FindThunderbirdXpcom.cmake which now sets XPCOM_LIBRARIES Modified: plugins/mozilla-sync/trunk/CMakeLists.txt Modified: plugins/mozilla-sync/trunk/CMakeLists.txt ============================================================================== --- plugins/mozilla-sync/trunk/CMakeLists.txt Fri Jan 9 11:47:55 2009 (r5061) +++ plugins/mozilla-sync/trunk/CMakeLists.txt Fri Jan 9 11:59:51 2009 (r5062) @@ -54,7 +54,7 @@ ADD_DEFINITIONS( -DXPCOM_GLUE ) SET( XPCOM_LIBRARIES /home/henrik/my/software/gecko-sdk/lib/libxpcomglue.a ) ELSE (XPCOM_GLUE) - SET( XPCOM_LIBRARIES ${LIBTBXPCOM_XPCOM} ) +# SET( XPCOM_LIBRARIES ${LIBTBXPCOM_XPCOM} ) ENDIF (XPCOM_GLUE) INCLUDE( OpenSyncInternal ) |
From: <dg...@su...> - 2009-01-09 10:48:31
|
Author: henrik Date: Fri Jan 9 11:47:55 2009 New Revision: 5061 URL: http://www.opensync.org/changeset/5061 Log: Look for Thunderbird and Sunbird files in usual paths. Useful if Thunderbird/Sunbird was not installed from packages Modified: branches/3rd-party-cmake-modules/modules/FindThunderbirdXpcom.cmake Modified: branches/3rd-party-cmake-modules/modules/FindThunderbirdXpcom.cmake ============================================================================== --- branches/3rd-party-cmake-modules/modules/FindThunderbirdXpcom.cmake Fri Jan 9 11:36:29 2009 (r5060) +++ branches/3rd-party-cmake-modules/modules/FindThunderbirdXpcom.cmake Fri Jan 9 11:47:55 2009 (r5061) @@ -4,166 +4,167 @@ # $Id$ # ====================================================== -# ---------- First we look for thunderbird -PKG_SEARCH_MODULE(THUNDERBIRDXPCOM REQUIRED thunderbird-xpcom icedove-xpcom ) - -# ---------- If we found thunderbird all is fine, set the required directories -IF( THUNDERBIRDXPCOM_FOUND ) - - MESSAGE( STATUS "THUNDERBIRDXPCOM_INCLUDE_DIRS ${THUNDERBIRDXPCOM_INCLUDE_DIRS}" ) - - MESSAGE( STATUS "-- Found thunderbird-xpcom" ) - #If we found the thunderbird package, look for one of the includes, just to be sure - FIND_PATH(_LIBTBXPCOM_INCLUDE_DIR mozilla-config.h - PATHS ${THUNDERBIRDXPCOM_INCLUDE_DIRS} ) - IF( NOT _LIBTBXPCOM_INCLUDE_DIR ) - MESSAGE( FATAL_ERROR "Found thunderbird-xpcom, but not mozilla-config.h" ) - ENDIF ( NOT _LIBTBXPCOM_INCLUDE_DIR ) - - SET( XPCOM_INCLUDE_DIRS - ${_LIBTBXPCOM_INCLUDE_DIR} - ${_LIBTBXPCOM_INCLUDE_DIR}/xpcom - ${_LIBTBXPCOM_INCLUDE_DIR}/nspr - ${_LIBTBXPCOM_INCLUDE_DIR}/necko - ${_LIBTBXPCOM_INCLUDE_DIR}/rdf - ${_LIBTBXPCOM_INCLUDE_DIR}/string - ${_LIBTBXPCOM_INCLUDE_DIR}/addrbook - ${_LIBTBXPCOM_INCLUDE_DIR}/js - ${_LIBTBXPCOM_INCLUDE_DIR}/xpcom_obsolete - ${_LIBTBXPCOM_INCLUDE_DIR}/xulapp - ${_LIBTBXPCOM_INCLUDE_DIR}/extensions - ${THUNDERBIRDXPCOM_INCLUDE_DIRS} +# The purpose of this CMake file is to find Thunderbird and Sunbird files. +# At the end, we whould have the following variables set: +# XPCOM_INCLUDE_DIRS +# XPCOM_LIBRARY_DIRS +# XPCOM_LIBRARIES +# SUNBIRD_VERSION + +# First we look for a Thunderbird package +PKG_SEARCH_MODULE ( THUNDERBIRD_XPCOM thunderbird-xpcom icedove-xpcom ) + +IF ( THUNDERBIRD_XPCOM_FOUND ) + + # If we found the Thunderbird package, look for one of the includes, just to be sure + FIND_PATH ( THUNDERBIRD_XPCOM_MAIN_INCLUDE_DIR mozilla-config.h + PATHS ${THUNDERBIRD_XPCOM_INCLUDE_DIRS} ) + IF( NOT THUNDERBIRD_XPCOM_MAIN_INCLUDE_DIR ) + MESSAGE ( FATAL_ERROR "*** *** Found Thunderbird package, but not mozilla-config.h" ) + ENDIF ( NOT THUNDERBIRD_XPCOM_MAIN_INCLUDE_DIR ) + # We also need NSPR, so let's make sure it is there + FIND_PATH ( NSPR_MAIN_INCLUDE_DIR nspr.h + PATHS ${THUNDERBIRD_XPCOM_INCLUDE_DIRS} ) + IF( NOT NSPR_MAIN_INCLUDE_DIR ) + MESSAGE ( FATAL_ERROR "*** *** Found Thunderbird package, but not nspr.h" ) + ENDIF ( NOT NSPR_MAIN_INCLUDE_DIR ) + +ELSE( THUNDERBIRD_XPCOM_FOUND ) + + # We did not find a Thunderbird package, so let us look for the files manually + MESSAGE ( STATUS " did not find thunderbird package; now looking for thunderbird files" ) + FIND_PATH (THUNDERBIRD_XPCOM_MAIN_INCLUDE_DIR mozilla-config.h + PATH_SUFFIXES thunderbird icedove + PATHS + /opt/local/include/ + /sw/include/ + /usr/local/include/ + /usr/include/ ) - # xpcom_obsolete is needed because nsIABDirectory pulls in nsFileSpec.h - # However, in thunderbird-addressbook.cpp we define _FILESPEC_H_ - # so we avoid any dependencies on obsolete - # Hope mozilla gets this fixed ASAP. - - SET( _LIBDIRS ${THUNDERBIRDXPCOM_LIBRARY_DIRS} ) - -# ---------- If we did *NOT* find thunderbird, we must look for xulrunner and nspr (for openSUSE) -ELSE( THUNDERBIRDXPCOM_FOUND ) - - # If we did not find thunderbird package, let's try xulrunner. - # This is needed on OpenSUSE, where there is no thunderbird-devel package - PKGCONFIG( xulrunner-xpcom - _LIBXULRUNNERIncDir _LIBXULRUNNERLinkDir _LIBXULRUNNERLinkFlags _LIBXULRUNNERCflags ) - IF( NOT _LIBXULRUNNERIncDir ) - MESSAGE( FATAL_ERROR "Did not find thunderbird-xpcom, nor xulrunner-xpcom" ) - ENDIF( NOT _LIBXULRUNNERIncDir ) - - FIND_PATH( _LIBXULRUNNER_INCLUDE_DIR nsXPCOM.h - PATHS ${_LIBXULRUNNERIncDir} ) - IF( NOT _LIBXULRUNNER_INCLUDE_DIR ) - MESSAGE( FATAL_ERROR "Found xulrunner-xpcom, but not nsXPCOM.h" ) - ENDIF( NOT _LIBXULRUNNER_INCLUDE_DIR ) - - # xulrunner-xpcom also needs nspr - PKGCONFIG( nspr - _LIBSNPRIncDir _LIBSNPRLinkDir _LIBSNPRLinkFlags _LIBSNPRCflags ) - IF( NOT _LIBSNPRIncDir ) - MESSAGE( FATAL_ERROR "Found xulrunner-xpcom, but not nspr" ) - ENDIF( NOT _LIBSNPRIncDir ) - - FIND_PATH( _LIBSNPR_INCLUDE_DIR prtypes.h - PATHS ${_LIBSNPRIncDir} ) - IF( NOT _LIBSNPR_INCLUDE_DIR ) - MESSAGE( FATAL_ERROR "Found nspr, but not prtypes.h" ) - ENDIF( NOT _LIBSNPR_INCLUDE_DIR ) - - FIND_PATH( _TB_AB_INCLUDE_DIR nsIAbDirectory.h - PATHS "/usr/src/debug/mozilla/dist/include/addrbook" ) - IF( NOT _TB_AB_INCLUDE_DIR ) - MESSAGE( FATAL_ERROR "Found xulrunner-xpcom and nspr, but not the thunderbird headers" ) - ENDIF( NOT _TB_AB_INCLUDE_DIR ) - - SET( XPCOM_INCLUDE_DIRS - ${_LIBXULRUNNER_INCLUDE_DIR} - ${_LIBXULRUNNER_INCLUDE_DIR}/xpcom - ${_LIBSNPR_INCLUDE_DIR} - ${_LIBXULRUNNER_INCLUDE_DIR}/rdf - ${_LIBXULRUNNER_INCLUDE_DIR}/string - ${_TB_AB_INCLUDE_DIR} - ${_LIBXULRUNNER_INCLUDE_DIR}/xpcom_obsolete + IF ( NOT THUNDERBIRD_XPCOM_MAIN_INCLUDE_DIR ) + MESSAGE ( FATAL_ERROR "*** *** Did not find Thunderbird include directory with mozilla-config.h" ) + ENDIF ( NOT THUNDERBIRD_XPCOM_MAIN_INCLUDE_DIR ) + FIND_PATH ( NSPR_MAIN_INCLUDE_DIR nspr.h + PATH_SUFFIXES nspr nspr4 + PATHS + /opt/local/include/ + /sw/include/ + /usr/local/include/ + /usr/include/ ) - - SET( _LIBDIRS ${THUNDERBIRDXPCOM_LIBRARY_DIRS} ) - -ENDIF( THUNDERBIRDXPCOM_FOUND ) - -#SET( EXTRA_INC_PATHS "/usr/src/debug/mozilla/dist/include/xpcom" PATH ) - -MESSAGE( STATUS "XPCOM_INCLUDE_DIRS ${XPCOM_INCLUDE_DIRS}" ) - -FIND_PATH(THUNDERBIRD_EXTENSION_DIR extensions - PATHS ${_LIBDIRS} ) - -MESSAGE( STATUS "THUNDERBIRD_EXTENSION_DIR ${THUNDERBIRD_EXTENSION_DIR}" ) - -# ---------- Find the xpcom library, and make sure it is not under xulrunner -FIND_LIBRARY( LIBTBXPCOM_XPCOM - NAMES xpcom - PATHS ${_LIBDIRS} ENV LD_LIBRARY_PATH ) -IF( NOT LIBTBXPCOM_XPCOM ) - MESSAGE( FATAL_ERROR "Could not find xpcom library" ) -ENDIF( NOT LIBTBXPCOM_XPCOM ) - -STRING(REGEX MATCH ".*xulrunner.*" _XULRUNNER ${LIBTBXPCOM_XPCOM}) -IF( _XULRUNNER ) - MESSAGE( FATAL_ERROR - "Found xpcom library under xulrunner; should have been under thunderbird. Check LD_LIBRARY_PATH" ) -ENDIF( _XULRUNNER ) - - -# ---------- GRE_DIR needed just to put it into the test scripts -GET_FILENAME_COMPONENT(GRE_DIR ${LIBTBXPCOM_XPCOM} PATH) -MESSAGE( STATUS "GRE_DIR ${GRE_DIR}" ) - - -# ---------- Ensure we found NSPR library -FIND_LIBRARY( LIBTBXPCOM_NSPR4 - NAMES nspr4 - PATHS ${_LIBDIRS} ENV LD_LIBRARY_PATH ) -IF( NOT LIBTBXPCOM_NSPR4 ) - MESSAGE( FATAL_ERROR "Could not find nspr library" ) -ENDIF( NOT LIBTBXPCOM_NSPR4 ) - - - -# ---------- Find sunbird include directory - -PKG_SEARCH_MODULE( SUNBIRD REQUIRED sunbird-xpcom iceowl-xpcom ) - -IF( SUNBIRD_FOUND ) - MESSAGE( "-- Found sunbird" ) - MESSAGE( "SUNBIRD_INCLUDE_DIRS ${SUNBIRD_INCLUDE_DIRS}" ) - + IF( NOT NSPR_MAIN_INCLUDE_DIR ) + MESSAGE ( FATAL_ERROR "*** *** Found Thunderbird include directory, but not nspr.h" ) + ENDIF ( NOT NSPR_MAIN_INCLUDE_DIR ) + # Usually all the libraries are in one directory, so let us try to find it + FIND_LIBRARY ( _xpcom_lib NAMES xpcom libxpcom + PATH_SUFFIXES thunderbird icedove + PATHS + /opt/local/lib + /sw/lib + /usr/lib + /usr/local/lib + /usr/lib64 + /usr/local/lib64 + /opt/lib64 + ) + IF ( NOT _xpcom_lib ) + MESSAGE ( FATAL_ERROR "*** *** Found Thunderbird, but not the xpcom library" ) + ENDIF ( NOT _xpcom_lib ) + # We got the actual library, but we need the directory + GET_FILENAME_COMPONENT ( THUNDERBIRD_XPCOM_LIBRARY_DIRS "${_xpcom_lib}" PATH ) + # Usually the only library we need is the xpcom + SET ( THUNDERBIRD_XPCOM_LIBRARIES "xpcom" ) + +ENDIF( THUNDERBIRD_XPCOM_FOUND ) + +# So, by now we should have the following variables set: +MESSAGE ( STATUS " THUNDERBIRD_XPCOM_MAIN_INCLUDE_DIR ${THUNDERBIRD_XPCOM_MAIN_INCLUDE_DIR}" ) +MESSAGE ( STATUS " NSPR_MAIN_INCLUDE_DIR ${NSPR_MAIN_INCLUDE_DIR}" ) +MESSAGE ( STATUS " THUNDERBIRD_XPCOM_LIBRARY_DIRS ${THUNDERBIRD_XPCOM_LIBRARY_DIRS}" ) +MESSAGE ( STATUS " THUNDERBIRD_XPCOM_LIBRARIES ${THUNDERBIRD_XPCOM_LIBRARIES}" ) + +# Those are the include directories we actually need +SET ( XPCOM_INCLUDE_DIRS + ${NSPR_MAIN_INCLUDE_DIR} + ${THUNDERBIRD_XPCOM_MAIN_INCLUDE_DIR} + ${THUNDERBIRD_XPCOM_MAIN_INCLUDE_DIR}/addrbook + ${THUNDERBIRD_XPCOM_MAIN_INCLUDE_DIR}/extensions + ${THUNDERBIRD_XPCOM_MAIN_INCLUDE_DIR}/rdf + ${THUNDERBIRD_XPCOM_MAIN_INCLUDE_DIR}/string + ${THUNDERBIRD_XPCOM_MAIN_INCLUDE_DIR}/xpcom_obsolete + ${THUNDERBIRD_XPCOM_MAIN_INCLUDE_DIR}/xpcom + ${THUNDERBIRD_XPCOM_MAIN_INCLUDE_DIR}/xulapp +) + + +# Now look for a Subird package +PKG_SEARCH_MODULE ( SUNBIRD sunbird-xpcom iceowl-xpcom ) + +IF ( SUNBIRD_FOUND ) + # If we found the Thunderbird package, let us try to find the main include dir + MESSAGE ( " SUNBIRD_INCLUDE_DIRS ${SUNBIRD_INCLUDE_DIRS}" ) # ---------- We just need the first directory, which should be the main directory # The rest will point to xpcom and friends; and we do not want that. # But, let's also handle the special case of only one direcory reported, just in case - - STRING(REGEX MATCH ";" _SEVERAL_INCLUDE_DIRS "${SUNBIRD_INCLUDE_DIRS}" ) - IF( _SEVERAL_INCLUDE_DIRS ) - MESSAGE( "SEVERAL") - STRING(REGEX REPLACE "([^;]*);.*" "\\1" SUNBIRD_MAIN_INCLUDE_DIR "${SUNBIRD_INCLUDE_DIRS}" ) - ELSE( _SEVERAL_INCLUDE_DIRS ) - SET( SUNBIRD_MAIN_INCLUDE_DIR "${SUNBIRD_INCLUDE_DIRS}" ) - ENDIF( _SEVERAL_INCLUDE_DIRS ) - #MESSAGE( "SUNBIRD_MAIN_INCLUDE_DIR ${SUNBIRD_MAIN_INCLUDE_DIR}" ) - - FIND_FILE(_SUNBIRD_CALENDAR calbase/calICalendar.h ${SUNBIRD_MAIN_INCLUDE_DIR} ) - IF( NOT _SUNBIRD_CALENDAR ) - MESSAGE( FATAL_ERROR "Found sunbird, but not calICalendar.h" ) - ENDIF ( NOT _SUNBIRD_CALENDAR ) - - - SET ( XPCOM_INCLUDE_DIRS "${XPCOM_INCLUDE_DIRS};${SUNBIRD_MAIN_INCLUDE_DIR}" ) - MESSAGE( "XPCOM_INCLUDE_DIRS ${XPCOM_INCLUDE_DIRS}" ) + STRING ( REGEX MATCH ";" _SEVERAL_INCLUDE_DIRS "${SUNBIRD_INCLUDE_DIRS}" ) + IF ( _SEVERAL_INCLUDE_DIRS ) + MESSAGE ( "SEVERAL") + STRING ( REGEX REPLACE "([^;]*);.*" "\\1" SUNBIRD_MAIN_INCLUDE_DIR "${SUNBIRD_INCLUDE_DIRS}" ) + ELSE ( _SEVERAL_INCLUDE_DIRS ) + SET ( SUNBIRD_MAIN_INCLUDE_DIR "${SUNBIRD_INCLUDE_DIRS}" ) + ENDIF ( _SEVERAL_INCLUDE_DIRS ) ELSE( SUNBIRD_FOUND ) - MESSAGE( FATAL_ERROR "Could not find sunbird library" ) -ENDIF( SUNBIRD_FOUND ) - -MESSAGE ( STATUS "SUNBIRD_VERSION [${SUNBIRD_VERSION}]" ) - -MARK_AS_ADVANCED( THUNDERBIRDXPCOM_INCLUDE_DIRS THUNDERBIRDXPCOM_LIBRARIES ) + # We did not find a Sunbird package, so let us look for the files manually + MESSAGE ( STATUS " did not find sunbird package; now looking for sunbird files" ) + FIND_PATH ( SUNBIRD_MAIN_INCLUDE_DIR calbase/calIICSService.h + PATH_SUFFIXES sunbird iceowl + PATHS + /opt/local/include/ + /sw/include/ + /usr/local/include/ + /usr/include/ + ) + IF ( NOT SUNBIRD_MAIN_INCLUDE_DIR ) + MESSAGE ( FATAL_ERROR "*** *** Did not find Sunbird include directory with mozilla-config.h" ) + ENDIF ( NOT SUNBIRD_MAIN_INCLUDE_DIR ) + + # We need the Sunbird version number + EXEC_PROGRAM ( sunbird ARGS "--version" + OUTPUT_VARIABLE _SUNBIRD_VERSION + RETURN_VALUE _SUNBIRD_VERSION_RET ) + IF ( _SUNBIRD_VERSION_RET ) + + EXEC_PROGRAM ( iceowl ARGS "--version" + OUTPUT_VARIABLE _SUNBIRD_VERSION + RETURN_VALUE _ICEOWL_VERSION_RET ) + IF ( _ICEOWL_VERSION_RET ) + MESSAGE ( FATAL_ERROR "*** *** Unable execute sunbird/iceowl to get its version" ) + ENDIF ( _ICEOWL_VERSION_RET ) + ENDIF ( _SUNBIRD_VERSION_RET ) + + STRING ( REGEX MATCH ".*([0-9]\\.[0-9]).*" _SUNBIRD_VERSION_OK "${_SUNBIRD_VERSION}" ) + IF ( _SUNBIRD_VERSION_OK ) + STRING ( REGEX REPLACE ".*([0-9]\\.[0-9]).*" "\\1" SUNBIRD_VERSION "${_SUNBIRD_VERSION}" ) + ELSE ( _SUNBIRD_VERSION_OK ) + MESSAGE ( STATUS "sunbird --version returned ${_SUNBIRD_VERSION}" ) + MESSAGE ( FATAL_ERROR "*** *** Unable to interpret sunbird --version" ) + ENDIF ( _SUNBIRD_VERSION_OK ) + +ENDIF ( SUNBIRD_FOUND ) + +# So, by now we should have the following variables set: +MESSAGE ( STATUS " SUNBIRD_MAIN_INCLUDE_DIR ${SUNBIRD_MAIN_INCLUDE_DIR}" ) +MESSAGE ( STATUS " SUNBIRD_VERSION ${SUNBIRD_VERSION}" ) + +# Set the final output variables +SET ( XPCOM_INCLUDE_DIRS "${XPCOM_INCLUDE_DIRS};${SUNBIRD_MAIN_INCLUDE_DIR}" ) +SET ( XPCOM_LIBRARY_DIRS "${THUNDERBIRD_XPCOM_LIBRARY_DIRS}" ) +SET ( XPCOM_LIBRARIES "${THUNDERBIRD_XPCOM_LIBRARIES}" ) + +# And here is what we found out: +MESSAGE ( STATUS "Found xpcom (thunderbird and sunbird):" ) +MESSAGE ( STATUS " XPCOM_INCLUDE_DIRS ${XPCOM_INCLUDE_DIRS}" ) +MESSAGE ( STATUS " XPCOM_LIBRARY_DIRS ${XPCOM_LIBRARY_DIRS}" ) +MESSAGE ( STATUS " XPCOM_LIBRARIES ${XPCOM_LIBRARIES}" ) +MESSAGE ( STATUS " SUNBIRD_VERSION ${SUNBIRD_VERSION}" ) |
From: <dg...@su...> - 2009-01-09 10:37:08
|
Author: henrik Date: Fri Jan 9 11:36:29 2009 New Revision: 5060 URL: http://www.opensync.org/changeset/5060 Log: make tests work on FreeBSD Modified: plugins/mozilla-sync/trunk/tests/CMakeLists.txt plugins/mozilla-sync/trunk/tests/blackbox_test_abook_fmod.sh plugins/mozilla-sync/trunk/tests/blackbox_test_cal_fmod.sh plugins/mozilla-sync/trunk/tests/blackbox_test_common.shinc.in plugins/mozilla-sync/trunk/tests/unit_test_common.h Modified: plugins/mozilla-sync/trunk/tests/CMakeLists.txt ============================================================================== --- plugins/mozilla-sync/trunk/tests/CMakeLists.txt Thu Jan 8 20:06:03 2009 (r5059) +++ plugins/mozilla-sync/trunk/tests/CMakeLists.txt Fri Jan 9 11:36:29 2009 (r5060) @@ -7,6 +7,13 @@ INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_SOURCE_DIR}/../src ${CHECK_INCLUDE_DIR} ${XPCOM_INCLUDE_DIRS} ${GLIB2_INCLUDE_DIRS} ${LIBXML2_INCLUDE_DIRS} ) +LINK_DIRECTORIES( + ${OPENSYNC_LIBRARY_DIRS} + ${XPCOM_LIBRARY_DIRS} + ${LIBXML2_LIBRARY_DIRS} + ${GLIB2_LIBRARY_DIRS} + ${ICAL_LIBRARY_DIRS} ) + ADD_DEFINITIONS( -DGRE_DIR="${GRE_DIR}" ) ADD_EXECUTABLE( unit_test_xpcom unit_test_xpcom.cpp unit_test_common.cpp @@ -50,19 +57,19 @@ CONFIGURE_FILE( "blackbox_test_cal_vcard_base/2" "tests/blackbox_test_cal_vcard_base/2" COPYONLY) CONFIGURE_FILE( "blackbox_test_cal_vevent_additional/add1" "tests/blackbox_test_cal_vevent_additional/add1" COPYONLY) -ADD_TEST( blackbox_test_init_thunderbird "blackbox_test_init_thunderbird.sh" ) -ADD_TEST( blackbox_test_init_osynctool "blackbox_test_init_osynctool.sh" ) -ADD_TEST( blackbox_test_abook_vcard_compare "blackbox_test_abook_vcard_compare.sh" ) -ADD_TEST( blackbox_test_abook_slow_slow "blackbox_test_abook_slow_slow.sh" ) -ADD_TEST( blackbox_test_abook_slow3 "blackbox_test_abook_slow3.sh" ) -ADD_TEST( blackbox_test_abook_slow_fast "blackbox_test_abook_slow_fast.sh" ) -ADD_TEST( blackbox_test_abook_add "blackbox_test_abook_add.sh" ) -ADD_TEST( blackbox_test_abook_delete "blackbox_test_abook_delete.sh" ) -ADD_TEST( blackbox_test_abook_fmod "blackbox_test_abook_fmod.sh" ) -ADD_TEST( blackbox_test_init_sunbird "blackbox_test_init_sunbird.sh" ) -ADD_TEST( blackbox_test_cal_slow_slow "blackbox_test_cal_slow_slow.sh" ) -ADD_TEST( blackbox_test_cal_slow3 "blackbox_test_cal_slow3.sh" ) -ADD_TEST( blackbox_test_cal_slow_fast "blackbox_test_cal_slow_fast.sh" ) -ADD_TEST( blackbox_test_cal_add "blackbox_test_cal_add.sh" ) -ADD_TEST( blackbox_test_cal_delete "blackbox_test_cal_delete.sh" ) -ADD_TEST( blackbox_test_cal_fmod "blackbox_test_cal_fmod.sh" ) +ADD_TEST( blackbox_test_init_thunderbird bash "blackbox_test_init_thunderbird.sh" ) +ADD_TEST( blackbox_test_init_osynctool bash "blackbox_test_init_osynctool.sh" ) +ADD_TEST( blackbox_test_abook_vcard_compare bash "blackbox_test_abook_vcard_compare.sh" ) +ADD_TEST( blackbox_test_abook_slow_slow bash "blackbox_test_abook_slow_slow.sh" ) +ADD_TEST( blackbox_test_abook_slow3 bash "blackbox_test_abook_slow3.sh" ) +ADD_TEST( blackbox_test_abook_slow_fast bash "blackbox_test_abook_slow_fast.sh" ) +ADD_TEST( blackbox_test_abook_add bash "blackbox_test_abook_add.sh" ) +ADD_TEST( blackbox_test_abook_delete bash "blackbox_test_abook_delete.sh" ) +ADD_TEST( blackbox_test_abook_fmod bash "blackbox_test_abook_fmod.sh" ) +ADD_TEST( blackbox_test_init_sunbird bash "blackbox_test_init_sunbird.sh" ) +ADD_TEST( blackbox_test_cal_slow_slow bash "blackbox_test_cal_slow_slow.sh" ) +ADD_TEST( blackbox_test_cal_slow3 bash "blackbox_test_cal_slow3.sh" ) +ADD_TEST( blackbox_test_cal_slow_fast bash "blackbox_test_cal_slow_fast.sh" ) +ADD_TEST( blackbox_test_cal_add bash "blackbox_test_cal_add.sh" ) +ADD_TEST( blackbox_test_cal_delete bash "blackbox_test_cal_delete.sh" ) +ADD_TEST( blackbox_test_cal_fmod bash "blackbox_test_cal_fmod.sh" ) Modified: plugins/mozilla-sync/trunk/tests/blackbox_test_abook_fmod.sh ============================================================================== --- plugins/mozilla-sync/trunk/tests/blackbox_test_abook_fmod.sh Thu Jan 8 20:06:03 2009 (r5059) +++ plugins/mozilla-sync/trunk/tests/blackbox_test_abook_fmod.sh Fri Jan 9 11:36:29 2009 (r5060) @@ -29,7 +29,7 @@ # Modify a VCard file # Fast sync it into Thunderbird banner_step "Fast sync after add" -sed -i s/first\ department/new\ department/ "${VCARD_DIR_1}/1" +sed -i.bak "s/first\ department/new\ department/" "${VCARD_DIR_1}/1" msync_sync "${GROUP_NAME_1}" # Slow sync Thunderbird to a new VCard directory in a new group @@ -40,7 +40,7 @@ create_msync_group_abook_file "${GROUP_NAME_1C}" abook.mab "${VCARD_DIR_1C}" msync_sync "${GROUP_NAME_1C}" copy_dir VCARD_DIR_A vcard_orig_for_compare "${VCARD_DIR_BASE}" -sed -i s/first\ department/new\ department/ "${VCARD_DIR_A}/1" +sed -i.bak s"/first\ department/new\ department/" "${VCARD_DIR_A}/1" compare_vcard_dirs "${VCARD_DIR_A}" "${VCARD_DIR_1C}" success_exit Modified: plugins/mozilla-sync/trunk/tests/blackbox_test_cal_fmod.sh ============================================================================== --- plugins/mozilla-sync/trunk/tests/blackbox_test_cal_fmod.sh Thu Jan 8 20:06:03 2009 (r5059) +++ plugins/mozilla-sync/trunk/tests/blackbox_test_cal_fmod.sh Fri Jan 9 11:36:29 2009 (r5060) @@ -29,7 +29,7 @@ # Modify a VEVENT # Fast sync it into Sunbird banner_step "Fast sync after add" -sed -i s/Location/New\ location/ "${VEVENT_DIR_1}/1" +sed -i.bak "s/Location/New\ location/" "${VEVENT_DIR_1}/1" msync_sync "${GROUP_NAME_1}" # Slow sync Sunbird to a new VEVENT directory in a new group @@ -40,7 +40,7 @@ create_msync_group_cal_file "${GROUP_NAME_1C}" 1 "${VEVENT_DIR_1C}" msync_sync "${GROUP_NAME_1C}" copy_dir VEVENT_DIR_A vevent_orig_for_compare "${VEVENT_DIR_BASE}" -sed -i s/Location/New\ location/ "${VEVENT_DIR_A}/1" +sed -i.bak "s/Location/New\ location/" "${VEVENT_DIR_A}/1" compare_vcard_dirs "${VEVENT_DIR_A}" "${VEVENT_DIR_1C}" success_exit Modified: plugins/mozilla-sync/trunk/tests/blackbox_test_common.shinc.in ============================================================================== --- plugins/mozilla-sync/trunk/tests/blackbox_test_common.shinc.in Thu Jan 8 20:06:03 2009 (r5059) +++ plugins/mozilla-sync/trunk/tests/blackbox_test_common.shinc.in Fri Jan 9 11:36:29 2009 (r5060) @@ -145,8 +145,18 @@ banner "Initializing test [${TEST_DESCRIPTION}]" myecho "SCRIPT_NAME [${SCRIPT_NAME}]" myecho "SRC_DIR [${SRC_DIR}]" -myecho "VALGRIND [${VALGRIND}]" - + myecho "VALGRIND [${VALGRIND}]" + KERNEL=`uname -s` + myecho "KERNEL [${KERNEL}]" + if [ "${KERNEL}" = 'FreeBSD' ]; then + MD5="md5" + else + MD5="md5sum" + fi + if ! ${MD5} < /dev/null > /dev/null; then + error_exit "${MD5} not found" $? "Could not find the executable ${MD5}" + fi + } @@ -161,7 +171,7 @@ myecho "TB_EXE [${TB_EXE}]" test -n "${TB_EXE}" || error_exit "Could not find Thunderbird" 1 - GRE_DIR=`grep moz_libdir "${TB_EXE}" | head -1 | cut -s -d "=" -f 2` + GRE_DIR=`grep moz_libdir "${TB_EXE}" | head -1 | cut -s -d "=" -f 2 | tr -d '"'` test -n "${GRE_DIR}" || GRE_DIR=`grep MOZ_DIST_LIB "${TB_EXE}" | head -1 | cut -s -d "=" -f 2 | tr -d '"'` test -n "${GRE_DIR}" || error_exit "Could not find GRE (Gecko Runtime Environment)" 1 myecho "GRE_DIR [${GRE_DIR}]" @@ -468,7 +478,7 @@ local MD5FILE="$2" touch "${MD5FILE}.tmp" find "${DIR}" -maxdepth 1 -type f | while read D; do - sort "$D" | grep -vE "DCREATED|LAST-MODIFIED" | md5sum >> "${MD5FILE}.tmp" + sort "$D" | grep -vE "DCREATED|LAST-MODIFIED" | ${MD5} >> "${MD5FILE}.tmp" done sort "${MD5FILE}.tmp" -o "${MD5FILE}" rm "${MD5FILE}.tmp" || true Modified: plugins/mozilla-sync/trunk/tests/unit_test_common.h ============================================================================== --- plugins/mozilla-sync/trunk/tests/unit_test_common.h Thu Jan 8 20:06:03 2009 (r5059) +++ plugins/mozilla-sync/trunk/tests/unit_test_common.h Fri Jan 9 11:36:29 2009 (r5060) @@ -35,6 +35,13 @@ #include <string.h> #include <glib.h> +// On FreeBSD we need unistd to define "mkdtemp" +// On FreeBSD we need libgen to define "basename" which is used in LOG +#if defined(__FreeBSD__) +#include <unistd.h> +#include <libgen.h> +#endif + #include <check.h> |
From: <dg...@su...> - 2009-01-08 19:06:37
|
Author: bricks Date: Thu Jan 8 20:06:03 2009 New Revision: 5059 URL: http://www.opensync.org/changeset/5059 Log: added additional application examples Added: trunk/docs/examples/applications/list_all_formats.c trunk/docs/examples/applications/list_all_plugins.c Modified: trunk/docs/examples/applications/CMakeLists.txt trunk/docs/examples/applications/list_all_groups.c Modified: trunk/docs/examples/applications/CMakeLists.txt ============================================================================== --- trunk/docs/examples/applications/CMakeLists.txt Thu Jan 8 19:27:30 2009 (r5058) +++ trunk/docs/examples/applications/CMakeLists.txt Thu Jan 8 20:06:03 2009 (r5059) @@ -14,4 +14,14 @@ SET( appl_SRCS list_all_groups.c ) SET( appl_NAME list_all_groups ) ADD_EXECUTABLE( ${appl_NAME} ${appl_SRCS} ) +TARGET_LINK_LIBRARIES( ${appl_NAME} ${OPENSYNC_LIBRARIES} ) + +SET( appl_SRCS list_all_plugins.c ) +SET( appl_NAME list_all_plugins ) +ADD_EXECUTABLE( ${appl_NAME} ${appl_SRCS} ) +TARGET_LINK_LIBRARIES( ${appl_NAME} ${OPENSYNC_LIBRARIES} ) + +SET( appl_SRCS list_all_formats.c ) +SET( appl_NAME list_all_formats ) +ADD_EXECUTABLE( ${appl_NAME} ${appl_SRCS} ) TARGET_LINK_LIBRARIES( ${appl_NAME} ${OPENSYNC_LIBRARIES} ) \ No newline at end of file Added: trunk/docs/examples/applications/list_all_formats.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ trunk/docs/examples/applications/list_all_formats.c Thu Jan 8 20:06:03 2009 (r5059) @@ -0,0 +1,33 @@ +#include <opensync/opensync.h> +#include <opensync/opensync-format.h> + +int main(int argc, char *argv[]) { + OSyncFormatEnv *env; + OSyncObjFormat *format; + + osync_bool couldloadformats; + + int numformats = 0; + int i = 0; + + env = osync_format_env_new (NULL); + /* load formats from default dir */ + couldloadformats= osync_format_env_load_plugins(env, NULL, NULL); + if (!couldloadformats) { + /* print error */ + printf("Could not load formats."); + return -1; + } + + numformats = osync_format_env_num_objformats(env); + printf("found %i formats\n", numformats); + + for( i = 0; i < numformats; i++ ) { + format = osync_format_env_nth_objformat(env, i); + printf("format nr. %i is %s\n", i+1, osync_objformat_get_name(format)); + } + + osync_format_env_unref(env); + + return 0; +} Modified: trunk/docs/examples/applications/list_all_groups.c ============================================================================== --- trunk/docs/examples/applications/list_all_groups.c Thu Jan 8 19:27:30 2009 (r5058) +++ trunk/docs/examples/applications/list_all_groups.c Thu Jan 8 20:06:03 2009 (r5059) @@ -4,7 +4,7 @@ int main(int argc, char *argv[]) { int numgroups = 0; - int i; + int i = 0; osync_bool couldloadgroups; @@ -16,13 +16,21 @@ couldloadgroups = osync_group_env_load_groups(groupenv, NULL, NULL); if ( !couldloadgroups ) { - /* print error to stderr */ + /* print error */ + printf("Could not load groups."); return -1; } numgroups = osync_group_env_num_groups(groupenv); + printf("found %i groups\n", numgroups); + for( i = 0; i < numgroups; i++ ) { group = osync_group_env_nth_group(groupenv, i); + printf("group nr. %i is %s\n", i+1, osync_group_get_name(group)); } + /* free env */ + osync_group_env_unref(groupenv); + + return 0; } Added: trunk/docs/examples/applications/list_all_plugins.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ trunk/docs/examples/applications/list_all_plugins.c Thu Jan 8 20:06:03 2009 (r5059) @@ -0,0 +1,35 @@ +#include <opensync/opensync.h> +#include <opensync/opensync-plugin.h> + +int main(int argc, char *argv[]) { + + OSyncPluginEnv *env; + OSyncPlugin* plugin; + + osync_bool couldloadplugins; + + int numplugins; + int i = 0; + + env = osync_plugin_env_new(NULL); + /* load plugins from default dir */ + couldloadplugins = osync_plugin_env_load(env, NULL, NULL); + if (!couldloadplugins) { + /* print error */ + printf("Could not load plugins."); + return -1; + } + + numplugins = osync_plugin_env_num_plugins(env); + printf("found %i plugins\n", i); + + for( i=0; i < numplugins; i++ ) { + plugin = osync_plugin_env_nth_plugin(env, i); + printf("plugin nr. %i is %s\n", i+1, osync_plugin_get_name(plugin)); + } + + /* free env */ + osync_plugin_env_unref(env); + + return 0; +} |
From: <dg...@su...> - 2009-01-08 18:28:08
|
Author: bricks Date: Thu Jan 8 19:27:30 2009 New Revision: 5058 URL: http://www.opensync.org/changeset/5058 Log: changed doxygen group description to OpenSync Plugin Environment Modified: trunk/opensync/plugin/opensync_plugin_env.h Modified: trunk/opensync/plugin/opensync_plugin_env.h ============================================================================== --- trunk/opensync/plugin/opensync_plugin_env.h Thu Jan 8 13:51:08 2009 (r5057) +++ trunk/opensync/plugin/opensync_plugin_env.h Thu Jan 8 19:27:30 2009 (r5058) @@ -30,7 +30,7 @@ */ /** - * @defgroup OSyncPluginEnvAPI OpenSync Environment + * @defgroup OSyncPluginEnvAPI OpenSync Plugin Environment * @ingroup OSyncPlugin * @brief The public API of the opensync environment * |
From: <dg...@su...> - 2009-01-08 12:51:38
|
Author: bricks Date: Thu Jan 8 13:51:08 2009 New Revision: 5057 URL: http://www.opensync.org/changeset/5057 Log: changed order of discover parameters vor evo-sync Modified: plugins/evolution2/src/evolution2_sync.c Modified: plugins/evolution2/src/evolution2_sync.c ============================================================================== --- plugins/evolution2/src/evolution2_sync.c Thu Jan 8 12:02:28 2009 (r5056) +++ plugins/evolution2/src/evolution2_sync.c Thu Jan 8 13:51:08 2009 (r5057) @@ -268,7 +268,7 @@ /* Here we actually tell opensync which sinks are available and their capabilities */ -static osync_bool evo2_discover(void *data, OSyncPluginInfo *info, OSyncError **error) +static osync_bool evo2_discover(OSyncPluginInfo *info, void *data, OSyncError **error) { osync_trace(TRACE_ENTRY, "%s(%p, %p, %p)", __func__, data, info, error); |
From: <dg...@su...> - 2009-01-08 11:02:57
|
Author: bricks Date: Thu Jan 8 12:02:28 2009 New Revision: 5056 URL: http://www.opensync.org/changeset/5056 Log: detailed doxygen desciption should not be in the summary Modified: trunk/opensync/plugin/opensync_plugin.h Modified: trunk/opensync/plugin/opensync_plugin.h ============================================================================== --- trunk/opensync/plugin/opensync_plugin.h Thu Jan 8 11:57:01 2009 (r5055) +++ trunk/opensync/plugin/opensync_plugin.h Thu Jan 8 12:02:28 2009 (r5056) @@ -35,6 +35,7 @@ /** * @brief Prototype of the plugin initialize function + * * In this function a plugin should initialize and allocate * all plugin specific data which is required in the other plugin * functions. This data could be e.g. connections, directories, ... @@ -47,6 +48,7 @@ /** * @brief Prototype of the plugin finalize function + * * This plugin function is called to give a plugin the possibility * to free all allocated data. * @param plugin_data Plugin specific data that was returned by the initialize function @@ -55,6 +57,7 @@ /** * @brief Prototype of the plugin discovery function + * * TODO Add detailed description * @param info the OSyncPluginInfo * @param plugin_data Plugin specific data that was returned in the plugin initialize function |
From: <dg...@su...> - 2009-01-08 10:57:32
|
Author: bricks Date: Thu Jan 8 11:57:01 2009 New Revision: 5055 URL: http://www.opensync.org/changeset/5055 Log: added doxygen group OSyncPlugin added documentation for the plugin callback functions Modified: trunk/opensync/plugin/opensync_plugin.h Modified: trunk/opensync/plugin/opensync_plugin.h ============================================================================== --- trunk/opensync/plugin/opensync_plugin.h Thu Jan 8 11:49:06 2009 (r5054) +++ trunk/opensync/plugin/opensync_plugin.h Thu Jan 8 11:57:01 2009 (r5055) @@ -21,14 +21,50 @@ #ifndef _OPENSYNC_PLUGIN_H_ #define _OPENSYNC_PLUGIN_H_ +/** + * @defgroup OSyncPlugin OpenSync Plugin Module + * @ingroup OSyncPublic + * @defgroup OSyncPluginAPI OpenSync Plugin + * @ingroup OSyncPlugin + * @brief The public part of the OSyncPlugin + * + * Functions to register and manage plugins + */ + +/*@{*/ + +/** + * @brief Prototype of the plugin initialize function + * In this function a plugin should initialize and allocate + * all plugin specific data which is required in the other plugin + * functions. This data could be e.g. connections, directories, ... + * @param plugin + * @param info the OSyncPluginInfo + * @param error An OSyncError struct that should be used to set an error + * @return The plugin specific data that is passed to the other plugin functions + */ typedef void * (* initialize_fn) (OSyncPlugin *plugin, OSyncPluginInfo *info, OSyncError **error); + +/** + * @brief Prototype of the plugin finalize function + * This plugin function is called to give a plugin the possibility + * to free all allocated data. + * @param plugin_data Plugin specific data that was returned by the initialize function + */ typedef void (* finalize_fn) (void * plugin_data); + +/** + * @brief Prototype of the plugin discovery function + * TODO Add detailed description + * @param info the OSyncPluginInfo + * @param plugin_data Plugin specific data that was returned in the plugin initialize function + * @param error An OSyncError struct that should be used to set an error + * @return TRUE if discovery was successful + */ typedef osync_bool (* discover_fn) (OSyncPluginInfo *info, void * plugin_data, OSyncError **error); /** @brief Gives information about wether the plugin * has to be configured or not - * - * @ingroup OSyncPluginAPI **/ typedef enum { /** Plugin has no configuration options */ @@ -39,15 +75,6 @@ OSYNC_PLUGIN_NEEDS_CONFIGURATION = 2 } OSyncConfigurationType; -/** - * @defgroup OSyncPluginAPI OpenSync Plugin - * @ingroup OSyncPublic - * @brief Functions to register and manage plugins - * - */ -/*@{*/ - - /** @brief Registers a new plugin * * This function creates a new OSyncPlugin object, that |
From: <dg...@su...> - 2009-01-08 10:49:43
|
Author: bricks Date: Thu Jan 8 11:49:06 2009 New Revision: 5054 URL: http://www.opensync.org/changeset/5054 Log: optimise doxygen output for c code Modified: trunk/Doxyfile.in Modified: trunk/Doxyfile.in ============================================================================== --- trunk/Doxyfile.in Thu Jan 8 11:47:50 2009 (r5053) +++ trunk/Doxyfile.in Thu Jan 8 11:49:06 2009 (r5054) @@ -222,7 +222,7 @@ # If the EXTRACT_STATIC tag is set to YES all static members of a file # will be included in the documentation. -EXTRACT_STATIC = YES +EXTRACT_STATIC = NO # If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) # defined locally in source files will be included in the documentation. |
From: <dg...@su...> - 2009-01-08 10:48:27
|
Author: bricks Date: Thu Jan 8 11:47:50 2009 New Revision: 5053 URL: http://www.opensync.org/changeset/5053 Log: Changed and added doxygen groups of plugin module Modified: trunk/opensync/plugin/opensync_context.h trunk/opensync/plugin/opensync_objtype_sink.h trunk/opensync/plugin/opensync_plugin_advancedoptions.h trunk/opensync/plugin/opensync_plugin_authentication.h trunk/opensync/plugin/opensync_plugin_config.h trunk/opensync/plugin/opensync_plugin_connection.h trunk/opensync/plugin/opensync_plugin_env.h trunk/opensync/plugin/opensync_plugin_info.h trunk/opensync/plugin/opensync_plugin_localization.h trunk/opensync/plugin/opensync_plugin_resource.h Modified: trunk/opensync/plugin/opensync_context.h ============================================================================== --- trunk/opensync/plugin/opensync_context.h Thu Jan 8 09:15:39 2009 (r5052) +++ trunk/opensync/plugin/opensync_context.h Thu Jan 8 11:47:50 2009 (r5053) @@ -23,6 +23,14 @@ OPENSYNC_BEGIN_DECLS +/** + * @defgroup OSyncContextAPI OpenSync Context + * @ingroup OSyncPlugin + * Public part of OpenSync Context + */ + +/*@{*/ + typedef void (* OSyncContextCallbackFn)(void *, OSyncError *); typedef void (* OSyncContextChangeFn) (OSyncChange *, void *); @@ -41,6 +49,8 @@ OSYNC_EXPORT void osync_context_report_osyncwarning(OSyncContext *context, OSyncError *error); OSYNC_EXPORT void osync_context_report_change(OSyncContext *context, OSyncChange *change); +/*@}*/ + OPENSYNC_END_DECLS #endif //_OPENSYNC_CONTEXT_H Modified: trunk/opensync/plugin/opensync_objtype_sink.h ============================================================================== --- trunk/opensync/plugin/opensync_objtype_sink.h Thu Jan 8 09:15:39 2009 (r5052) +++ trunk/opensync/plugin/opensync_objtype_sink.h Thu Jan 8 11:47:50 2009 (r5053) @@ -23,7 +23,7 @@ /** * @defgroup OSyncObjTypeSinkAPI OpenSync Object Type Sink - * @ingroup OSyncPublic + * @ingroup OSyncPlugin * @brief Functions to register and manage object type sinks * */ @@ -53,7 +53,7 @@ OSyncSinkConnectDoneFn connect_done; } OSyncObjTypeSinkFunctions; -/*! @brief Creates a new main sink +/** @brief Creates a new main sink * * Main sink is objtype neutral and should be used for object type * neutral actions. Actions like connecting/disconnecting which could @@ -68,7 +68,7 @@ */ OSYNC_EXPORT OSyncObjTypeSink *osync_objtype_main_sink_new(OSyncError **error); -/*! @brief Creates a new sink for an object type +/** @brief Creates a new sink for an object type * * @param objtype The name of the object type for the sink * @param error Pointer to an error struct @@ -76,21 +76,21 @@ */ OSYNC_EXPORT OSyncObjTypeSink *osync_objtype_sink_new(const char *objtype, OSyncError **error); -/*! @brief Increase the reference count on a sink +/** @brief Increase the reference count on a sink * * @param sink Pointer to the sink * */ OSYNC_EXPORT OSyncObjTypeSink *osync_objtype_sink_ref(OSyncObjTypeSink *sink); -/*! @brief Decrease the reference count on a sink +/** @brief Decrease the reference count on a sink * * @param sink Pointer to the sink * */ OSYNC_EXPORT void osync_objtype_sink_unref(OSyncObjTypeSink *sink); -/*! @brief Request an anchor for this Sink +/** @brief Request an anchor for this Sink * * If for this sink an anchor is required, this needs to be requested by this * function. If anchor gets enabled/requested inside the plugin, the framework @@ -105,7 +105,7 @@ */ OSYNC_EXPORT void osync_objtype_sink_enable_anchor(OSyncObjTypeSink *sink, osync_bool enable); -/*! @brief Get the pointer to the sink OSyncAnchor +/** @brief Get the pointer to the sink OSyncAnchor * * This Anchor is sink specific and can store persistent, sink specific data. * Originally designed to detect if a certain value changed since last @@ -119,7 +119,7 @@ OSYNC_EXPORT OSyncAnchor *osync_objtype_sink_get_anchor(OSyncObjTypeSink *sink); -/*! @brief Return the name of the object type of a sink +/** @brief Return the name of the object type of a sink * * @param sink Pointer to the sink * @returns the name of the object type of the specified sink @@ -128,7 +128,7 @@ OSYNC_EXPORT const char *osync_objtype_sink_get_name(OSyncObjTypeSink *sink); -/*! @brief Set the object type of a sink +/** @brief Set the object type of a sink * * @param sink Pointer to the sink * @param name the name of the object type to set @@ -137,7 +137,7 @@ OSYNC_EXPORT void osync_objtype_sink_set_name(OSyncObjTypeSink *sink, const char *name); -/*! @brief Return the preferred format for the conversion +/** @brief Return the preferred format for the conversion * * @param sink Pointer to the sink * @returns the name of the preferred format @@ -145,7 +145,7 @@ */ OSYNC_EXPORT const char *osync_objtype_sink_get_preferred_format(OSyncObjTypeSink *sink); -/*! @brief Set the preferred format for the conversion +/** @brief Set the preferred format for the conversion * * @param sink Pointer to the sink * @param preferred_format the name of the preferred format to set @@ -154,7 +154,7 @@ OSYNC_EXPORT void osync_objtype_sink_set_preferred_format(OSyncObjTypeSink *sink, const char *preferred_format); -/*! @brief Returns the number of object formats in the sink +/** @brief Returns the number of object formats in the sink * * @param sink Pointer to the sink * @returns the number of object formats in the sink @@ -162,7 +162,7 @@ */ OSYNC_EXPORT unsigned int osync_objtype_sink_num_objformat_sinks(OSyncObjTypeSink *sink); -/*! @brief Returns the nth object format in the sink +/** @brief Returns the nth object format in the sink * * @param sink Pointer to the sink * @param nth the index of the object format to return @@ -171,7 +171,7 @@ */ OSYNC_EXPORT OSyncObjFormatSink *osync_objtype_sink_nth_objformat_sink(OSyncObjTypeSink *sink, unsigned int nth); -/*! @brief Finds the objformat sink for the corresponding objformat +/** @brief Finds the objformat sink for the corresponding objformat * * @param sink Pointer to the sink * @param objformat the objformat to look for the corresponding objformat sink @@ -180,7 +180,7 @@ */ OSYNC_EXPORT OSyncObjFormatSink *osync_objtype_sink_find_objformat_sink(OSyncObjTypeSink *sink, OSyncObjFormat *objformat); -/*! @brief Get list of object format sinks +/** @brief Get list of object format sinks * * @param sink Pointer to the sink * @returns List of object format sinks @@ -230,7 +230,7 @@ OSYNC_EXPORT void *osync_objtype_sink_get_userdata(OSyncObjTypeSink *sink); -/*! @brief Checks if a sink is enabled +/** @brief Checks if a sink is enabled * * @param sink Pointer to the sink * @returns TRUE if the sink is enabled, FALSE otherwise @@ -238,7 +238,7 @@ */ OSYNC_EXPORT osync_bool osync_objtype_sink_is_enabled(OSyncObjTypeSink *sink); -/*! @brief Sets the enabled/disabled state of a sink +/** @brief Sets the enabled/disabled state of a sink * * @param sink Pointer to the sink * @param enabled TRUE if the sink is enabled, FALSE otherwise @@ -247,7 +247,7 @@ OSYNC_EXPORT void osync_objtype_sink_set_enabled(OSyncObjTypeSink *sink, osync_bool enabled); -/*! @brief Checks if a sink is available +/** @brief Checks if a sink is available * * @param sink Pointer to the sink * @returns TRUE if the sink is available, FALSE otherwise @@ -255,7 +255,7 @@ */ OSYNC_EXPORT osync_bool osync_objtype_sink_is_available(OSyncObjTypeSink *sink); -/*! @brief Sets the available state of a sink +/** @brief Sets the available state of a sink * * @param sink Pointer to the sink * @param available TRUE if the sink is available, FALSE otherwise @@ -264,7 +264,7 @@ OSYNC_EXPORT void osync_objtype_sink_set_available(OSyncObjTypeSink *sink, osync_bool available); -/*! @brief Checks if sink is allowed to write (commit) +/** @brief Checks if sink is allowed to write (commit) * * If the sink is not allowed to write, then no changes will be commited to * the sink. @@ -274,7 +274,7 @@ */ OSYNC_EXPORT osync_bool osync_objtype_sink_get_write(OSyncObjTypeSink *sink); -/*! @brief Sets the write status of the sink (commit) +/** @brief Sets the write status of the sink (commit) * * See osync_objtype_sink_get_write() * @@ -285,7 +285,7 @@ OSYNC_EXPORT void osync_objtype_sink_set_write(OSyncObjTypeSink *sink, osync_bool write); -/*! @brief Checks if sink is allowed to get latest changes +/** @brief Checks if sink is allowed to get latest changes * * @param sink Pointer to the sink * @returns TRUE if the sink is allowed to get latest changed entries, FALSE otherwise @@ -293,7 +293,7 @@ */ OSYNC_EXPORT osync_bool osync_objtype_sink_get_getchanges(OSyncObjTypeSink *sink); -/*! @brief Sets the get latest changes status of the sink (get_change) +/** @brief Sets the get latest changes status of the sink (get_change) * * See osync_objtype_sink_get_getchanges() * @@ -304,7 +304,7 @@ OSYNC_EXPORT void osync_objtype_sink_set_getchanges(OSyncObjTypeSink *sink, osync_bool getchanges); -/*! @brief Checks if sink is allowed to read single entries +/** @brief Checks if sink is allowed to read single entries * * "Read" means to request a single entry and does not mean to get the * latest changes since last sink. See osync_objtype_sink_get_getchanges(). @@ -319,7 +319,7 @@ */ OSYNC_EXPORT osync_bool osync_objtype_sink_get_read(OSyncObjTypeSink *sink); -/*! @brief Sets the (single) read status of a sink +/** @brief Sets the (single) read status of a sink * * See osync_objtype_sink_get_read() * @@ -330,7 +330,7 @@ OSYNC_EXPORT void osync_objtype_sink_set_read(OSyncObjTypeSink *sink, osync_bool read); -/*! @brief Checks if slow-sync has been requested +/** @brief Checks if slow-sync has been requested * * When slow-sync is requested, OpenSync synchronizes all entries rather than * just the changes. @@ -347,7 +347,7 @@ */ OSYNC_EXPORT osync_bool osync_objtype_sink_get_slowsync(OSyncObjTypeSink *sink); -/*! @brief Sets the slow-sync state of a sink +/** @brief Sets the slow-sync state of a sink * * When slow-sync is requested, OpenSync synchronizes all entries rather than * just the changes. @@ -463,7 +463,7 @@ OSYNC_EXPORT void osync_objtype_sink_committed_all(OSyncObjTypeSink *sink, void *plugindata, OSyncPluginInfo *info, OSyncContext *ctx); -/*! @brief Sets the connect timeout in seconds for the OSyncObjTypeSink +/** @brief Sets the connect timeout in seconds for the OSyncObjTypeSink * * @param sink Pointer to the sink * @param timeout The timeout in seconds @@ -471,7 +471,7 @@ */ OSYNC_EXPORT void osync_objtype_sink_set_connect_timeout(OSyncObjTypeSink *sink, unsigned int timeout); -/*! @brief Sets the disconnect timeout in seconds for the OSyncObjTypeSink +/** @brief Sets the disconnect timeout in seconds for the OSyncObjTypeSink * * @param sink Pointer to the sink * @param timeout The timeout in seconds @@ -479,7 +479,7 @@ */ OSYNC_EXPORT void osync_objtype_sink_set_disconnect_timeout(OSyncObjTypeSink *sink, unsigned int timeout); -/*! @brief Sets the get_changes timeout in seconds for the OSyncObjTypeSink +/** @brief Sets the get_changes timeout in seconds for the OSyncObjTypeSink * * @param sink Pointer to the sink * @param timeout The timeout in seconds @@ -487,7 +487,7 @@ */ OSYNC_EXPORT void osync_objtype_sink_set_getchanges_timeout(OSyncObjTypeSink *sink, unsigned int timeout); -/*! @brief Sets the commit timeout in seconds for the OSyncObjTypeSink +/** @brief Sets the commit timeout in seconds for the OSyncObjTypeSink * * @param sink Pointer to the sink * @param timeout The timeout in seconds @@ -495,7 +495,7 @@ */ OSYNC_EXPORT void osync_objtype_sink_set_commit_timeout(OSyncObjTypeSink *sink, unsigned int timeout); -/*! @brief Sets the batchcommit timeout in seconds for the OSyncObjTypeSink +/** @brief Sets the batchcommit timeout in seconds for the OSyncObjTypeSink * * @param sink Pointer to the sink * @param timeout The timeout in seconds @@ -503,7 +503,7 @@ */ OSYNC_EXPORT void osync_objtype_sink_set_batchcommit_timeout(OSyncObjTypeSink *sink, unsigned int timeout); -/*! @brief Sets the committedall timeout in seconds for the OSyncObjTypeSink +/** @brief Sets the committedall timeout in seconds for the OSyncObjTypeSink * * @param sink Pointer to the sink * @param timeout The timeout in seconds @@ -511,7 +511,7 @@ */ OSYNC_EXPORT void osync_objtype_sink_set_committedall_timeout(OSyncObjTypeSink *sink, unsigned int timeout); -/*! @brief Sets the syncdone timeout in seconds for the OSyncObjTypeSink +/** @brief Sets the syncdone timeout in seconds for the OSyncObjTypeSink * * @param sink Pointer to the sink * @param timeout The timeout in seconds @@ -519,7 +519,7 @@ */ OSYNC_EXPORT void osync_objtype_sink_set_syncdone_timeout(OSyncObjTypeSink *sink, unsigned int timeout); -/*! @brief Sets the write timeout in seconds for the OSyncObjTypeSink +/** @brief Sets the write timeout in seconds for the OSyncObjTypeSink * * @param sink Pointer to the sink * @param timeout The timeout in seconds @@ -527,7 +527,7 @@ */ OSYNC_EXPORT void osync_objtype_sink_set_write_timeout(OSyncObjTypeSink *sink, unsigned int timeout); -/*! @brief Sets the read timeout in seconds for the OSyncObjTypeSink +/** @brief Sets the read timeout in seconds for the OSyncObjTypeSink * * @param sink Pointer to the sink * @param timeout The timeout in seconds Modified: trunk/opensync/plugin/opensync_plugin_advancedoptions.h ============================================================================== --- trunk/opensync/plugin/opensync_plugin_advancedoptions.h Thu Jan 8 09:15:39 2009 (r5052) +++ trunk/opensync/plugin/opensync_plugin_advancedoptions.h Thu Jan 8 11:47:50 2009 (r5053) @@ -23,7 +23,7 @@ /** * @defgroup OSyncPluginConfigAdvancedOptionsAPI OpenSync Plugin Config Advanced Options - * @ingroup OSyncPublic + * @ingroup OSyncPlugin * @brief Functions to get and set a plugin's custom configuration options * * The AdvancedOptions system allows plugins to store custom (plugin-specific) @@ -37,7 +37,7 @@ /*@{*/ -/*! @brief Advanced option value types +/** @brief Advanced option value types * **/ typedef enum { @@ -69,7 +69,7 @@ OSYNC_EXPORT OSyncPluginAdvancedOptionType osync_plugin_advancedoption_type_string_to_val(const char *typestr); /* OSyncPluginAdvancedOption */ -/*! @brief Create a new OSyncPluginAdvancedOption object +/** @brief Create a new OSyncPluginAdvancedOption object * * @param error Pointer to an error struct * @returns the newly created object, or NULL in case of an error. @@ -77,14 +77,14 @@ */ OSYNC_EXPORT OSyncPluginAdvancedOption *osync_plugin_advancedoption_new(OSyncError **error); -/*! @brief Decrease the reference count on an OSyncPluginAdvancedOption object +/** @brief Decrease the reference count on an OSyncPluginAdvancedOption object * * @param option Pointer to the OSyncPluginAdvancedOption object * */ OSYNC_EXPORT void osync_plugin_advancedoption_unref(OSyncPluginAdvancedOption *option); -/*! @brief Increase the reference count on an OSyncPluginAdvancedOption object +/** @brief Increase the reference count on an OSyncPluginAdvancedOption object * * @param option Pointer to the OSyncPluginAdvancedOption object * @returns The OSyncPluginAdvancedOption object passed in @@ -93,7 +93,7 @@ OSYNC_EXPORT OSyncPluginAdvancedOption *osync_plugin_advancedoption_ref(OSyncPluginAdvancedOption *option); -/*! @brief Get a list of the parameters in an option +/** @brief Get a list of the parameters in an option * * @param option Pointer to the OSyncPluginAdvancedOption object * @returns the list of parameters @@ -101,7 +101,7 @@ */ OSYNC_EXPORT OSyncList *osync_plugin_advancedoption_get_parameters(OSyncPluginAdvancedOption *option); -/*! @brief Add a parameter to an option +/** @brief Add a parameter to an option * * @param option Pointer to the OSyncPluginAdvancedOption object * @param param the parameter to add @@ -109,7 +109,7 @@ */ OSYNC_EXPORT void osync_plugin_advancedoption_add_parameter(OSyncPluginAdvancedOption *option, OSyncPluginAdvancedOptionParameter *param); -/*! @brief Remove a parameter from an option +/** @brief Remove a parameter from an option * * @param option Pointer to the OSyncPluginAdvancedOption object * @param param the parameter to remove @@ -118,7 +118,7 @@ OSYNC_EXPORT void osync_plugin_advancedoption_remove_parameter(OSyncPluginAdvancedOption *option, OSyncPluginAdvancedOptionParameter *param); -/*! @brief Get the maximum value/length of an option +/** @brief Get the maximum value/length of an option * * @param option Pointer to the OSyncPluginAdvancedOption object * @returns the maximum value/length of the option @@ -126,7 +126,7 @@ */ OSYNC_EXPORT unsigned int osync_plugin_advancedoption_get_max(OSyncPluginAdvancedOption *option); -/*! @brief Set the maximum value/length of an option +/** @brief Set the maximum value/length of an option * * @param option Pointer to the OSyncPluginAdvancedOption object * @param max the maximum value/length to set @@ -135,7 +135,7 @@ OSYNC_EXPORT void osync_plugin_advancedoption_set_max(OSyncPluginAdvancedOption *option, unsigned int max); -/*! @brief Get the minimum value/length of an option +/** @brief Get the minimum value/length of an option * * @param option Pointer to the OSyncPluginAdvancedOption object * @returns the minimum value/length of the option @@ -143,7 +143,7 @@ */ OSYNC_EXPORT unsigned int osync_plugin_advancedoption_get_min(OSyncPluginAdvancedOption *option); -/*! @brief Set the minimum value/length of an option +/** @brief Set the minimum value/length of an option * * @param option Pointer to the OSyncPluginAdvancedOption object * @param min the minimum value/length to set @@ -156,7 +156,7 @@ OSYNC_EXPORT void osync_plugin_advancedoption_set_maxoccurs(OSyncPluginAdvancedOption *option, unsigned int maxoccurs); -/*! @brief Get the display name of an option +/** @brief Get the display name of an option * * The display name is intended to be shown in the configuration user interface for the option. * @@ -166,7 +166,7 @@ */ OSYNC_EXPORT const char *osync_plugin_advancedoption_get_displayname(OSyncPluginAdvancedOption *option); -/*! @brief Set the display name of an option +/** @brief Set the display name of an option * * The display name is intended to be shown in the configuration user interface for the option. * @@ -177,7 +177,7 @@ OSYNC_EXPORT void osync_plugin_advancedoption_set_displayname(OSyncPluginAdvancedOption *option, const char *displayname); -/*! @brief Get the name of an option +/** @brief Get the name of an option * * This name is intended as an internal identifier for the option. It should not be shown in the user interface. * @@ -187,7 +187,7 @@ */ OSYNC_EXPORT const char *osync_plugin_advancedoption_get_name(OSyncPluginAdvancedOption *option); -/*! @brief Set the name of an option +/** @brief Set the name of an option * * This name is intended as an internal identifier for the option. It should not be shown in the user interface. * @@ -198,7 +198,7 @@ OSYNC_EXPORT void osync_plugin_advancedoption_set_name(OSyncPluginAdvancedOption *option, const char *name); -/*! @brief Get the value type of an option +/** @brief Get the value type of an option * * @param option Pointer to the OSyncPluginAdvancedOption object * @returns the value type of the option @@ -206,7 +206,7 @@ */ OSYNC_EXPORT OSyncPluginAdvancedOptionType osync_plugin_advancedoption_get_type(OSyncPluginAdvancedOption *option); -/*! @brief Get the value type of an option (as text) +/** @brief Get the value type of an option (as text) * * @param option Pointer to the OSyncPluginAdvancedOption object * @returns a string representing the value type of the option @@ -214,7 +214,7 @@ */ OSYNC_EXPORT const char *osync_plugin_advancedoption_get_type_string(OSyncPluginAdvancedOption *option); -/*! @brief Set the value type of an option +/** @brief Set the value type of an option * * @param option Pointer to the OSyncPluginAdvancedOption object * @param type the value type to set @@ -223,7 +223,7 @@ OSYNC_EXPORT void osync_plugin_advancedoption_set_type(OSyncPluginAdvancedOption *option, OSyncPluginAdvancedOptionType type); -/*! @brief Get a list of the enumerated values of an option +/** @brief Get a list of the enumerated values of an option * * For options which accept only a set list of possible values (i.e. an enumeration) this function * returns a list of the possible values. @@ -234,7 +234,7 @@ */ OSYNC_EXPORT OSyncList *osync_plugin_advancedoption_get_valenums(OSyncPluginAdvancedOption *option); -/*! @brief Add an enumerated value to an option +/** @brief Add an enumerated value to an option * * @param option Pointer to the OSyncPluginAdvancedOption object * @param value the value to add to the enumeration @@ -242,7 +242,7 @@ */ OSYNC_EXPORT void osync_plugin_advancedoption_add_valenum(OSyncPluginAdvancedOption *option, const char *value); -/*! @brief Remove an enumerated value from an option +/** @brief Remove an enumerated value from an option * * @param option Pointer to the OSyncPluginAdvancedOption object * @param value the value to remove from the enumeration @@ -251,7 +251,7 @@ OSYNC_EXPORT void osync_plugin_advancedoption_remove_valenum(OSyncPluginAdvancedOption *option, const char *value); -/*! @brief Set the value of an option +/** @brief Set the value of an option * * @param option Pointer to the OSyncPluginAdvancedOption object * @param value the value to set (as a null-terminated string) @@ -259,7 +259,7 @@ */ OSYNC_EXPORT void osync_plugin_advancedoption_set_value(OSyncPluginAdvancedOption *option, const char *value); -/*! @brief Get the value of an option +/** @brief Get the value of an option * * @param option Pointer to the OSyncPluginAdvancedOption object * @returns the value of the option (as a null-terminated string) @@ -269,7 +269,7 @@ /* OSyncPluginAdvancedOptionParameter */ -/*! @brief Create a new OSyncPluginAdvancedOptionParameter object +/** @brief Create a new OSyncPluginAdvancedOptionParameter object * * @param error Pointer to an error struct * @returns the newly created object, or NULL in case of an error. @@ -277,14 +277,14 @@ */ OSYNC_EXPORT OSyncPluginAdvancedOptionParameter *osync_plugin_advancedoption_param_new(OSyncError **error); -/*! @brief Decrease the reference count on an OSyncPluginAdvancedOptionParameter object +/** @brief Decrease the reference count on an OSyncPluginAdvancedOptionParameter object * * @param param Pointer to the OSyncPluginAdvancedOptionParameter object * */ OSYNC_EXPORT void osync_plugin_advancedoption_param_unref(OSyncPluginAdvancedOptionParameter *param); -/*! @brief Increase the reference count on an OSyncPluginAdvancedOptionParameter object +/** @brief Increase the reference count on an OSyncPluginAdvancedOptionParameter object * * @param param Pointer to the OSyncPluginAdvancedOptionParameter object * @returns The OSyncPluginAdvancedOptionParameter object passed in @@ -293,7 +293,7 @@ OSYNC_EXPORT OSyncPluginAdvancedOptionParameter *osync_plugin_advancedoption_param_ref(OSyncPluginAdvancedOptionParameter *param); -/*! @brief Get the display name of a parameter +/** @brief Get the display name of a parameter * * The display name is intended to be shown in the configuration user interface for the parameter. * @@ -303,7 +303,7 @@ */ OSYNC_EXPORT const char *osync_plugin_advancedoption_param_get_displayname(OSyncPluginAdvancedOptionParameter *param); -/*! @brief Set the display name of a parameter +/** @brief Set the display name of a parameter * * The display name is intended to be shown in the configuration user interface for the parameter. * @@ -314,7 +314,7 @@ OSYNC_EXPORT void osync_plugin_advancedoption_param_set_displayname(OSyncPluginAdvancedOptionParameter *param, const char *displayname); -/*! @brief Get the name of a parameter +/** @brief Get the name of a parameter * * This name is intended as an internal identifier for the parameter. It should not be shown in the user interface. * @@ -324,7 +324,7 @@ */ OSYNC_EXPORT const char *osync_plugin_advancedoption_param_get_name(OSyncPluginAdvancedOptionParameter *param); -/*! @brief Set the name of a parameter +/** @brief Set the name of a parameter * * This name is intended as an internal identifier for the parameter. It should not be shown in the user interface. * @@ -335,7 +335,7 @@ OSYNC_EXPORT void osync_plugin_advancedoption_param_set_name(OSyncPluginAdvancedOptionParameter *param, const char *name); -/*! @brief Get the value type of a parameter +/** @brief Get the value type of a parameter * * @param param Pointer to the OSyncPluginAdvancedOptionParameter object * @returns the value type of the parameter @@ -343,7 +343,7 @@ */ OSYNC_EXPORT OSyncPluginAdvancedOptionType osync_plugin_advancedoption_param_get_type(OSyncPluginAdvancedOptionParameter *param); -/*! @brief Get the value type of a parameter (as text) +/** @brief Get the value type of a parameter (as text) * * @param param Pointer to the OSyncPluginAdvancedOptionParameter object * @returns a string representing the value type of the parameter @@ -351,7 +351,7 @@ */ OSYNC_EXPORT const char *osync_plugin_advancedoption_param_get_type_string(OSyncPluginAdvancedOptionParameter *param); -/*! @brief Set the value type of a parameter +/** @brief Set the value type of a parameter * * @param param Pointer to the OSyncPluginAdvancedOptionParameter object * @param type the value type to set @@ -359,7 +359,7 @@ */ OSYNC_EXPORT void osync_plugin_advancedoption_param_set_type(OSyncPluginAdvancedOptionParameter *param, OSyncPluginAdvancedOptionType type); -/*! @brief Get a list of the enumerated values of a parameter +/** @brief Get a list of the enumerated values of a parameter * * For parameters which accept only a set list of possible values (i.e. an enumeration) this function * returns a list of the possible values. @@ -370,7 +370,7 @@ */ OSYNC_EXPORT OSyncList *osync_plugin_advancedoption_param_get_valenums(OSyncPluginAdvancedOptionParameter *param); -/*! @brief Add an enumerated value to a parameter +/** @brief Add an enumerated value to a parameter * * @param param Pointer to the OSyncPluginAdvancedOptionParameter object * @param value the value to add to the enumeration @@ -378,7 +378,7 @@ */ OSYNC_EXPORT void osync_plugin_advancedoption_param_add_valenum(OSyncPluginAdvancedOptionParameter *param, const char *value); -/*! @brief Remove an enumerated value from a parameter +/** @brief Remove an enumerated value from a parameter * * @param param Pointer to the OSyncPluginAdvancedOptionParameter object * @param value the value to remove from the enumeration @@ -387,7 +387,7 @@ OSYNC_EXPORT void osync_plugin_advancedoption_param_remove_valenum(OSyncPluginAdvancedOptionParameter *param, const char *value); -/*! @brief Set the value of a parameter +/** @brief Set the value of a parameter * * @param param Pointer to the OSyncPluginAdvancedOptionParameter object * @param value the value to set (as a null-terminated string) @@ -395,7 +395,7 @@ */ OSYNC_EXPORT void osync_plugin_advancedoption_param_set_value(OSyncPluginAdvancedOptionParameter *param, const char *value); -/*! @brief Get the value of a parameter +/** @brief Get the value of a parameter * * @param param Pointer to the OSyncPluginAdvancedOptionParameter object * @returns the value of the option (as a null-terminated string) Modified: trunk/opensync/plugin/opensync_plugin_authentication.h ============================================================================== --- trunk/opensync/plugin/opensync_plugin_authentication.h Thu Jan 8 09:15:39 2009 (r5052) +++ trunk/opensync/plugin/opensync_plugin_authentication.h Thu Jan 8 11:47:50 2009 (r5053) @@ -23,13 +23,13 @@ /** * @defgroup OSyncPluginAuthAPI OpenSync Plugin Authentication - * @ingroup OSyncPublic + * @ingroup OSyncPlugin * @brief Functions for configuring plugin authentication * */ /*@{*/ -/*! @brief Types of authentication options supported by a plugin +/** @brief Types of authentication options supported by a plugin * **/ typedef enum { @@ -41,12 +41,12 @@ OSYNC_PLUGIN_AUTHENTICATION_REFERENCE = (1 << 2), } OSyncPluginAuthenticationOptionSupportedFlag; -/*! @brief Set of OSyncPluginAuthenticationOptionSupportedFlags +/** @brief Set of OSyncPluginAuthenticationOptionSupportedFlags * **/ typedef unsigned int OSyncPluginAuthenticationOptionSupportedFlags; -/*! @brief Create a new OSyncPluginAuthentication object +/** @brief Create a new OSyncPluginAuthentication object * * @param error Pointer to an error struct * @returns the newly created object, or NULL in case of an error. @@ -54,14 +54,14 @@ */ OSYNC_EXPORT OSyncPluginAuthentication *osync_plugin_authentication_new(OSyncError **error); -/*! @brief Decrease the reference count on an OSyncPluginAuthentication object +/** @brief Decrease the reference count on an OSyncPluginAuthentication object * * @param auth Pointer to the OSyncPluginAuthentication object * */ OSYNC_EXPORT void osync_plugin_authentication_unref(OSyncPluginAuthentication *auth); -/*! @brief Increase the reference count on an OSyncPluginAuthentication object +/** @brief Increase the reference count on an OSyncPluginAuthentication object * * @param auth Pointer to the OSyncPluginAuthentication object * @returns The OSyncPluginAuthentication object passed in @@ -70,7 +70,7 @@ OSYNC_EXPORT OSyncPluginAuthentication *osync_plugin_authentication_ref(OSyncPluginAuthentication *auth); -/*! @brief Determine if an authentication option is supported by a plugin +/** @brief Determine if an authentication option is supported by a plugin * * @param auth Pointer to the OSyncPluginAuthentication object * @param flag Authentication option to check @@ -79,7 +79,7 @@ */ OSYNC_EXPORT osync_bool osync_plugin_authentication_option_is_supported(OSyncPluginAuthentication *auth, OSyncPluginAuthenticationOptionSupportedFlag flag); -/*! @brief Set the authentication options supported by a plugin +/** @brief Set the authentication options supported by a plugin * * @param auth Pointer to the OSyncPluginAuthentication object * @param flags Authentication option to check @@ -88,7 +88,7 @@ OSYNC_EXPORT void osync_plugin_authentication_option_set_supported(OSyncPluginAuthentication *auth, OSyncPluginAuthenticationOptionSupportedFlags flags); -/*! @brief Get the authentication username +/** @brief Get the authentication username * * @param auth Pointer to the OSyncPluginAuthentication object * @returns the username or NULL if not set @@ -96,7 +96,7 @@ */ OSYNC_EXPORT const char *osync_plugin_authentication_get_username(OSyncPluginAuthentication *auth); -/*! @brief Set the authentication username +/** @brief Set the authentication username * * @param auth Pointer to the OSyncPluginAuthentication object * @param username the username to set @@ -105,7 +105,7 @@ OSYNC_EXPORT void osync_plugin_authentication_set_username(OSyncPluginAuthentication *auth, const char *username); -/*! @brief Get the authentication password +/** @brief Get the authentication password * * @param auth Pointer to the OSyncPluginAuthentication object * @returns the username or NULL if not set @@ -113,7 +113,7 @@ */ OSYNC_EXPORT const char *osync_plugin_authentication_get_password(OSyncPluginAuthentication *auth); -/*! @brief Set the authentication password +/** @brief Set the authentication password * * WARNING: This password will be stored in plain text in the plugin configuration file. In * future versions of OpenSync, interfaces should be available to password databases @@ -127,7 +127,7 @@ OSYNC_EXPORT void osync_plugin_authentication_set_password(OSyncPluginAuthentication *auth, const char *password); -/*! @brief Get the authentication reference. +/** @brief Get the authentication reference. * * This reference is intended to be a key used to look up the password using some kind of * password storage system, such as KDE's KWallet or Gnome-keyring. As this is not yet @@ -139,7 +139,7 @@ */ OSYNC_EXPORT const char *osync_plugin_authentication_get_reference(OSyncPluginAuthentication *auth); -/*! @brief Set the authentication reference +/** @brief Set the authentication reference * * This reference is intended to be a key used to look up the password using some kind of * password storage system, such as KDE's KWallet or Gnome-keyring. As this is not yet Modified: trunk/opensync/plugin/opensync_plugin_config.h ============================================================================== --- trunk/opensync/plugin/opensync_plugin_config.h Thu Jan 8 09:15:39 2009 (r5052) +++ trunk/opensync/plugin/opensync_plugin_config.h Thu Jan 8 11:47:50 2009 (r5053) @@ -26,14 +26,14 @@ /** * @defgroup OSyncPluginConfigAPI OpenSync Plugin Config - * @ingroup OSyncPublic + * @ingroup OSyncPlugin * @brief Functions to get and set a plugin's configuration * */ /*@{*/ -/*! @brief Flags specifying the elements supported by a plugin config +/** @brief Flags specifying the elements supported by a plugin config * * @param error Pointer to and error struct * @returns the newly registered plugin config object @@ -51,25 +51,25 @@ OPENSYNC_PLUGIN_CONFIG_CONNECTION = (1 << 4) } OSyncPluginConfigSupportedFlag; -/*! @brief Set of OSyncPluginConfigSupportedFlags +/** @brief Set of OSyncPluginConfigSupportedFlags * **/ typedef unsigned int OSyncPluginConfigSupportedFlags; -/*! @brief Create a new plugin config object +/** @brief Create a new plugin config object * * @param error Pointer to and error struct * @returns the newly registered plugin config object */ OSYNC_EXPORT OSyncPluginConfig *osync_plugin_config_new(OSyncError **error); -/*! @brief Decrease the reference count on a plugin config object +/** @brief Decrease the reference count on a plugin config object * * @param config Pointer to the plugin config object */ OSYNC_EXPORT void osync_plugin_config_unref(OSyncPluginConfig *config); -/*! @brief Increase the reference count on a plugin config object +/** @brief Increase the reference count on a plugin config object * * @param config Pointer to the plugin config object * @returns the passed plugin config @@ -77,7 +77,7 @@ OSYNC_EXPORT OSyncPluginConfig *osync_plugin_config_ref(OSyncPluginConfig *config); -/*! @brief Load a plugin config file +/** @brief Load a plugin config file * * @param config Contents of config file as OsyncPluginConfig object * @param path Path to file to load @@ -86,7 +86,7 @@ */ OSYNC_EXPORT osync_bool osync_plugin_config_file_load(OSyncPluginConfig *config, const char *path, const char *schemadir, OSyncError **error); -/*! @brief Save a plugin config to a file +/** @brief Save a plugin config to a file * * @param config Plugin config to save * @param path Path to save file @@ -96,7 +96,7 @@ OSYNC_EXPORT osync_bool osync_plugin_config_file_save(OSyncPluginConfig *config, const char *path, OSyncError **error); -/*! @brief Check if a config element is supported by a config +/** @brief Check if a config element is supported by a config * * @param config Plugin config to check * @param flag The type of configuration element to check @@ -104,7 +104,7 @@ */ OSYNC_EXPORT osync_bool osync_plugin_config_is_supported(OSyncPluginConfig *config, OSyncPluginConfigSupportedFlag flag); -/*! @brief Sets the passed config element flags as supported by the config +/** @brief Sets the passed config element flags as supported by the config * * @param config An OsyncPluginConfig to modify * @param flags An OSyncPluginConfigSupportedFlags to set the flags to (merge or overwrite??) @@ -112,14 +112,14 @@ OSYNC_EXPORT void osync_plugin_config_set_supported(OSyncPluginConfig *config, OSyncPluginConfigSupportedFlags flags); /* Advanced Options */ -/*! @brief Get the advanced options from a config +/** @brief Get the advanced options from a config * * @param config An OSyncPluginConfig to get the advanced options from * @returns An OSyncList of OSyncPluginAdvancedOption s */ OSYNC_EXPORT OSyncList *osync_plugin_config_get_advancedoptions(OSyncPluginConfig *config); -/*!@brief Get an advanced option from the config by name +/**@brief Get an advanced option from the config by name * * @param config An OSyncPluginConfig to search * @param name The name of the advanced option to get @@ -127,14 +127,14 @@ */ OSYNC_EXPORT OSyncPluginAdvancedOption *osync_plugin_config_get_advancedoption_value_by_name(OSyncPluginConfig *config, const char *name); -/*!@brief Add an advanced option to a config +/**@brief Add an advanced option to a config * * @param config The config to add the option to * @param option the advanced option to add */ OSYNC_EXPORT void osync_plugin_config_add_advancedoption(OSyncPluginConfig *config, OSyncPluginAdvancedOption *option); -/*!@brief Remove an advanced option from a config +/**@brief Remove an advanced option from a config * * @param config An OSyncPluginConfig to remove from * @param option The advanced option to be removed @@ -142,14 +142,14 @@ OSYNC_EXPORT void osync_plugin_config_remove_advancedoption(OSyncPluginConfig *config, OSyncPluginAdvancedOption *option); /* Authentication */ -/*!@brief Get the authentication settings from a config +/**@brief Get the authentication settings from a config * * @param config An OSyncPluginConfig * @returns an OSyncPluginAuthentication with the details ?? or NULL if no authentication configured */ OSYNC_EXPORT OSyncPluginAuthentication *osync_plugin_config_get_authentication(OSyncPluginConfig *config); -/*!@brief Set the authentication configuration +/**@brief Set the authentication configuration * * @param config An OSyncPluginConfig * @param authentication The new authentication settings as an OSyncPluginAuthentication @@ -157,14 +157,14 @@ OSYNC_EXPORT void osync_plugin_config_set_authentication(OSyncPluginConfig *config, OSyncPluginAuthentication *authentication); /* Localization */ -/*!@brief Get the localization settings +/**@brief Get the localization settings * * @param config An OSyncPluginConfig * @returns the localization settings as an OSyncPluginLocalization */ OSYNC_EXPORT OSyncPluginLocalization *osync_plugin_config_get_localization(OSyncPluginConfig *config); -/*!@brief Set the localization settings +/**@brief Set the localization settings * * @param config An OSyncPluginConfig * @param localization An OSyncPluginLocalization containing the new localization settings @@ -172,14 +172,14 @@ OSYNC_EXPORT void osync_plugin_config_set_localization(OSyncPluginConfig *config, OSyncPluginLocalization *localization); /* Resources */ -/*!@brief Get the configured resources +/**@brief Get the configured resources * * @param config An OSyncPluginConfig * @returns a list of OSyncPluginResource */ OSYNC_EXPORT OSyncList *osync_plugin_config_get_resources(OSyncPluginConfig *config); -/*!@brief Find the active resource by object type +/**@brief Find the active resource by object type * * @param config An OSyncPluginConfig * @param objtype the object type to find the active resource for @@ -187,14 +187,14 @@ */ OSYNC_EXPORT OSyncPluginResource *osync_plugin_config_find_active_resource(OSyncPluginConfig *config, const char *objtype); -/*!@brief Add a resource to a config +/**@brief Add a resource to a config * * @param config An OSyncPluginConfig to add to * @param resource An OSyncPluginResource to add to the config */ OSYNC_EXPORT void osync_plugin_config_add_resource(OSyncPluginConfig *config, OSyncPluginResource *resource); -/*!@brief Remove a resource from a config +/**@brief Remove a resource from a config * * @param config An OSyncPluginConfig to remove from * @param resource The OSyncPluginResource to remove @@ -204,14 +204,14 @@ OSYNC_EXPORT void osync_plugin_config_flush_resources(OSyncPluginConfig *config); /* Connection */ -/*!@brief Get the connection settings from a config +/**@brief Get the connection settings from a config * * @param config An OSyncPluginConfig * @returns the connection settings as an OSyncPluginConnection */ OSYNC_EXPORT OSyncPluginConnection *osync_plugin_config_get_connection(OSyncPluginConfig *config); -/*!@brief Set the connection settings in a config +/**@brief Set the connection settings in a config * * @param config An OSyncPluginConfig * @param connection the connection settings as an OSyncPluginConnection Modified: trunk/opensync/plugin/opensync_plugin_connection.h ============================================================================== --- trunk/opensync/plugin/opensync_plugin_connection.h Thu Jan 8 09:15:39 2009 (r5052) +++ trunk/opensync/plugin/opensync_plugin_connection.h Thu Jan 8 11:47:50 2009 (r5053) @@ -23,14 +23,14 @@ /** * @defgroup OSyncPluginConnectionAPI OpenSync Plugin Connection Options - * @ingroup OSyncPublic + * @ingroup OSyncPlugin * @brief Functions to get and set a plugin's connection options * */ /*@{*/ -/*! @brief Connection type support flags +/** @brief Connection type support flags * **/ typedef enum { @@ -48,17 +48,17 @@ OSYNC_PLUGIN_CONNECTION_IRDA = (1 << 4) } OSyncPluginConnectionType; -/*! @brief Connection type +/** @brief Connection type * */ typedef OSyncPluginConnectionType OSyncPluginConnectionSupportedFlag; -/*! @brief Set of OSyncPluginConnectionType values +/** @brief Set of OSyncPluginConnectionType values * */ typedef unsigned int OSyncPluginConnectionSupportedFlags; -/*! @brief Connection option support flags +/** @brief Connection option support flags * */ typedef enum { @@ -90,12 +90,12 @@ OSYNC_PLUGIN_CONNECTION_IRDA_SERVICE = (1 << 12) } OSyncPluginConnectionOptionSupportedFlag; -/*! @brief Set of OSyncPluginConnectionOptionSupportedFlag values +/** @brief Set of OSyncPluginConnectionOptionSupportedFlag values * */ typedef unsigned int OSyncPluginConnectionOptionSupportedFlags; -/*! @brief Create a new OSyncPluginConnection object +/** @brief Create a new OSyncPluginConnection object * * @param error Pointer to an error struct * @returns the newly created object, or NULL in case of an error. @@ -103,14 +103,14 @@ */ OSYNC_EXPORT OSyncPluginConnection *osync_plugin_connection_new(OSyncError **error); -/*! @brief Decrease the reference count on an OSyncPluginConnection object +/** @brief Decrease the reference count on an OSyncPluginConnection object * * @param connection Pointer to the OSyncPluginConnection object * */ OSYNC_EXPORT void osync_plugin_connection_unref(OSyncPluginConnection *connection); -/*! @brief Increase the reference count on an OSyncPluginConnection object +/** @brief Increase the reference count on an OSyncPluginConnection object * * @param connection Pointer to the OSyncPluginConnection object * @returns The OSyncPluginConnection object passed in @@ -119,7 +119,7 @@ OSYNC_EXPORT OSyncPluginConnection *osync_plugin_connection_ref(OSyncPluginConnection *connection); -/*! @brief Get the type of a connection +/** @brief Get the type of a connection * * @param connection Pointer to the OSyncPluginConnection object * @returns The connection type @@ -127,7 +127,7 @@ */ OSYNC_EXPORT OSyncPluginConnectionType osync_plugin_connection_get_type(OSyncPluginConnection *connection); -/*! @brief Set the type of a connection +/** @brief Set the type of a connection * * @param connection Pointer to the OSyncPluginConnection object * @param type The connection type to set @@ -136,7 +136,7 @@ OSYNC_EXPORT void osync_plugin_connection_set_type(OSyncPluginConnection *connection, OSyncPluginConnectionType type); -/*! @brief Check if a type of connection is supported +/** @brief Check if a type of connection is supported * * @param connection Pointer to the OSyncPluginConnection object * @param flag The connection type to check @@ -145,7 +145,7 @@ */ OSYNC_EXPORT osync_bool osync_plugin_connection_is_supported(OSyncPluginConnection *connection, OSyncPluginConnectionSupportedFlag flag); -/*! @brief Set the types of a connection that are supported +/** @brief Set the types of a connection that are supported * * @param connection Pointer to the OSyncPluginConnection object * @param flags The set of connection types to set as supported @@ -154,7 +154,7 @@ OSYNC_EXPORT void osync_plugin_connection_set_supported(OSyncPluginConnection *connection, OSyncPluginConnectionSupportedFlags flags); -/*! @brief Check if a connection option is supported +/** @brief Check if a connection option is supported * * @param connection Pointer to the OSyncPluginConnection object * @param flag The connection option to check @@ -163,7 +163,7 @@ */ OSYNC_EXPORT osync_bool osync_plugin_connection_option_is_supported(OSyncPluginConnection *connection, OSyncPluginConnectionOptionSupportedFlag flag); -/*! @brief Set the connection options that are supported +/** @brief Set the connection options that are supported * * @param connection Pointer to the OSyncPluginConnection object * @param flags The set of connection options to set as supported @@ -174,7 +174,7 @@ /* Bluetooth */ -/*! @brief Get the Bluetooth address +/** @brief Get the Bluetooth address * * @param connection Pointer to the OSyncPluginConnection object * @returns The bluetooth address or NULL if not set @@ -183,7 +183,7 @@ OSYNC_EXPORT const char *osync_plugin_connection_bt_get_addr(OSyncPluginConnection *connection); -/*! @brief Set the Bluetooth address +/** @brief Set the Bluetooth address * * @param connection Pointer to the OSyncPluginConnection object * @param address The bluetooth address to set @@ -191,7 +191,7 @@ */ OSYNC_EXPORT void osync_plugin_connection_bt_set_addr(OSyncPluginConnection *connection, const char *address); -/*! @brief Get the Bluetooth RFCOMM channel +/** @brief Get the Bluetooth RFCOMM channel * * @param connection Pointer to the OSyncPluginConnection object * @returns The RFCOMM channel @@ -199,7 +199,7 @@ */ OSYNC_EXPORT unsigned int osync_plugin_connection_bt_get_channel(OSyncPluginConnection *connection); -/*! @brief Set the Bluetooth RFCOMM channel +/** @brief Set the Bluetooth RFCOMM channel * * @param connection Pointer to the OSyncPluginConnection object * @param channel The RFCOMM channel to set @@ -208,7 +208,7 @@ OSYNC_EXPORT void osync_plugin_connection_bt_set_channel(OSyncPluginConnection *connection, unsigned int channel); -/*! @brief Get the Bluetooth SDP UUID +/** @brief Get the Bluetooth SDP UUID * * @param connection Pointer to the OSyncPluginConnection object * @returns The SDP UUID or NULL if not set @@ -216,7 +216,7 @@ */ OSYNC_EXPORT const char *osync_plugin_connection_bt_get_sdpuuid(OSyncPluginConnection *connection); -/*! @brief Set the Bluetooth SDP UUID +/** @brief Set the Bluetooth SDP UUID * * @param connection Pointer to the OSyncPluginConnection object * @param sdpuuid The SDP UUID to set @@ -226,7 +226,7 @@ /* USB */ -/*! @brief Get the USB vendor ID +/** @brief Get the USB vendor ID * * @param connection Pointer to the OSyncPluginConnection object * @returns The USB vendor ID @@ -234,7 +234,7 @@ */ OSYNC_EXPORT const char *osync_plugin_connection_usb_get_vendorid(OSyncPluginConnection *connection); -/*! @brief Set the USB vendor ID +/** @brief Set the USB vendor ID * * @param connection Pointer to the OSyncPluginConnection object * @param vendorid The USB vendor ID to set @@ -243,7 +243,7 @@ OSYNC_EXPORT void osync_plugin_connection_usb_set_vendorid(OSyncPluginConnection *connection, const char *vendorid); -/*! @brief Get the USB product ID +/** @brief Get the USB product ID * * @param connection Pointer to the OSyncPluginConnection object * @returns The USB product ID @@ -251,7 +251,7 @@ */ OSYNC_EXPORT const char *osync_plugin_connection_usb_get_productid(OSyncPluginConnection *connection); -/*! @brief Set the USB product ID +/** @brief Set the USB product ID * * @param connection Pointer to the OSyncPluginConnection object * @param productid The USB product ID to set @@ -260,7 +260,7 @@ OSYNC_EXPORT void osync_plugin_connection_usb_set_productid(OSyncPluginConnection *connection, const char *productid); -/*! @brief Get the USB interface number +/** @brief Get the USB interface number * * @param connection Pointer to the OSyncPluginConnection object * @returns The USB interface number @@ -268,7 +268,7 @@ */ OSYNC_EXPORT unsigned int osync_plugin_connection_usb_get_interface(OSyncPluginConnection *connection); -/*! @brief Set the USB interface number +/** @brief Set the USB interface number * * @param connection Pointer to the OSyncPluginConnection object * @param interf The USB interface number to set @@ -279,7 +279,7 @@ /* Network */ -/*! @brief Get the network address (IP address or hostname) +/** @brief Get the network address (IP address or hostname) * * @param connection Pointer to the OSyncPluginConnection object * @returns The network address @@ -287,7 +287,7 @@ */ OSYNC_EXPORT const char *osync_plugin_connection_net_get_address(OSyncPluginConnection *connection); -/*! @brief Set the network address (IP address or hostname) +/** @brief Set the network address (IP address or hostname) * * @param connection Pointer to the OSyncPluginConnection object * @param address The network address to set @@ -296,7 +296,7 @@ OSYNC_EXPORT void osync_plugin_connection_net_set_address(OSyncPluginConnection *connection, const char *address); -/*! @brief Get the network port +/** @brief Get the network port * * @param connection Pointer to the OSyncPluginConnection object * @returns The network port @@ -304,7 +304,7 @@ */ OSYNC_EXPORT unsigned int osync_plugin_connection_net_get_port(OSyncPluginConnection *connection); -/*! @brief Set the network port +/** @brief Set the network port * * @param connection Pointer to the OSyncPluginConnection object * @param port The network port to set @@ -313,7 +313,7 @@ OSYNC_EXPORT void osync_plugin_connection_net_set_port(OSyncPluginConnection *connection, unsigned int port); -/*! @brief Get the network protocol +/** @brief Get the network protocol * * @param connection Pointer to the OSyncPluginConnection object * @returns The network protocol @@ -321,7 +321,7 @@ */ OSYNC_EXPORT const char *osync_plugin_connection_net_get_protocol(OSyncPluginConnection *connection); -/*! @brief Set the network protocol +/** @brief Set the network protocol * * @param connection Pointer to the OSyncPluginConnection object * @param protocol The network protocol to set @@ -330,7 +330,7 @@ OSYNC_EXPORT void osync_plugin_connection_net_set_protocol(OSyncPluginConnection *connection, const char *protocol); -/*! @brief Get the network DNS-SD service type +/** @brief Get the network DNS-SD service type * * @param connection Pointer to the OSyncPluginConnection object * @returns The DNS-SD service type or NULL if not set @@ -338,7 +338,7 @@ */ OSYNC_EXPORT const char *osync_plugin_connection_net_get_dnssd(OSyncPluginConnection *connection); -/*! @brief Set the network DNS-SD service type +/** @brief Set the network DNS-SD service type * * @param connection Pointer to the OSyncPluginConnection object * @param dnssd The DNS-SD service type to set @@ -349,7 +349,7 @@ /* Serial */ -/*! @brief Get the serial port speed +/** @brief Get the serial port speed * * @param connection Pointer to the OSyncPluginConnection object * @returns The serial port speed, in bps @@ -357,7 +357,7 @@ */ OSYNC_EXPORT unsigned int osync_plugin_connection_serial_get_speed(OSyncPluginConnection *connection); -/*! @brief Set the serial port speed +/** @brief Set the serial port speed * * @param connection Pointer to the OSyncPluginConnection object * @param speed The serial port speed to set, in bps @@ -366,7 +366,7 @@ OSYNC_EXPORT void osync_plugin_connection_serial_set_speed(OSyncPluginConnection *connection, unsigned int speed); -/*! @brief Get the serial port device +/** @brief Get the serial port device * * The serial port device node, eg. /dev/ttyS0, /dev/ttyUSB0 etc. * @@ -376,7 +376,7 @@ */ OSYNC_EXPORT const char *osync_plugin_connection_serial_get_devicenode(OSyncPluginConnection *connection); -/*! @brief Set the serial port device +/** @brief Set the serial port device * * The serial port device node, eg. /dev/ttyS0, /dev/ttyUSB0 etc. * @@ -389,7 +389,7 @@ /* IrDA */ -/*! @brief Get the IrDA identifier (service) string +/** @brief Get the IrDA identifier (service) string * * @param connection Pointer to the OSyncPluginConnection object * @returns The IrDA service string @@ -397,7 +397,7 @@ */ OSYNC_EXPORT const char *osync_plugin_connection_irda_get_service(OSyncPluginConnection *connection); -/*! @brief Set the IrDA identifier (service) string +/** @brief Set the IrDA identifier (service) string * * @param connection Pointer to the OSyncPluginConnection object * @param irdaservice The IrDA service string to set Modified: trunk/opensync/plugin/opensync_plugin_env.h ============================================================================== --- trunk/opensync/plugin/opensync_plugin_env.h Thu Jan 8 09:15:39 2009 (r5052) +++ trunk/opensync/plugin/opensync_plugin_env.h Thu Jan 8 11:47:50 2009 (r5053) @@ -31,14 +31,14 @@ /** * @defgroup OSyncPluginEnvAPI OpenSync Environment - * @ingroup OSyncPublic + * @ingroup OSyncPlugin * @brief The public API of the opensync environment * */ /*@{*/ -/*! @brief This will create a new opensync environment +/** @brief This will create a new opensync environment * * The environment will hold all information about plugins, groups etc * @@ -47,7 +47,7 @@ */ OSYNC_EXPORT OSyncPluginEnv *osync_plugin_env_new(OSyncError **error); -/*! @brief Increases the reference counton an opensync plugin environment +/** @brief Increases the reference counton an opensync plugin environment * * The reference count on the OSyncPluginEnv is incremented. When the * reference is no longer needed it should be removed with @@ -58,7 +58,7 @@ */ OSYNC_EXPORT OSyncPluginEnv *osync_plugin_env_ref(OSyncPluginEnv *env); -/*! @brief Removes a reference to an OSyncPluginEnv +/** @brief Removes a reference to an OSyncPluginEnv * * Decrements the reference count on an osync plugin environment. If * the reference count reaches zero the environment is freed and all @@ -69,7 +69,7 @@ */ OSYNC_EXPORT void osync_plugin_env_unref(OSyncPluginEnv *env); -/*! @brief Loads the sync modules from a given directory +/** @brief Loads the sync modules from a given directory * * Loads all sync modules from a directory into a osync environment * @@ -82,7 +82,7 @@ OSYNC_EXPORT osync_bool osync_plugin_env_load(OSyncPluginEnv *env, const char *path, OSyncError **error); -/*! @brief Register plugin to plugin environment +/** @brief Register plugin to plugin environment * * @param env Pointer to a plugin environment * @param plugin Pointer to plugin which should get added to environment @@ -90,7 +90,7 @@ */ OSYNC_EXPORT void osync_plugin_env_register_plugin(OSyncPluginEnv *env, OSyncPlugin *plugin); -/*! @brief Finds the plugin with the given name +/** @brief Finds the plugin with the given name * * Finds the plugin with the given name * @@ -101,7 +101,7 @@ */ OSYNC_EXPORT OSyncPlugin *osync_plugin_env_find_plugin(OSyncPluginEnv *env, const char *name); -/*! @brief Returns the number of loaded plugins +/** @brief Returns the number of loaded plugins * * Returns the number of loaded plugins. 0 if used before initialization * @@ -111,7 +111,7 @@ */ OSYNC_EXPORT int osync_plugin_env_num_plugins(OSyncPluginEnv *env); -/*! @brief Returns pointer to nth plugin +/** @brief Returns pointer to nth plugin * * Returns pointer to nth plugin * Modified: trunk/opensync/plugin/opensync_plugin_info.h ============================================================================== --- trunk/opensync/plugin/opensync_plugin_info.h Thu Jan 8 09:15:39 2009 (r5052) +++ trunk/opensync/plugin/opensync_plugin_info.h Thu Jan 8 11:47:50 2009 (r5053) @@ -23,28 +23,29 @@ /** * @defgroup OSyncPluginInfoAPI OpenSync Plugin Info - * @ingroup OSyncPublic + * @ingroup OSyncPlugin * @brief Functions to get and set information about a plugin * */ + /*@{*/ -/*! @brief Create a new plugin info object +/** @brief Create a new plugin info object * * @param error Pointer to an error struct * @returns the newly registered plugin info object */ OSYNC_EXPORT OSyncPluginInfo *osync_plugin_info_new(OSyncError **error); -/*! @brief Increase the reference count on a plugin info object +/** @brief Increase the reference count on a plugin info object * * @param info Pointer to the plugin info object * */ OSYNC_EXPORT OSyncPluginInfo *osync_plugin_info_ref(OSyncPluginInfo *info); -/*! @brief Decrease the reference count on a plugin info object +/** @brief Decrease the reference count on a plugin info object * * @param info Pointer to the plugin info object * @@ -52,7 +53,7 @@ OSYNC_EXPORT void osync_plugin_info_unref(OSyncPluginInfo *info); -/*! @brief Set reference to loop for the specific plugin +/** @brief Set reference to loop for the specific plugin * * @param info Pointer to the plugin info object * @param loop Pointer to the loop which get set for specified OSyncPluginInfo object @@ -60,7 +61,7 @@ */ OSYNC_EXPORT void osync_plugin_info_set_loop(OSyncPluginInfo *info, void *loop); -/*! @brief Get loop reference of OSyncPluginInfo object +/** @brief Get loop reference of OSyncPluginInfo object * * @param info Pointer to the plugin info object * @returns Reference to the loop of the OSyncPluginInfo object @@ -68,14 +69,14 @@ OSYNC_EXPORT void *osync_plugin_info_get_loop(OSyncPluginInfo *info); -/*! @brief Set the plugin configuration data +/** @brief Set the plugin configuration data * * @param info Pointer to the plugin info object * @param config Plugin configuration */ OSYNC_EXPORT void osync_plugin_info_set_config(OSyncPluginInfo *info, OSyncPluginConfig *config); -/*! @brief Returns the plugin configuration data +/** @brief Returns the plugin configuration data * * @param info Pointer to the plugin info object * @returns the plugin configuration data (null-terminated string) @@ -84,7 +85,7 @@ OSYNC_EXPORT OSyncPluginConfig *osync_plugin_info_get_config(OSyncPluginInfo *info); -/*! @brief Set plugin configuration directory +/** @brief Set plugin configuration directory * * @param info Pointer to the plugin info object * @param configdir Configuration directory to set @@ -92,7 +93,7 @@ */ OSYNC_EXPORT void osync_plugin_info_set_configdir(OSyncPluginInfo *info, const char *configdir); -/*! @brief Returns the plugin configuration directory +/** @brief Returns the plugin configuration directory * * @param info Pointer to the plugin info object * @returns the full path where configuration files for the plugin are stored @@ -101,7 +102,7 @@ OSYNC_EXPORT const char *osync_plugin_info_get_configdir(OSyncPluginInfo *info); -/*! @brief Find ObjTypeSink of corresponding Object Type in OSyncPluginInfo object +/** @brief Find ObjTypeSink of corresponding Object Type in OSyncPluginInfo object * * @param info Pointer to the OSyncPluginInfo object * @param name Name of the Object Type @@ -110,7 +111,7 @@ */ OSYNC_EXPORT OSyncObjTypeSink *osync_plugin_info_find_objtype(OSyncPluginInfo *info, const char *name); -/*! @brief Adds an object type (sink) to a plugin +/** @... [truncated message content] |