×
Namespaces

Variants
Actions

Profile UID API

From Nokia Developer Wiki
Jump to: navigation, search
Article Metadata
Code ExampleArticle
Created: ltomuta (17 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.

The Profiles UID API plugin provides keys using which we can query default ringing tone,message alert tone and Instant Message alert tone.It also has keys which give information about whether self recorded tones and DRM protected MP4 tones can be used as ringing tones or not.

Use cases

These APIs are useful to play default ringtone by your application. These default tones are stored in Z drive.

Example code

Headers files

#include <centralrepository.h>
#include <ProfileEngineInternalCRKeys.h>
Library  centralrepository.lib
// We need to Query Central Repository.
CRepository* cRepository = CRepository::NewLC( KCRUidProfileEngine );
 
TBuf<100> tone;
// Get the default tone.

KProEngDefaultRingingTone is the id of the default ringing tone.

 CAknInformationNote* informationNote = new (ELeave) CAknInformationNote;
User::LeaveIfError( cRepository->Get( KProEngDefaultRingingTone, tone ) );
informationNote->ExecuteLD(tone);

KProEngDefaultMessageTone is the id of the default message alert tone.

 CAknInformationNote* informationNote = new (ELeave) CAknInformationNote;
User::LeaveIfError( cRepository->Get( KProEngDefaultMessageTone, tone ) );
informationNote->ExecuteLD(tone);

KProEngDefaultImTone is the id of the default instant message alert tone.

 CAknInformationNote* informationNote = new (ELeave) CAknInformationNote;
User::LeaveIfError(cRepository->Get( KProEngDefaultImTone ,tone ) );
informationNote->ExecuteLD(tone);

// To know whether self recorded tones,DRM protected MP4 tones can be used as ringing tones or not

KProEngRecordedRingingTones is the id to check whether self recorded tones can be used as ringing tones or not.

TInt value;
//Get the integer value
 
User::LeaveIfError( cRepository->Get( KProEngRecordedRingingTones, value ) );
 
// To display message
 
_LIT(message0,"Not Permitted");
_LIT(message1,"Permitted");
 
CAknInformationNote* informationNote = new (ELeave) CAknInformationNote;
if(value==0)
{
informationNote->ExecuteLD(message0); //disabled
}
else
{
informationNote->ExecuteLD(message1); //enabled
}

KProEngNoDrmMP4RingingTones is the id to check whether self recorded tones can be used as ringing tones or not.

TInt value;
//Get the integer value
User::LeaveIfError( cRepository->Get( KProEngNoDrmMP4RingingTones, value ) );
 
// To display message
 
_LIT(message0,"Not Allowed");
_LIT(message1,"Allowed");
 
CAknInformationNote* informationNote = new (ELeave) CAknInformationNote;
if(value==0)
{
informationNote->ExecuteLD(message1); //allowed, default
}
else
{
informationNote->ExecuteLD(message0); //Not allowed
}

Example project

File:ProfilesUID.zip

This page was last modified on 14 June 2013, at 07:58.
127 page views in the last 30 days.
×