Namespaces

Variants
Actions

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 over the next few weeks. Thanks for all your past and future contributions.

Archived:Profiles Engine Active Profile Settings Symbian API

From Wiki
Jump to: navigation, search

Archived.pngArchived: This article is archived because it is not considered relevant for third-party developers creating commercial solutions today. If you think this article is still relevant, let us know by adding the template {{ReviewForRemovalFromArchive|user=~~~~|write your reason here}}.

Article Metadata
Code ExampleCompatibility
Platform(s): S60 3rd Edition, FP2
S60 3rd Edition FP2
Article
Keywords: Profiles Engine Active Profile Settings API
Created: User:Technical writer 1 (13 Jun 2008)
Last edited: lpvalente (23 Jan 2013)


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

Contents

Purpose

The following links point to the Profile Engine APIs for S60 3rd Edition, Maintenance Release:

Profiles Engine API

Profiles Engine Extended API

The S60 3rd Edition, Feature Pack 2 plug-in package has Central Repository keys for

  • Retrieving and setting the DefaultRingingTone, DefaultMessageTone, DefaultImTone, and RingingToneMaxSize.
  • Checking if a particular feature is supported or not.
  • Retrieving the set of MIME types that are not allowed as Alert Tones to be excluded from the list of tones in the Tone Selection dialog, (for example, DRM protected, demo played).


Header files

 centralrepository.h  
 ProfileEngineDomainCRKeys.h
 ProfilesVariant.hrh

Libraries

 centralrepository.lib

Code snippets

 iRepository = CRepository::NewL(KCRUidProfileEngine);

Retrieving the default RingingTone:

 TBuf<50> buffer;
User::LeaveIfError( iRepository->Get( KProEngDefaultRingingTone, buffer ) );
CEikonEnv::InfoWinL(_L("default ringing tone"), buffer);

Retrieving the default MessageTone:

 buffer.Zero();
User::LeaveIfError( iRepository->Get( KProEngDefaultMessageTone, buffer ) );
CEikonEnv::InfoWinL(_L("default Message tone"), buffer);

Retrieving the maximum size of the RingingTone:

 TInt size;
User::LeaveIfError( iRepository->Get( KProEngRingingToneMaxSize, size ) );
buffer.Zero();
buffer.AppendNum(size);
CEikonEnv::InfoWinL(_L("RingingToneMaxSize"), buffer);

KCRUidProfilesLV, Profiles local variation CR file.

 iRepository = CRepository::NewL(KCRUidProfilesLV);

Retrieving the Standard bitmask type of key used for local variation of profiles:

 TInt featureBitmask( 0 );
User::LeaveIfError(iRepository->Get( KProfilesLVFlags, featureBitmask ));
 
if ( featureBitmask & KProEngFeatureIdVTRingingTone )
{
// This feature is ON, so act accordingly
CEikonEnv::InfoWinL(_L("ProEngFeatureIdVTRingingTone"), _L("Supported"));
}
else
{
CEikonEnv::InfoWinL(_L("ProEngFeatureIdVTRingingTone"), _L("Not Supported"));
}
if ( featureBitmask & KProEngFeatureIdForceSilentMode )
{
// This feature is ON, so act accordingly
CEikonEnv::InfoWinL(_L"KProEngFeatureIdForceSilentMode"), _L("Supported"));
}
else
{
CEikonEnv::InfoWinL(_L("KProEngFeatureIdForceSilentMode"), _L("Not Supported"));
}
if ( featureBitmask & KProEngFeatureIdTimedProfiles )
{
// This feature is ON, so act accordingly
CEikonEnv::InfoWinL(_L("KProEngFeatureIdTimedProfiles"), _L("Supported"));
}
else
{
CEikonEnv::InfoWinL(_L("KProEngFeatureIdTimedProfiles"), _L("Not Supported"));
}
if ( featureBitmask & KProEngFeatureIdTTSRingingTone )
{
// This feature is ON, so act accordingly
CEikonEnv::InfoWinL(_L("KProEngFeatureIdTTSRingingTone"), _L("Supported"));
}
else
{
CEikonEnv::InfoWinL(_L("KProEngFeatureIdTTSRingingTone"), _L("Not Supported"));
}

Retrieving the TonesViewFeatureIdHac if it is enabled or disabled:

 TInt flag = 0;
User::LeaveIfError( iRepository->Get( KProEngTonesViewLVFlags, flag ) );
buffer.Zero();
buffer.AppendNum(flag);
CEikonEnv::InfoWinL(_L("KProEngTonesViewLVFlags"), buffer);

Retrieving the set of MIME types that are not allowed as alert tones.

 buffer.Zero();
User::LeaveIfError( iRepository->Get( KProEngBlockedTones, buffer ) );
CEikonEnv::InfoWinL(_L("KProEngBlockedTones"), buffer);

Retrieving the the set of MIME types that are not allowed as alert tones (not DRM protected):

 buffer.Zero();
User::LeaveIfError( iRepository->Get( KProEngBlockedUnprotectedTones, buffer ) );
CEikonEnv::InfoWinL(_L("KProEngBlockedUnprotectedTones"), buffer);


Retrieving the the set of MIME types that are not allowed as alert tones (DRM protected):

 buffer.Zero();
User::LeaveIfError( iRepository->Get( KProEngBlockedProtectedTones, buffer ) );
CEikonEnv::InfoWinL(_L("KProEngBlockedProtectedTones"), buffer);

Retrieving the set of MIME types that are not allowed as demo played in the tone selection dialog:

 buffer.Zero();
User::LeaveIfError( iRepository->Get( KProEngBlockedDemoPlayTones, buffer ) );
CEikonEnv::InfoWinL(_L("KProEngBlockedDemoPlayTones"), buffer);

Retrieving the set of MIME types that must be excluded from the list of tones in the tone selection dialog:

 buffer.Zero();
User::LeaveIfError( iRepository->Get( KProEngExcludedTones, buffer ) );
CEikonEnv::InfoWinL(_L("KProEngExcludedTones"), buffer);

Example project

File:ProfileCRKey.zip

This page was last modified on 23 January 2013, at 13:01.
42 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.

 

Thank you!

We appreciate your feedback.

×