Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries. Thanks for all your past and future contributions.

SyncML Client API

From Wiki
Jump to: navigation, search
Article Metadata
Code ExampleArticle
Created: ltomuta (16 Jun 2007)
Last edited: hamishwillee (30 May 2013)

Note.pngNote: :This API is not part of the public SDK. It can be found in the SDK API Plug-in.


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;
// 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
// similar to this we can set profile name – profile.SetDisplayName
//Connection Setting Values
//Server Version
iProtVers = profile.ProtocolVersion();
//Server Id
//User Name
//Application settings
//Synchronization type
iSyncType = profile.Type();
//Profile Id
iProfId = profile.Identifier();
//Creator ID
iCreateId = profile.CreatorId();

Code to disable furthur sync

profile. SetSanUserInteractionL(ESmlDisableSync)

Example project

Related Links:

This page was last modified on 30 May 2013, at 04:36.
50 page views in the last 30 days.