Andris Pavenis | 21 May 15:43
Picon

libsynthesis and SonyEricsson Xperia S own SyncML client

Tried to test whether synchronization works with Xperia-S own SyncML 
client (comes with Android 2.3.7 installed on phone, software version 
6.0.A.3.73) using custom libsynthesis based SyncML server.

- the first problem was chunked transport encoding use by phone software 
initially not supported by mentioned above server software. It was 
however easy enough to fix.
- the next problem is failure of libsynthesis to get authentication 
information sent by phone extracted from messages. Also decoded incoming 
WBXML messages saved into XML format are corrupt. For unknown reason the 
client tries to synchronize at first without authentication even when 
both user name and password are specified in its configuration. 
Authentication is first provided in second attempt of 4 totally. 3 of 4 
incoming WBXML format packets seems to contain authentication 
information but also wbxml2xml does not show it

I'm including:
- wireshark capture of communications between client and server (local 
WLAN used)
- HTML format logs of all 4 attempts
- WBXML messages and decoded (at least tried) XML messages
- server output which allows to identify the order of SyncML sessions

as attached xz packed tar archive

Last tests was done with current GIT version of libsynthesis from master 
branch.

Andris

(Continue reading)

Patrick Ohly | 25 Apr 15:11
Picon
Picon
Gravatar

scripts + datastore

Hello!

I am trying to solve one issue in SyncEvolution: when trying to find
pairs, it needs to know on a per-datastore basis whether both remote and
local storage have truly unique UID/RECURRENCE-ID that can be relied
upon (iCalendar 2.0 semantic).

So far, I am using a compare script for that, but it has to make
assumptions about the peer. To overcome that I added code that allows
clients to add SyncCap entries to the CTCap (similar to the "can restart
flag"). This information is stored at the receiving end in the
TSyncDataStore base class by the TRemoteDataStore while parsing the
SyncCap (again, very similar to "fCanRestart").

But now my problem is: how can the compare script access that
information?

It runs inside the "datatype context". Does that mean that all
datastores sharing the same type also share the same context and that
the <initscript> for the type is only invoked once?

The script functions in multifielditemtype.cpp (like SYNCOP()) looked
promising. It's possible to get a pointer to some kind of datastore:

TSyncDataStore *related = static_cast<TMultiFieldItemType *>(aFuncContextP->getCallerContext())->getRelatedDatastore();

But in practice that pointer is always NULL. I wasn't sure anyway
whether I would get the pointer to the local or remote datastore.

Any hints?
(Continue reading)

zhou lei | 23 Apr 04:06

Sync server with oracle database

Hi, Lukas


I am working on Funambol server for a week, and it just could not connect to the oracle db. And I am not good at java, and using maven an ant is not that easy. 
And I was think about that, if using the libsynthesis it could be easy, dosen't it?
Is there a usefull demo server for linux ?  If there isn't, how could i make it? 

Thanks
regards
-zhoulei
_______________________________________________
os-libsynthesis mailing list
os-libsynthesis@...
http://lists.synthesis.ch/mailman/listinfo/os-libsynthesis
zhou lei | 1 Apr 04:16

The sync works now. But some other problems about the set value.

Hi, Lukas


I just try it as what to told me to do, and the client works. Thank you very much.

For property "TEL" in the vcard, it just has too many enum values, how could i set the "TEL" value with its enum flags. If only set it by the setstringvaluebyname, It may use the default one, but i want to set it myself.

Thanks
Best Regards
-Zhoulei
_______________________________________________
os-libsynthesis mailing list
os-libsynthesis@...
http://lists.synthesis.ch/mailman/listinfo/os-libsynthesis
Lukas Zeller | 31 Mar 13:14
Picon
Gravatar

Re: os-libsynthesis Digest, Vol 33, Issue 9

Hi Zhoulei,

On Mar 31, 2012, at 11:12 , zhou lei wrote:

> I try to modify "ReadItemAsKey". Using SetValue to set the contacts, and i just guess that "read" mean read
the local contacts and send them to server.

Exactly. The terms in the plugin are all meant towards the database.

> But with the struct fCB in the sample_dbplugin1.mm, just get a error named "EXC_BAD_ACCESS". And I use it
like this "fCB->ui.SetValue( &fCB, aItemKey, "N_FIRST" ,VALTYPE_TEXT, "123131" ,
strlen("123131")); ", the fCB was set when init the "SamplePluginDB1". 

I would really discourage using a mixture of ObjC and parts from the C++ examples. The ObjC wrapper was done
exactly because dealing with the fCB and it's members directly is difficult, and you need to do all the
memory management on your own.

EXC_BAD_ACCESS is a bus error which is hard to debug, especially as two completely different memory
management systems need to cooperate here (ObjC refcounted world with C++/C traditional malloc/free world).

The ObjC wrapper classes however are really simple to use from the ObjC world.

I made a skeleton for the two read* methods to show how to easily access fields from ObjC, without any messing
with fCB, and with automatic conversion from NSString (the SettingsKey also gives you convenience
methods to access dates as NSDate and integers).

- (TSyError)readNextItemAsKey:(SettingsKey *)aItemKey
  itemIdP:(NSString **)aItemIdP parentIdP:(NSString **)aParentIdP
  statusP:(sInt32 *)aStatusP
  isFirst:(BOOL)aFirst
{
  TSyError sta = LOCERR_OK;

  [self debugOut:[NSString stringWithFormat:@"readNextItemAsKey: aFirst=%d", aFirst]];
  // read next item from DB
  if (aFirst) {
    // %%% reset iterator over dataset here
  }
  // get next item
  BOOL found = NO;
  do {
    if (/* %%% no more data items */) {
      *aStatusP = ReadNextItem_EOF;
      break;
    }
    else {
      found = YES;
      // %%% get IDs of records from the database
      //     Note: data is not required at this point, however, if the database is such
      //           that it always reads the data anyway when getting the IDs, the data
      //           CAN be OPTIONALLY read here already (see below)

      NSString *localID = /* %%%% item ID as string */ @"dummyID";
      *aItemIdP = localID;

      // %%% find out if it has modified since last time
      if (/* %%% modified since last suspend */)
        *aStatusP = ReadNextItem_Resumed; // changed since last resume (implies changed since last sync also)
      else if (/* %%% modified since last completed sync session */)
        *aStatusP = ReadNextItem_Changed; // changed since last sync (but NOT since last resume)
      else
        *aStatusP = ReadNextItem_Unchanged; // not changed, but caller wants to see all records

      // %%% optionally, you can ready actual item data from the DB here and return it. If you don't deliver
      //     data here, the engine will later call readItemAsKey to get the data

      // %%% just set some sample properties
      // - simple strings
      [aItemKey setStringValueByName:"N_FIRST" toValue:/* dummy first name */ @"Theodor"];
      [aItemKey setStringValueByName:"N_LAST" toValue:/* dummy last name */ @"Tester"];

      // - strings in an array
      sInt32 telFieldID = [aItemKey valueIDByName:"TEL"];
      for (int i=0; i<3; i++) {
        [aItemKey setStringValueByID:telFieldID arrayIndex:i toValue:/* dummy TEL */ @"12345 78 90"];
      }

      // %%% advance iterator to next item (such that next item will be delivered on next call to reasNextItemAsKey
    }
  } while (!found);
  // done
  return sta;
}

- (TSyError)readItemAsKey:(SettingsKey *)aItemKey
  itemID:(NSString *)aItemID parentID:(NSString *)aParentID
{
  TSyError sta = LOCERR_OK;

  [self debugOut:[NSString stringWithFormat:
    @"readItemAsKey: itemID=%@ parentID=%@",
    aItemID, aParentID
  ]];

  // %%% read item identified by NSString in aItemID from DB

  if (/* %%% found item with ID aItemID*/) {

    // %%% just set some sample properties
    // - simple strings
    [aItemKey setStringValueByName:"N_FIRST" toValue:/* dummy first name */ @"Theodor"];
    [aItemKey setStringValueByName:"N_LAST" toValue:/* dummy last name */ @"Tester"];

    // - strings in an array
    sInt32 telFieldID = [aItemKey valueIDByName:"TEL"];
    for (int i=0; i<3; i++) {
      [aItemKey setStringValueByID:telFieldID arrayIndex:i toValue:/* dummy TEL */ @"12345 78 90"];
    }

  }
  else {
    // item not found
    sta = DB_NotFound;
  }
  // done
  return sta;
}

Best Regards,

Lukas

PS: please make sure to Cc: your replies to the mailing list (Synthesis
<os-libsynthesis@...>) as well, and not only to me, so
everyone on the list can follow the conversation.
Lukas Zeller | 29 Mar 11:32
Picon
Gravatar

Re: os-libsynthesis Digest, Vol 33, Issue 9

Hi Zhoulei,

On Mar 29, 2012, at 5:45 , zhou lei wrote:

> In the configure XML file, I set the datastore name to "contacts" which is named "test_contacts" before.
And in it, change the displayname to "contacts", set the plugin_module to "iPhone_dbplugin1" which is
named "SDK_textdb". Is that correct?

That's correct. However, I tried it myself and as you found, there's still that Error 20010, which means
that something is wrong in the XML config.
Unfortunately, the sample app did not output the config error messages to the console as it should have. I
fixed this, please see the lastest commit in the luz branch on gitorious (the config variable
"conferrpath" must be set to "console"). With this, the XCode debug console shows what is the problem:

 Fatal: Module does not understand params passed in <plugin_params>

This is because the sample uses the <datafilepath> <plugin_param>, which is specific to the SDK_textdb
plugin, and is not understood by the dummy plugins. So just comment out or remove the entire
<plugin_param>, and the sync engine will initialize correctly.

In the same commit, I also added a line to enable syncml engine logs to tmp/sysynclogs for DEBUG builds, so it
is easier to get started with the sample and see what the SyncML engine is doing.

> When i using the sqlite, i found out that there is no place to set the key "prefs_path",

The prefs_path just returns the default directory for the platform to store preferences, so you can use it
in the XML config or your app to avoid hard-coded paths. 

> and in the sdk document, so should i set it as a defout path to create a SQLite db file?

You just need to set the <sqlitefile> to a path where your SQLite database is. You could use the
$(prefs_path) variable to specifiy that path relative to the default preferences location, but you can
also use a absolute path. The SyncMLClient class defines a config variable called $(sandbox) to contain
the App's sandbox directory, because that's usually the starting point you need.

So usually you would define the SQLlite file like:

  <sqlitefile expand="yes">$(sandbox)/Library/mydatafile.sqlitedb</sqlitefile>

> And is there any document for the SQL columns'name for sync. There are too many columns in the
sunbird_client.xml, like "id" "recurrence_id" last_modified. Is there a really demo, that could work
with contacts?

The entire point in libsynthesis is that you can adapt it to your own databases.
If the sync should be with one of the iOS built-in data sources, there are the (quite complex) commerical
plugins for iOS contacts and iOS calendar.

If you want to design your own address book, it's up to you to design an alternate address book database.

> This demo is hardly to read. And may takes a long time to understand what you really want to show to us.

Sync is complex - there's no easy way. SyncML sync is also a niche, and the iOS opensourcing is quite new. I
admit that there's no good tutorial yet, but then, this is OpenSource and anyone is welcome to contribute
more samples and docs. If I had to write step by step tutorials myself before opensourcing it,
libsynthesis wouldn't be opensource yet. What I'm providing is 10 years of condensed SyncML knowhow, in a
library that hides a huge amount of complexity from the user, but still admittedly remains non-trivial,
and thus needs some diggin in to learn.

> Maybe it is easy for you guys to write out a dbplugin or something else, but one guy should know how to set
configure xml file, should know how to write a dbplugin, and how to make it runs in the right way, and when it
goes wrong he should know where is wrong. Don't know why you guys don't give a demo that could really work on
ios, and can do a sync, even for only one contacts or other things.

The demo as provided does work on iOS, and as you see I try to improve it to make it more accessible and easier to
modify. However, I do this unpaid, and writing all that you seem to expect to just be there would take a lot of
time. Opensource works by everyone contributing to a project what he or she thinks is missing, not by one
party providing everything for everyone else to use for free.
zhou lei | 28 Mar 05:47

Re: os-libsynthesis Digest, Vol 33, Issue 9

Hi, Lukas


If the google sync is not the good one,  which sync server would be better?
If i set the plugin_module to "iPhone_dbplugin1" the client get a 20010 error code.why?
You told me that just modify the code in the sample_dbplugin1.mm.,like "readItemAsKey". But I found out that, the functions would never been called in the class of "SamplePluginDB1", even the class "SamplePluginDB1" never init by the engine. 

Thanks
Regards
-Zhoulei

2012/3/23 <os-libsynthesis-request-zhcxFSZdvaOWpB8AXVHUkA@public.gmane.org>
Send os-libsynthesis mailing list submissions to
       os-libsynthesis-zhcxFSZdvaOWpB8AXVHUkA@public.gmane.org

To subscribe or unsubscribe via the World Wide Web, visit
       http://lists.synthesis.ch/mailman/listinfo/os-libsynthesis
or, via email, send a message with subject or body 'help' to
       os-libsynthesis-request-zhcxFSZdvaOWpB8AXVHUkA@public.gmane.org

You can reach the person managing the list at
       os-libsynthesis-owner-zhcxFSZdvaOWpB8AXVHUkA@public.gmane.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of os-libsynthesis digest..."


Today's Topics:

  1. Re: what's deference between dbplugin for cocoa   and for cpp
     (Lukas Zeller)
  2. Re: os-libsynthesis Digest, Vol 33, Issue 6 (Lukas Zeller)


----------------------------------------------------------------------

Message: 1
Date: Thu, 22 Mar 2012 16:09:12 +0100
From: Lukas Zeller <luz-DkgZRUgWWJ3tRgLqZ5aouw@public.gmane.org>
Subject: Re: [os-libsynthesis] what's deference between dbplugin for
       cocoa   and for cpp
To: zhou lei <zhoulei <at> globalroam.com>
Cc: os-libsynthesis <at> synthesis.ch
Message-ID: <30A570F1-3A3E-4AE7-85B9-8D75813ACC1F-DkgZRUgWWJ3tRgLqZ5aouw@public.gmane.org>
Content-Type: text/plain; charset=iso-8859-1

Hi Zhoulei,

On Mar 20, 2012, at 10:31 , zhou lei wrote:

> We can find "snowwhite" in the doc of the libsynthesis, and in the file named "dbapi.cpp" we can find it too.

This is the C++ branch of things, it is not relevant for iOS (except maybe for general understanding of how the library works on other platforms).

> And from the demo for IOS, We can find out that, in cocoa, the lib would using the code in "dbplugin_cocoa.m".

dbplugin_cocoa.m is the wrapper code that handles the somewhat tricky interface between C and ObjC for you. No need to edit this.

The actual plugin code to write will go into sample_dbplugin1.mm (2,3,4...).

All you need to do is implementing the following methods:

- (TSyError)startDataReadWithLastToken:(cAppCharP)aLastToken andResumeToken:(cAppCharP)aResumeToken;

- (TSyError)readNextItemAsKey:(SettingsKey *)aItemKey
 itemIdP:(NSString **)aItemIdP parentIdP:(NSString **)aParentIdP
 statusP:(sInt32 *)aStatusP
 isFirst:(BOOL)aFirst;

- (TSyError)readItemAsKey:(SettingsKey *)aItemKey
 itemID:(NSString *)aItemID parentID:(NSString *)aParentID;

- (TSyError)endDataRead;

- (TSyError)startDataWrite;

- (TSyError)insertItemAsKey:(SettingsKey *)aItemKey
 parentID:(NSString *)aParentID newItemIdP:(NSString **)aNewItemIdP;

- (TSyError)updateItemAsKey:(SettingsKey *)aItemKey
 itemIdP:(NSString **)aItemIdP parentIdP:(NSString **)aParentIdP;

- (TSyError)deleteItem:(NSString *)aItemID parentID:(NSString *)aParentID;

- (TSyError)endDataWriteWithSuccess:(BOOL)aSuccess andNewToken:(NSString **)aNewTokenP;

...plus maybe some of the optional methods if you have advanced features like filtering (but probably not to start with).

These are semantically 1:1 representations in ObjC of the functions you find described in more detail in doc/SDK_manual.pdf and also in the C++ samples. Because of the work the wrapper code does for you, it is only a small subset of what the C plugin ABI consists of. Things like module/db context creation/deletion is done in the wrapper.

One important note: the Cocoa wrapper code only uses the "AsKey" variants from the plugin API. This means that rather than passing items as text strings, a SettingsKey object is passed, on which you can call methods like stringValueByName: / setStringValueByName:toValue: to access individual fields (see SettingsKey.h for all available access methods). Note that this is the same mechanism as for accessing settings, and you'll find examples for SettingsKey usage in the sample iOS app.

Best Regards,

Lukas Zeller, plan44.ch
luz-DkgZRUgWWJ3tRgLqZ5aouw@public.gmane.org - www.plan44.ch




------------------------------

Message: 2
Date: Thu, 22 Mar 2012 16:11:40 +0100
From: Lukas Zeller <luz-DkgZRUgWWJ3tRgLqZ5aouw@public.gmane.org>
Subject: Re: [os-libsynthesis] os-libsynthesis Digest, Vol 33, Issue 6
To: zhou lei <zhoulei <at> globalroam.com>
Cc: os-libsynthesis <at> synthesis.ch
Message-ID: <0229F62B-BCA6-4498-A527-FB99CDB31113-DkgZRUgWWJ3tRgLqZ5aouw@public.gmane.org>
Content-Type: text/plain; charset=iso-8859-1

Hi Zhoulei,

On Mar 19, 2012, at 3:57 , zhou lei wrote:

> In my satuation, I  want to sync the address book from the iphone to the sync server, and when needed the client would update the address book from the server. And for now, I just want to make the client works, and would using the syncML server of the google sync.

Be careful and don't expect too much, Google contact sync is one of the less stellar SyncML implementations :-(

> For the local address book, it may not been the iphone's but could be a db from sqlite.

If you use SQLite, you don't need to write your own plugin. libsynthesis has built-in SQLite3 interface, all you need is creating a so-called mapping between the <fields> in the <fieldlist> and your actual database fields. This is done in the <fieldmap> section of the <datastore> in the XML config.

Have a look at  /src/sysync_SDK/configs/sunbird_client.xml, this is a sample of an interface to a SQLite3 backend. The sample looks a bit complicated because of the large scripts handling all the special cases with exceptions etc., but for a plain contact database you probably will not need any scripts at all, so just a few lines of <map> definitions will do.

> And when I set the dbplugin_module to "iPhone_plugin1" or "iPhone_plugin4", and try to sync, it will do nothing, off cause, there is not any usefull code in the "iPhone_plugin1", but the function there is just been call  ed when install the module. Must i using the session?

All you need to do is filling actual DB access code into the methods in sample_dbplugin1.mm that have a comment with //%%% todo, starting with startDataReadWithLastToken.

The wrapper code handles all the rest, instantiates the module and database contexts, and calls the methods you find in sample_dbplugin1.mm.

Best Regards,

Lukas Zeller, plan44.ch
luz-DkgZRUgWWJ3tRgLqZ5aouw@public.gmane.org - www.plan44.ch




------------------------------

_______________________________________________
os-libsynthesis mailing list
os-libsynthesis <at> synthesis.ch
http://lists.synthesis.ch/mailman/listinfo/os-libsynthesis


End of os-libsynthesis Digest, Vol 33, Issue 9
**********************************************

_______________________________________________
os-libsynthesis mailing list
os-libsynthesis@...
http://lists.synthesis.ch/mailman/listinfo/os-libsynthesis
zhou lei | 20 Mar 10:31

what's deference between dbplugin for cocoa and for cpp

Hi all


We can find "snowwhite" in the doc of the libsynthesis, and in the file named "dbapi.cpp" we can find it too. And from the demo for IOS, We can find out that, in cocoa, the lib would using the code in "dbplugin_cocoa.m". There I found the c functions, like Module_createContext, and the class snowwhite has these functions too. So I just think about that could I modefy the dbplugin in the ios demo make it works like "snowwhite" in cpp. But I cant find out want the session means in the "snowwhite", and in the dbplugin_cocoa there is a function named "Session_CreateContext", but do nothing. 

Module_CreateContext create the new pluginModule, and init the db with newpluinDBWithName, but how to init a session. Could anyone can give a usefull dbplugin? 

Thanks 
Regards
-Zhoulei
_______________________________________________
os-libsynthesis mailing list
os-libsynthesis@...
http://lists.synthesis.ch/mailman/listinfo/os-libsynthesis
zhou lei | 19 Mar 03:57

Re: os-libsynthesis Digest, Vol 33, Issue 6

Hi, guys


In my satuation, I  want to sync the address book from the iphone to the sync server, and when needed the client would update the address book from the server. And for now, I just want to make the client works, and would using the syncML server of the google sync. For the local address book, it may not been the iphone's but could be a db from sqlite. And when I set the dbplugin_module to "iPhone_plugin1" or "iPhone_plugin4", and try to sync, it will do nothing, off cause, there is not any usefull code in the "iPhone_plugin1", but the function there is just been call  ed when install the module. Must i using the session? 

Thanks
Best Regards
-Zhoulei



Today's Topics:

  1. Re: About the db plugin in the ios (Lukas Zeller)


----------------------------------------------------------------------

Message: 1
Date: Fri, 16 Mar 2012 13:55:06 +0100
From: Lukas Zeller <luz-DkgZRUgWWJ3tRgLqZ5aouw@public.gmane.org>
Subject: Re: [os-libsynthesis] About the db plugin in the ios
To: zhou lei <zhoulei <at> globalroam.com>
Cc: os-libsynthesis <at> synthesis.ch
Message-ID: <CB8E8E47-1FE6-40F3-AB92-301B839EBCA0-DkgZRUgWWJ3tRgLqZ5aouw@public.gmane.org>
Content-Type: text/plain; charset=iso-8859-1

Hi Zhoulei,

On Mar 16, 2012, at 4:46 , zhou lei wrote:

>      I am a newer of the syncML, and try this on ios for a half month. And finally find out that the libsynthesis is best one, it have demo and docs, and guys works on this are all very kind. And I even do not know how the syncML protocol, but I want to know how the libsynthesis works, especially the lib and the db plugin. I just know how the db plugin would be called, but i got more questions, and some of them is quite easy for you but important for me. There are the questions:
>     1.Is that the libsynthesis should let the db underversion controle, i mean if the version is not the same the syncML would sync with server or if the data is not the same  the syncML would sync with the server.

libsynthesis normally relies on the plugin to report which records have changed since the last sync. Usually, plugins use a "last modified date" mechanism to detect which records have changed.

For clients, there is also the possibility to use CRC based change detection (see description of <crcchangedetection> in doc/SySync_config_reference.pdf). With this, the engine always reads all data items and calculates a CRC checksum over the actual data to find out if a item has changed or not.

This might be ok or not, depending on how slow or fast the database backend is, and how large the sync set (total number of items). In any case, it's more an emergency method for databases that cannot be changed and don't have a usable "last modified" timestamp. When designing new databases, it is recommended to implement a stable modified-date.


>     2.Why the "Target Dependencies" in the project of "SyncMLClientSample" is without the "static_combiEngine_opensource_ios", when i got the demo, first time I even could not combile this demo. Thats quite easy to solve, but make me think this demo may not work at the first.

SyncMLClientSample does have a target dependency on static_clientEngine_opensource_ios (because it's a client-only sample), not static_combiEngine_opensource_ios.

But you are right, there is a problem, which is that the SYNCMLLIB build setting was wrong and did point to the combi lib. I fixed this now (on the "luz" branch in gitorious.

But if you need both SyncML client and server, you can use static_combiEngine_opensource_ios instead (change the target dependency and change the SYNCMLLIB setting)

>     3.Why the docs did not maintioned about the ios db plugin, in the doc i found out the a e.g. named snowwhite,  but not for ios, and the doc for the xml is quite simple, I even dont know whats the relationship between the xml and the db plugins, the only way is set a break point and step by step gointo the calls, and there are so many classes, you should take time to find out who is whose father and whose is the child.

You are right, the iOS things were not decribed so well, mainly because the iOS version of libsynthesis was open sourced only recently. In particular, I forgot to update and post the readme file for the sample app. I did that now, see d82dbde2b8 ( iOS: added readme and fixed SYNCMMLIB build setting which was pointing to the wrong library (sample uses the client lib, not the combi lib))

>     4.In the demo client of ios, i found a define of "SYNCML_TARGET_DBID 2001", and in the MainViewController.m there is a targetkey for "1001", 2001 is defined in the xml, but where is the "1001", and when get the "1001", it returns NULL, for what purpose? And i say the note in the appdelegate.h, "1003" is maintioned here, are they define by the ios?  Or are they defined by the syncML?  i mean that for the address boot we only could define it to 1001 or what.

Thanks for your precise investigation! That's indeed a bug in the sample. I corrected it now, see 7220cbd400 ( iOS sample app: fixed inconsistencies with dbtypeid, now using SYNCML_TARGET_DBID definition everywhere.).

The dbtypeid is the key to link the datastore in the config to the app. So for the sample app which uses TextDB based contacts, it must be 2001 everywhere. The 1001 used in MainViewController.m was a bug, sorry for that.

Best Regards,

Lukas


Lukas Zeller, plan44.ch
luz-DkgZRUgWWJ3tRgLqZ5aouw@public.gmane.org - www.plan44.ch




------------------------------

_______________________________________________
os-libsynthesis mailing list
os-libsynthesis <at> synthesis.ch
http://lists.synthesis.ch/mailman/listinfo/os-libsynthesis


End of os-libsynthesis Digest, Vol 33, Issue 6
**********************************************

_______________________________________________
os-libsynthesis mailing list
os-libsynthesis@...
http://lists.synthesis.ch/mailman/listinfo/os-libsynthesis
zhou lei | 16 Mar 04:46

About the db plugin in the ios

Hi all,


     I am a newer of the syncML, and try this on ios for a half month. And finally find out that the libsynthesis is best one, it have demo and docs, and guys works on this are all very kind. And I even do not know how the syncML protocol, but I want to know how the libsynthesis works, especially the lib and the db plugin. I just know how the db plugin would be called, but i got more questions, and some of them is quite easy for you but important for me. There are the questions:
    1.Is that the libsynthesis should let the db underversion controle, i mean if the version is not the same the syncML would sync with server or if the data is not the same  the syncML would sync with the server.
    2.Why the "Target Dependencies" in the project of "SyncMLClientSample" is without the "static_combiEngine_opensource_ios", when i got the demo, first time I even could not combile this demo. Thats quite easy to solve, but make me think this demo may not work at the first.
    3.Why the docs did not maintioned about the ios db plugin, in the doc i found out the a e.g. named snowwhite,  but not for ios, and the doc for the xml is quite simple, I even dont know whats the relationship between the xml and the db plugins, the only way is set a break point and step by step gointo the calls, and there are so many classes, you should take time to find out who is whose father and whose is the child. 
    4.In the demo client of ios, i found a define of "SYNCML_TARGET_DBID 2001", and in the MainViewController.m there is a targetkey for "1001", 2001 is defined in the xml, but where is the "1001", and when get the "1001", it returns NULL, for what purpose? And i say the note in the appdelegate.h, "1003" is maintioned here, are they define by the ios?  Or are they defined by the syncML?  i mean that for the address boot we only could define it to 1001 or what.
    Thanks for read these tasks. And thanks for the hardwork of Lukas. 

Thanks
Best Regards
-Zhoulei
_______________________________________________
os-libsynthesis mailing list
os-libsynthesis@...
http://lists.synthesis.ch/mailman/listinfo/os-libsynthesis
Patrick Ohly | 6 Mar 14:55
Picon
Favicon
Gravatar

URI decoding

Hello!

Is there some utility code for decoding an URI into its individual
parts? Simple string operations don't work for an uri like this:

file:///tmp/abc%25def => file:// + /tmp/abc%def

I've recently come across this because Evolution Data Server somehow
puts such an encoded % into PHOTO file URIs, which the engine scripts
need to inline before sending to a peer.

I'm in the process of writing another script method which extracts the
file path and does URI decoding, but I don't want to reinvent the wheel
if there is already such code. A quick search hasn't brought up
anything, though.

--

-- 
Best Regards, Patrick Ohly

The content of this message is my personal opinion only and although
I am an employee of Intel, the statements I make here in no way
represent Intel's position on the issue, nor am I authorized to speak
on behalf of Intel on this matter.

Gmane