Profiles Engine Extended API

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

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

ProfileEngineExtended API is used to create new profiles and change the settings in existing profile. The Settings which can be set include Name,presence,tones.

Use cases

The usecases may be:

-Creating a New Profile

-Modify existing profile settings

-Delete a profile

Properties of a profile can be changed like its Name, Tones, Extra Tones, etc.,

Example code

Header files

#include <mprofileengineextended.h>
#include <mprofileextended.h>
#include <mprofilesetname.h>
#include <mprofilepresence.h>
#include <mprofilesetpresence.h>
#include <mprofilesetextratones.h>

Link against

LIBRARY profileeng.lib
CAPABILITY  WriteDeviceData ReadDeviceData

The following is a code for creation of a Profile:

MProfileEngineExtended* lProfileEngExt = CreateProfileEngineExtendedL();
MProfileExtended* lNewProfile = lProfileEngExt->CreateProfileL();
MProfileSetName& lProfileName = lNewProfile->ProfileSetName();
TBuf<10> lPrfName(_L("UserProf"));
lProfileName.SetNameL( lPrfName );

The following is the code to set the Profile Presence:

MProfileSetPresence& lProfileSetPresence =  lNewProfile->ProfileSetPresence();
TBuf<15> lProfilePrsenceMsg(_L("UsrPfl"));

The following is the code to retrieve the existing Profile Presence:

const MProfilePresence& lProfilePresence =  lNewProfile->ProfilePresence();
TBuf<20> lPrfPrsn;
lPrfPrsn = lProfilePresence.StatusMessage();
CEikonEnv::Static()->AlertWin(_L("ProfileStatus Msg:"), lPrfPrsn);

The following is the code to set the ExtraTones for a Profile:

MProfileSetExtraTones& lProfileSetXtraTones = lNewProfile->ProfileSetExtraTones();
TBuf<50> leMailTonePath(_L("z:\\data\\sounds\\digital\\Tinker.aac"));

Note: Similarly IM message alert tone and Video call ringing tone can be set using SetIMMessageAlertToneL (const TDesC &aIMMessageAlertTone) and SetVideoCallRingingToneL (const TDesC &aRingingTone)

Once the creation or modifcation is done to the profile, CommitChangeL of MProfileEngineExtended should be called to save the Settings.


Example project


This page was last modified on 14 June 2013, at 07:52.
50 page views in the last 30 days.