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 <l...@plan44.ch>
> Subject: Re: [os-libsynthesis] About the db plugin in the ios
> To: zhou lei <zhou...@globalroam.com>
> Cc: os-libsynthesis@synthesis.ch
> Message-ID: <cb8e8e47-1fe6-40f3-ab92-301b839eb...@plan44.ch>
> 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
> l...@plan44.ch - www.plan44.ch
>
>
>
>
> ------------------------------
>
> _______________________________________________
> os-libsynthesis mailing list
> os-libsynthesis@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@synthesis.ch
http://lists.synthesis.ch/mailman/listinfo/os-libsynthesis

Reply via email to