This page was last modified 18:47, 14 March 2008.
SyncML Client API
From Forum Nokia Wiki
| Note! |
|---|
|
Purpose
SyncML client api is SyncML server’s client side API. This provides services to manage data synchronization and device management related data. The services provided are profile management – retrieval of profile file values, setting up of profile values, listing of profiles etc , history of profile , event notification , progress event notification. RSyncMLSession is the Client side handle to server session. We have to create instance of this class before using other classes. RSyncMLDataSyncProfile is a handle to manage Data synchronization profile data.
Use cases
To create Data synchronization profile
One use case is to retrieve or set particular profile values like display name, protocol version and user name.
We can disable further synchronization by setting SetSanUserInteractionL to be ESmlDisableSync.
Example code - to retrieve the profile values
RSyncMLSession syncMLSession; RSyncMLDataSyncProfile profile; syncMLSession.OpenL(); // Listing profiles RArray<TSmlProfileId> arr; TInt err; TRAP(err, syncMLSession.ListProfilesL(arr, ESmlDataSync)); if (err == KErrNone) { TInt count = arr.Count(); for (int i=0;i<count;i++) { //Opening Profile TRAP(err,profile.OpenL(syncMLSession, arr[i], ESmlOpenReadWrite)); // Sync Profile name iName.Append(profile.DisplayName()); // similar to this we can set profile name – profile.SetDisplayName //Connection Setting Values //Server Version iProtVers = profile.ProtocolVersion(); enumPVR.AppendNum(iProtVers); //Server Id iServerID.Append(profile.ServerId()); //User Name iUserName.Append(profile.UserName()); //Password iPassWd.Append(profile.Password()); //Application settings //Synchronization type iSyncType = profile.Type(); enumType.AppendNum(iSyncType); //Profile Id iProfId = profile.Identifier(); enumPID.AppendNum(iProfId); //Creator ID iCreateId = profile.CreatorId(); enumCID.AppendNum(iCreateId); //Close profile.Close(); } } syncMLSession.Close();
Code to disable furthur sync
profile. SetSanUserInteractionL(ESmlDisableSync)
Example project
http://wiki.forum.nokia.com/index.php/Image:SyncCliSamEx.zip
| Related Discussions | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| SyncML and RSA Authenication | jhobson | OMA DM/DS/CP | 1 | 2002-11-04 12:32 |
| SyncML and 3300? | fkrusemark | OMA DM/DS/CP | 8 | 2003-12-30 23:48 |
| Sync not possible with S60v3 Nokia5500 ? | Skoers | OMA DM/DS/CP | 1 | 2007-02-07 08:16 |
| Whether One DS server to sync data with mutil-DS client is feasible? | cyh2003 | OMA DM/DS/CP | 3 | 2007-03-08 22:27 |
| Does Nokia 7600 support syncML using OMA Client Provisioning 1.1? | BiljanaMarinkovic | OMA DM/DS/CP | 1 | 2004-03-15 14:04 |
