summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2010-05-23avoid warnings, they are treated as errors in SyncEvolution buildssimpletypePatrick Ohly1-2/+2
2010-05-23GZones: only call finalizeSystemZoneDefinitions() oncePatrick Ohly2-1/+7
This happened to be called several times in SyncEvolution, which reads two separate XML configs (a preliminary one, then a complete one with data stores) and thus ended up calling GZones::loggingStarted() twice. Calling GZones::loggingStarted() is right, so this patch puts an if check into that function instead of its callers.
2010-05-15Engine 3.4.0.8: Added rawdataitemtype (passes SyncML data 1:1 to DBAPI)Lukas Zeller5-47/+391
Implementation: a new pair of .cpp/.h: rawdataitemtype plus making the new type known to syncappbase. Notes: - TRawDataItemType is a direct descendant of TMultiFieldItemType; as such, it works DB-wise exactly like all the other known datatypes. - It must <use> a <fieldlist> which must contain one field named "ITEMDATA". This field could be any type, but only BLOB or string make sense. - "Parsing" an item consists of copying the SyncML <Data> content 1:1 (except for <zippedbindata> and <unicodedata> special transforms, which still apply when enabled) into the ITEMDATA field. - "Generating" an item consists of copying the content of ITEMDATA field 1:1 (except for <zippedbindata> and <unicodedata> special transforms, which still apply when enabled) into the SyncML <Data> content. - "raw" data items can't generate CTCap at this time. This could be added by having the DB plugin provide a CTCap list or reading a CTCap definition from the config. - CTCap received is ignored. Sample Configuration -------------------- Notes: - the dummy field is just there to show that datatype scripts can be used like in MIMEDIR items - the essential parameter is the basetype="raw". - Note that <use> must reference a <fieldlist>, not a <profile> <datatypes> <!-- list of internal fields representing raw data --> <fieldlist name="rawitem"> <field name="dummy" type="string" compare="never"/> <field name="ITEMDATA" type="string" compare="never"/> </fieldlist> <datatype name="vcard21" basetype="raw"> <use fieldlist="rawitem"/> <typestring>text/x-vcard</typestring> <versionstring>2.1</versionstring> <incomingscript><![CDATA[ dummy = "this is a dummy!"; DEBUGSHOWITEM(); ]]></incomingscript> <outgoingscript><![CDATA[ DEBUGSHOWITEM(); ]]></outgoingscript> </datatype> </datatypes> and further down the (textdb) datastore: <datastore name="rawcontacts" type="plugin"> <plugin_module>[SDK_textdb]</plugin_module> <plugin_datastoreadmin>yes</plugin_datastoreadmin> <datacharset>UTF-8</datacharset> <datalineends>unix</datalineends> <storesyncidentifiers>yes</storesyncidentifiers> <resumesupport>yes</resumesupport> <resumeitemsupport>yes</resumeitemsupport> <!-- Mapping of the fields to the fieldlist "contacts" --> <fieldmap fieldlist="rawitem"> <automap indexasname="true"/> </fieldmap> <!-- datatypes supported by this datastore --> <typesupport> <use datatype="vcard21" mode="rw" preferred="yes"/> </typesupport> </datastore>
2010-05-15Source-Linked Logs: fixed to work with older monolithic Synthesis targets as ↵Lukas Zeller3-41/+52
well TDBG_LOCATION_xxx macros must be defined in sysync_debug.h because in some C-only files, debuglogger.h cannot be included. Note that actually using SYDEBUG_LOCATION in a monolithic build would still not work because SYDEBUG_LOCATION relies on a constructor for a struct which does not exist in plain C. But this does no harm as SYDEBUG_LOCATION is not required in any of the classical builds.
2010-05-13Source-Linked Logs: added ifdef to compile without SYDEBUG_LOCATION againLukas Zeller1-0/+2
2010-05-13Merge remote branch 'moblin/doxygen' into luzLukas Zeller2-3/+25
Note: most of moblin/doxygen changes were already cherry-picked onto luz, only 58f19738bd (VTIMEZONEtoTZEntry(): flagged failure incorrectly for VTIMEZONE without summer saving) was missing. Conflicts: src/platform_adapters/linux/platform_timezones.cpp src/sysync/debuglogger.cpp src/sysync/debuglogger.h src/sysync/timezones.cpp src/sysync/timezones.h
2010-05-13Source-Linked Logs: added more options, now can also create txmt://-links ↵Lukas Zeller5-62/+181
that open BBEdit or TextMate - timestamps on all log messages is no longer required for source links. If there is no timestamp to show, the logger will now insert a small "[src]" prefix instead when source links are enabled. - <sourcelink> (within <debug>) can be one of "none" (default), "hint", "txmt", "doxygen". "hint" only creates a non-active link with a title showing file/line/function "txtm" creates links that open the file and position the cursor in MacOS X BBedit or TextMate code editors "doxygen" behaves as in Patrick's original version - <sourcebase> can be used to set a base path prefix for generating source links. It defaults to the value compiled in with SYDEBUG_LOCATION.
2010-05-13Source-Linked Logs: record and link call location of debug messages in ↵Patrick Ohly9-130/+243
(HTML) log files For someone unfamiliar with the source code, it is sometimes hard to locate the code which produced a certain message. This patch solves this issue like this: - produce a fully cross-referenced HTML version of the source with Doxygen - extend the logging functions and macros so that each message comes with file name, line number and function name information - turn the time stamp in the HTML output into a link to the source code line, with the function name as title The reason for picking the time stamp was that making other text a link would interfere with the visual markup of it (color, bold, etc.). In such an enriched log one can: - hover over the time stamp to see function name in a bubble help and the URL (and thus source code location) at the bottom of the browser window (at least in Firefox) - click on the time stamp to jump to the source code Because this feature makes both the library and the logs larger, it is turned off by default. Configure with --enable-debug-logs to enable it when using autotools. Macro tricks are used to produce the same code as before when the feature is off. Limitations: - Without time stamp logging, no links are recorded. - Each change in the Synthesis source code forces a complete new run of Doxygen. This makes compilation quite a bit slower, but the only alternative would be to accept that logs and source dump are inconsistent in the changed parts. - The links contain the absolute file path (making it a bit harder to share logs and source code dumps). - The TClientEngineInterface::debugPuts() API introduced for and used by SyncEvolution leads to links which contain the wrong absolute path to the Doxygen HTML files (inside libsynthesis instead of SyncEvolution). - The "prefix" parameter in that same API is still ignored.
2010-05-13Source-Linked Logs: Doxyfile: generic one without modificationsPatrick Ohly1-0/+1417
Straight from doxygen -g without manual modifications.
2010-05-13TZ init: some cleanup and updates for non-Linux platformsLukas Zeller3-57/+13
This is a followup patch to integrate Patrick's time zone logging related changes. No functional changes, only naming, comments, missing routines in non-Linux platform adapters etc.
2010-05-13TZ init: split initialisation of system time zone list into two parts (basic ↵Patrick Ohly5-6/+39
usability of TZ system must be ready before config reading, extra TZ retrieved from system can be added later) Previously, all parsing of system time zone information was done in the TSyncAppBase constructor. This had two problems: 1. failure to parse couldn't be reported to app (as mentioned in a TODO) 2. logging in this fairly complex code was impossible, because the logger was not initialized yet This patch adds a finishConfig() callback and uses it to invoke a second global time zone initialisation function. On Linux, that function is used to add the libical time zone definitions and logs them at the same time. Builtin time zones are still added at appBase construction time, before parsing the config, such that a basic TZ environment is available already during config parsing. TZ that only get added in the second init run of course cannot be referenced in the config file (but that is unlikely to be required at all).
2010-05-13fixed compiler warning on 64 bit: printf %llX size mismatchPatrick Ohly1-1/+1
2010-05-13time zone matching: added debug and error loggingPatrick Ohly3-10/+33
Previously, failures in VTIMEZONEtoTZEntry() were ignored. VTIMEZONEtoInternal() then continued with incomplete information, typically leading to wrong results. This patch adds an error message and debug logging. The error message makes it obvious that something went wrong. The debug logging is necessary to debug more subtle problems.
2010-05-13Linux platform time zones: added debug outputPatrick Ohly1-4/+18
This patch adds debug output at level EXOTIC for parsing the time zone information in libical. It depends on the previous patches (NULL check in PLOGDEBUG*, calling time zone parsing after config reading).
2010-05-12log call location of debug messagesdoxygenPatrick Ohly10-130/+251
For someone unfamiliar with the source code, it is sometimes hard to locate the code which produced a certain message. This patch solves this issue like this: - produce a fully cross-referenced HTML version of the source with Doxygen - extend the logging functions and macros so that each message comes with file name, line number and function name information - turn the time stamp in the HTML output into a link to the source code line, with the function name as title The reason for picking the time stamp was that making other text a link would interfere with the visual markup of it (color, bold, etc.). In such an enriched log one can: - hover over the time stamp to see function name in a bubble help and the URL (and thus source code location) at the bottom of the browser window (at least in Firefox) - click on the time stamp to jump to the source code Because this feature makes both the library and the logs larger, it is turned off by default. Configure with --enable-debug-logs to enable it when using autotools. Macro tricks are used to produce the same code as before when the feature is off. Limitations: - Without time stamp logging, no links are recorded. - Each change in the Synthesis source code forces a complete new run of Doxygen. This makes compilation quite a bit slower, but the only alternative would be to accept that logs and source dump are inconsistent in the changed parts. - The links contain the absolute file path (making it a bit harder to share logs and source code dumps). - The TClientEngineInterface::debugPuts() API introduced for and used by SyncEvolution leads to links which contain the wrong absolute path to the Doxygen HTML files (inside libsynthesis instead of SyncEvolution). - The "prefix" parameter in that same API is still ignored.
2010-05-12Doxyfile: generic one without modificationsPatrick Ohly1-0/+1417
Straight from doxygen -g without manual modifications.
2010-05-12VTIMEZONEtoTZEntry(): flagged failure incorrectly for VTIMEZONE without ↵Patrick Ohly1-3/+17
summer saving Parsing a VTIMEZONE with only a STANDARD entry returned a "false" value for two reasons: - no DAYLIGHT rules found - no RRULE in STANDARD component This patch detects these cases and treats them explicitly like the code before did implicitly (clear change rules for the DAYLIGHT and STANDARD parts) without returning an error.
2010-05-11time zone init and logging: split into part before and after config parsingPatrick Ohly4-8/+30
This patch reverts the "move system time zone parsing after config reading" part of commit fc000b0f45. As Lukas pointed out, config parsing already depends on time zones, for example for <definetimezone>. But this patch keeps the finishConfig() callback and uses it to invoke a second global time zone function. On Linux, that function is used to add the libical time zone definitions and logs them at the same time. Builtin time zones are added at the original time, before parsing the config. This is a compromise between having no time zones while parsing the config and not logging the libical time zones. It works for SyncEvolution, because it doesn't reference the additional time zones in the config.
2010-05-10fixed compiler warning on 64 bit: printf %llX size mismatchPatrick Ohly1-1/+1
2010-05-10time zone matching: added debug and error loggingPatrick Ohly3-10/+33
Previously, failures in VTIMEZONEtoTZEntry() were ignored. VTIMEZONEtoInternal() then continued with incomplete information, typically leading to wrong results. This patch adds an error message and debug logging. The error message makes it obvious that something went wrong. The debug logging is necessary to debug more subtle problems.
2010-05-10Linux platform time zones: added debug outputPatrick Ohly1-4/+18
This patch adds debug output at level EXOTIC for parsing the time zone information in libical. It depends on the previous patches (NULL check in PLOGDEBUG*, calling time zone parsing after config reading).
2010-05-10TSyncAppBase: moved system time zone parsing after config readingPatrick Ohly2-5/+16
Previously, fAppZones.initialize() and thus parsing of system time zone information was done in the TSyncAppBase constructor. This had two problems: 1. failure to parse couldn't be reported to app (as mentioned in a TODO) 2. logging in this fairly complex code was impossible, because the logger was not initialized yet This patch moves the initialize() call after config reading. There are two such places, one for a real XML config and one for a hard-coded one. The common code is in the new finishConfig() method, which is only invoked if there was no previous error and then provides the final return code for config reading. Like some other code it sets the error in the config as well as returning a LOCERR_CFGREAD.
2010-05-07rrules: cosmetics for debug and formattingLukas Zeller1-105/+73
2010-05-07VTIMEZONE conversion: added logging so we can see what's happening (RRULE ↵Lukas Zeller2-2/+2
parsing)
2010-05-07engine debug: enhanced LOGDEBUG... macros (made safe against logger==NULL), ↵Lukas Zeller1-11/+15
added LOGDEBUGTEST
2010-05-07engine: fixed problems with new progress events (many errors in targets w/o ↵Lukas Zeller1-1/+1
progress events) - definition of DB_PROGRESS_EVENT in case of disabled progress events was incorrect - some occurrences of app-level events were not yet using the new APP_PROGRESS_EVENT macro.
2010-05-07engine: enhanced RRULE parsing such that it can accept YEARLY rules with ↵Lukas Zeller3-166/+93
BYMONTH and BYDAY with a start date that is not an occurrence (happens in some 3rd party VTIMEZONE) - enhanced RRULE2toInternal by adding an optional aNewStartP paramteter. If set, the conversion might decide to return an adjusted DTSTART date. - Made vtimezone.cpp use the new RRULE2toInternal parameter, such that it will understand VTIMEZONE having a FREQ=YEARLY, BYMONTH=x, BYDAY=y rule with a DTSTART that is *not* one of the occurrences of the rule. - unified formatting style a little bit (deJavaized)
2010-05-07engine: configvars can now be unset (undefined) by writing VALTYPE_NULL to themLukas Zeller3-1/+20
2010-04-30Cosmetic whitespace changesLukas Zeller1-20/+20
2010-04-30- Android gets system timezone correctly now - Get Olson timezone names for ↵Beat Forster4-16/+55
Android - HST/HPT added at tz_table.h (Honolulu)
2010-04-30new mode PROFILEFLAG_MSGNEXTSYNC addedBeat Forster1-2/+4
2010-04-30Android reporting more specific for ConsolePrintfBeat Forster2-2/+35
2010-04-30DBAPI SDK: AsKey interface for Load/SaveAdminData (ADMIN_AS_KEY)Beat Forster3-4/+20
Note: API is only prepared, but not yet available in the engine at this time
2010-04-30Android: Display config errorsBeat Forster1-0/+4
2010-04-30Merge remote branch 'refs/remotes/moblin/mb7838' into luzLukas Zeller2-1/+2
2010-04-30engine 3.4.0.7: Progress events now session local and available for server ↵Lukas Zeller15-251/+276
sessions - new macros for generating progress events - in engine builds, progress events are strictly session local now and are directly delivered via SessionStep. - in monolithic builds, progress events are still passed down to the app level and delivered via a app level callback as in previous versions.
2010-04-30engine: added support for free demo period after first use without needing ↵Lukas Zeller3-23/+67
license
2010-04-30Cosmetic comment fixLukas Zeller1-1/+1
2010-04-13ODBCApiAgent builtin function tablemb7838Chen Congwu1-1/+1
Change BASED_ON_BINFFILE_CLIENT to BINFILE_ALWAYS_ACTIVE so that in combi build server use case, the inherited built in function table (from customagent) should be chained, thus built in functions there can be accessed (AUTHOK in my case).
2010-04-08TConfigElement::endElement(): fixed invalid memory readlibsynthesis_3.4.0.6+syncevolution-1-0-beta-3meego-1.0Patrick Ohly1-0/+1
valgrind reports that fCfgVarExp is uninitialized when being read by endElement(). Not sure how this can happen, because it should be set in startElement(). Set it in constructor, just to be sure that we don't have undeterministic behavior.
2010-03-24smltk+DevInf decoding: avoid a possible infinite loopcongwuChen Congwu1-1/+4
For DevInf 1.1 parsing, DevInf decoding will cause an infinite loop if there is an empty <PropName> tag (found from Nokia N900, Nokia 7210c): eg: <CTCap> <CTType>text/plain</CTType> <PropName/> </CTCap> buildDevInfProperty will return OK without further processing if encountering an empty tag (in this case <PropName>) and the caller buildDevInfCtCap will re-evaluate the tag without advancing the parser, the re-evaluation can only end if current tag is an end tag or an unknown tag, otherwize it will call buildDevInfProperty with exactly the same environment again.
2010-03-24smltk: DevInf decodingChen Congwu1-1/+4
Some Nokia phones (N900) sent a nor-wellformed DevInf: The DevInf version was declared as 1.2, while <CTCAP> was not inside <Datastore>(which is the DevInf 1.1 behaviour). In addition, the content inside <CTCAP> was in DevInf 1.2 format. The original approach detects whether this is a DevInf 1.2 or 1.1 by testing whether <CTCAP> was inside <datastore>, thus will think this is a DevInf 1.1 when decoding the <CTCAP> which fails. The patch worked around this, when decoding <CTCAP> (precisely the <Property> or <PropName> inside <CTCAP>), use 1.2 style if we are decoding <Property> and 1.1 stype when decoding <PropName>
2010-03-22.gitignore: add SDK_EXCLUDE_FILESPatrick Ohly1-0/+1
The recently introduced SDK_EXCLUDE_FILES temporary file in src, used by gen-makefile-am.sh, has to be listed in .gitignore to get a clean "git status" output.
2010-03-19Build: pull blob.h/blob.cpp in libsynthesissdk dynamic buildChen Congwu1-2/+0
This is needed for blob db api, it was previously enabled only libsynthesis engine.
2010-03-18syserial.h: New SYSER_PRODFLAG_CLIENT_APP flaglibsynthesis_3.4.0.6Lukas Zeller1-2/+3
2010-03-18sysync_b64: added b64::free() that can be called to dispose blocks allocated ↵Lukas Zeller10-17/+29
by b64::decode/encode As sysync_b64 was made independent, it can't use sysync_malloc() any more, but uses normal malloc(). However, all blocks allocated and returned by b64::encode/decode were still returned with sysync_free(). This only did not hurt because sysync_free was mapped to free in most (all?) builds. Anyway, that was ugly so sysync_b64 now includes b64::free() to clean up the situation. This patch changes all occurrences of sysync_free() returning blocks allocated by b64:: routines with b64::free().
2010-03-18MIME-DIR "group" feature: fixed extra increment of array index in some casesLukas Zeller1-16/+21
In some cases, the array index was incremented twice, such that an empty row was inserted into the "table" represented by the array fields building a grouped property (like ORG, TITLE and ORG_GROUP).
2010-03-18engine: compilable again without engineinterface and AsKeyLukas Zeller1-0/+2
2010-03-18pluginapids: ReadNextItem can now return error without causing exceptions.Lukas Zeller2-16/+39
In particular, LOCERR_USERSUSPEND can be returned to signal that the plugin has detected a external condition that should suspend the session. All other errors abort the session.
2010-03-18Merge remote branch 'moblin/master' into luzLukas Zeller2-2/+12