Namespaces
Variants
Actions

Profile UID API

Jump to: navigation, search
Article Metadata

Code Example
Article
Created: ltomuta (17 Jun 2007)
Last edited: hamishwillee (25 Jul 2012)
Note.png
Note: :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 25 July 2012, at 07:46.
116 page views in the last 30 days.
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved