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.

Creating a DM profile using Symbian C++

From Wiki
Jump to: navigation, search
Article Metadata
Tested with
Devices(s): Nokia E75
Nokia 5800 XpressMusic
Platform(s): S60 3rd Edition FP2
S60 5th Edition
S60 5th Edition
S60 3rd Edition FP2
Keywords: RSyncMLSession, RSyncMLDevManProfile
Created: User:Kbwiki (18 Jun 2010)
Last edited: hamishwillee (01 Aug 2012)

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



This article gives an overview of creating a DM profile programmatically.


For configuring various settings remotely it is necessary to have a DM profile on the device. The server profile on the device helps in configuring APs, SIP/VoIP Settings, etc. remotely.


The SyncML Client API available in the SDK API Plug-in can be used for creating a DM profile. RsyncMLDevManProfile is the class for creating the DM profile. The following code snippet gives an overview of how to create a DM profile.

Headers required


Library to be included

LIBRARY syncmlclientapi.lib

Code Snippet for profile creation

 RSyncMLDevManProfile profile;
 profile.CreateL( syncMLSession );
 // To set profile display name
 // To set User name
 // To set password
 //To set Server Id
 //To set Server password
 // To set Protocol Version to be used when synchronizing
 TSmlProtocolVersion protocol = ESmlVersion1_1_2;
 profile.SetProtocolVersionL( protocol );
 // To sets the server-alerted notification user interaction.
 TSmlServerAlertedAction action = ESmlConfirmSync;
 profile.SetSanUserInteractionL( action );	
 // To save modifications
 // close profile

The settings of an existing profile (or profiles) can be accessed as follows:

 RArray<TSmlProfileId> arr;
 RSyncMLDevManProfile profile;
 // Get the list of available profiles into an array
 TRAPD(err, syncMLSession.ListProfilesL(arr, ESmlDevMan));
 if (err == KErrNone)
    TInt count = arr.Count(); 
    TBuf<20> proCount;
    proCount.AppendNum(count); //Gives available no. of DM profiles
 TInt count;
 for (int i=0;i<arr.Count();i++)
     TRAPD(error,profile.OpenL(syncMLSession,arr[i], ESmlOpenReadWrite));
     if(KErrNone != error)
} TBuf<50> displayName; //Gives the profile name displayName.Append(profile.DisplayName()); TBuf8<50> serverID; //Gives the server name serverID.Append(profile.ServerId()); //Other settings like profileId, username, password etc can also be //obtained in a simlar fashion // To save modifications profile.UpdateL(); // close profile profile.Close(); }

Required capabilities: WriteDeviceData ReadDeviceData ReadUserData WriteUserData LocalServices NetworkServices

Related articles

Get current SIM card status using Symbian C++

This page was last modified on 1 August 2012, at 04:39.
39 page views in the last 30 days.