From: <svn...@op...> - 2009-09-18 07:04:18
|
Author: bricks Date: Fri Sep 18 09:04:03 2009 New Revision: 5798 URL: http://www.opensync.org/changeset/5798 Log: moved doxygen annotations to private header and renamed private functions to osync_time_xyz Modified: trunk/opensync/format/opensync_time.c trunk/opensync/format/opensync_time_private.h Modified: trunk/opensync/format/opensync_time.c ============================================================================== --- trunk/opensync/format/opensync_time.c Fri Sep 18 08:56:30 2009 (r5797) +++ trunk/opensync/format/opensync_time.c Fri Sep 18 09:04:03 2009 (r5798) @@ -645,7 +645,7 @@ /*****************************************************************************/ -/*! List of vcal fields which have should be converted by following +/** List of vcal fields which have should be converted by following * workaround functions. */ const char *_time_attr[] = { @@ -658,14 +658,7 @@ NULL }; -/** @brief Function converts a UTC vtime stamp to a localtime vtime stamp - * - * @param entry The whole vcal entry as GString which gets modified. - * @param field The field name which should be modified. - * @param toUTC The toggle in which direction we convert. TRUE = convert to UTC - * @param error An OSyncError struct - */ -static void _convert_time_field(GString *entry, const char *field, osync_bool toUTC, OSyncError **error) +static void osync_time_convert_time_field(GString *entry, const char *field, osync_bool toUTC, OSyncError **error) { int i, tzdiff; char *res = NULL; @@ -700,20 +693,13 @@ } } -/** @brief Functions converts timestamps of vcal in localtime or UTC. - * - * @param vcal The vcalendar which has to be converted. - * @param toUTC If TRUE conversion from localtime to UTC. - * @param error An OSyncError struct - * @return timestamp modified vcalendar - */ -char *_convert_entry(const char *vcal, osync_bool toUTC, OSyncError **error) +char *osync_time_convert_entry(const char *vcal, osync_bool toUTC, OSyncError **error) { int i = 0; GString *new_entry = g_string_new(vcal); for (i=0; _time_attr[i] != NULL; i++) - _convert_time_field(new_entry, _time_attr[i], toUTC, error); + osync_time_convert_time_field(new_entry, _time_attr[i], toUTC, error); return g_string_free(new_entry, FALSE); } @@ -721,13 +707,13 @@ char *osync_time_vcal2localtime(const char *vcal, OSyncError **error) { - return _convert_entry(vcal, FALSE, error); + return osync_time_convert_entry(vcal, FALSE, error); } char *osync_time_vcal2utc(const char *vcal, OSyncError **error) { - return _convert_entry(vcal, TRUE, error); + return osync_time_convert_entry(vcal, TRUE, error); } /*****************************************************************************/ Modified: trunk/opensync/format/opensync_time_private.h ============================================================================== --- trunk/opensync/format/opensync_time_private.h Fri Sep 18 08:56:30 2009 (r5797) +++ trunk/opensync/format/opensync_time_private.h Fri Sep 18 09:04:03 2009 (r5798) @@ -23,6 +23,8 @@ #ifndef _OPENSYNC_TIME_PRIVATE_H_ #define _OPENSYNC_TIME_PRIVATE_H_ +#include <glib.h> + /** @brief Function remove dashes from datestamp and colon * * @param timestamp The timestamp which gets cleaned @@ -30,4 +32,22 @@ */ static char *osync_time_timestamp_remove_dash(const char *timestamp); +/** @brief Functions converts timestamps of vcal in localtime or UTC. + * + * @param vcal The vcalendar which has to be converted. + * @param toUTC If TRUE conversion from localtime to UTC. + * @param error An OSyncError struct + * @return timestamp modified vcalendar + */ +char *osync_time_convert_entry(const char *vcal, osync_bool toUTC, OSyncError **error); + +/** @brief Function converts a UTC vtime stamp to a localtime vtime stamp + * + * @param entry The whole vcal entry as GString which gets modified. + * @param field The field name which should be modified. + * @param toUTC The toggle in which direction we convert. TRUE = convert to UTC + * @param error An OSyncError struct + */ +static void osync_time_convert_time_field(GString *entry, const char *field, osync_bool toUTC, OSyncError **error); + #endif /* _OPENSYNC_TIME_PRIVATE_H_ */ |