Join Now
Quality Rating:
  • Currently 0.0 / 5
(0.0 / 5 - 0 votes cast)
Expertise Level:
  • Currently 0.0 / 5
(0.0 / 5 - 0 votes cast)

This page was last modified 15:22, 24 June 2008.

Profiles Engine Extended API

From Forum Nokia Wiki

Note!
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"));
            
lProfileSetPresence.SetStatusMessageL(lProfilePrsenceMsg);


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"));
 
lProfileSetXtraTones.SetEmailAlertToneL(leMailTonePath);

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.

lProfileEngExt->CommitChangeL(*lNewProfile);

Example project

Example application

Related Discussions
Thread Thread Starter Forum Replies Last Post
Protocols/Profiles void_pointer Bluetooth Technology 1 2002-11-05 13:07
Possibility 3D on series 40/60 Dami Mobile Java Media (Graphics & Sounds) 26 2003-09-03 07:55
Getting phone no from the contact database by mapping name kiran10182 General Symbian C++ 4 2007-12-06 12:50
SDK 3.0 limitations? Extended DT information? alexcater PC Suite API and PC Connectivity SDK 0 2004-03-25 14:06
Location API panics Kimple General Symbian C++ 1 2005-12-21 14:21
 
Powered by MediaWiki