| Note! |
|---|
|
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.
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.
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)
http://wiki.forum.nokia.com/index.php/Image:SyncCliSamEx.zip
No related wiki articles found