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. Thanks for all your past and future contributions.

Archived:Screensaver 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
Platform(s): S60 3rd Edition, FP2
S60 3rd Edition FP2
Keywords: Screensaver Settings API
Created: User:Technical writer 1 (13 Jun 2008)
Last edited: hamishwillee (13 Jun 2012)

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

The Screensaver Settings API is used to retrieve information about the screen saver. The information which can be retrieved is the name of screen saver plug-in module currently in use, type of screen saver object, and screen saver text.


Header files

  #include <screensaverinternalcrkeys.h>
#include <centralrepository.h> // for CRepository

Link against

  LIBRARY centralrepository.lib
    CRepository* iRepository = CRepository::NewL( KCRUidScreenSaver);

Commonly used instance variables

    TInt iErrCode;
TInt iVal;
TBuf<200> iDispVal;

Example code

Retrieving the name of screen saver plug-in currently in use:

Note: The string does not contain path information, only the name of plug-in module. This value applies only if KScreenSaverObject is set to EScreensaverTypePlugin.

    iErrCode = iRepository->Get(KScreenSaverPluginName, iDispVal);
if ( iErrCode == KErrNone )
iEikonEnv->AlertWin(_L("pluginname"), iDispVal);

Retrieving the type of the screen saver object:

Possible values: 0: text 1: time and date (default value) 3: plugin

    iErrCode = iRepository->Get(KScreenSaverObject ,iVal);
if(iErrCode == KErrNone)
case 0: iEikonEnv->AlertWin(_L("SStype text"), iDispVal);
case 1: iEikonEnv->AlertWin(_L("SStype Date"), iDispVal);
case 3: iEikonEnv->AlertWin(_L("SStype plugin"), iDispVal);
iEikonEnv->AlertWin(_L("error"), iDispVal);

Retrieving screen saver text:

    iErrCode =iRepository->Get(KScreenSaverText, iDispVal);
if(iErrCode == KErrNone )
iEikonEnv->AlertWin(_L("Text is"), iDispVal);
iEikonEnv->AlertWin(_L("error"), iDispVal);
This page was last modified on 13 June 2012, at 06:11.
38 page views in the last 30 days.