×
Namespaces

Variants
Actions
(Difference between revisions)

Archived:Screensaver Settings Symbian API

From Nokia Developer Wiki
Jump to: navigation, search
hamishwillee (Talk | contribs)
m (Hamishwillee - Bot change of template (Template:CodeSnippet) - now using Template:ArticleMetaData)
hamishwillee (Talk | contribs)
m (Hamishwillee - Minor tidy)
Line 1: Line 1:
[[Category:Symbian C++]][[Category:S60 3rd Edition, Feature Pack 2 ]][[Category:Code Examples]][[Category:Code Snippet]]
+
[[Category:Symbian C++]][[Category:S60 3rd Edition, Feature Pack 2]][[Category:Code Snippet]]
 
__NOTOC__
 
__NOTOC__
 
__NOEDITSECTION__
 
__NOEDITSECTION__
Line 7: Line 7:
 
|platform=S60 3rd Edition, FP2
 
|platform=S60 3rd Edition, FP2
 
|devices=
 
|devices=
|category=Symbian C++
+
|creationdate=20080613
|subcategory=
+
|creationdate=June 13, 2008
+
 
|keywords=Screensaver Settings API
 
|keywords=Screensaver Settings API
 
 
|sourcecode= <!-- Link to example source code (e.g. [[Media:The Code Example ZIP.zip]]) -->
 
|sourcecode= <!-- Link to example source code (e.g. [[Media:The Code Example ZIP.zip]]) -->
 
|installfile= <!-- Link to installation file (e.g. [[Media:The Installation File.sis]]) -->
 
|installfile= <!-- Link to installation file (e.g. [[Media:The Installation File.sis]]) -->
Line 17: Line 14:
 
|devicecompatability=<!-- Compatible devices (e.g.: All* (must have GPS) ) -->
 
|devicecompatability=<!-- Compatible devices (e.g.: All* (must have GPS) ) -->
 
|signing=<!-- Empty or one of Self-Signed, DevCert, Manufacturer -->
 
|signing=<!-- Empty or one of Self-Signed, DevCert, Manufacturer -->
|capabilities=<!-- Capabilities required (e.g. Location, NetworkServices. -->)
+
|capabilities=<!-- Capabilities required (e.g. Location, NetworkServices.) -->
 
|author=[[User:Technical writer 1]]
 
|author=[[User:Technical writer 1]]
 
}}
 
}}
 
+
{{Note|This API is not part of the public SDK. It can be found in the [[SDK API Plug-in]]. }}
 
+
{{Note|
+
: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.
 
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==
 
==Header files==

Revision as of 06:14, 20 October 2011

Template:KBCS

Article Metadata
Compatibility
Platform(s): S60 3rd Edition, FP2
S60 3rd Edition FP2
Article
Keywords: Screensaver Settings API
Created: User:Technical writer 1 (13 Jun 2008)
Last edited: hamishwillee (20 Oct 2011)

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)
{
iDispVal.Num(iVal);
switch(iVal)
{
case 0: iEikonEnv->AlertWin(_L("SStype text"), iDispVal);
break;
case 1: iEikonEnv->AlertWin(_L("SStype Date"), iDispVal);
break;
case 3: iEikonEnv->AlertWin(_L("SStype plugin"), iDispVal);
break;
default:
break;
}
}
else
{
iDispVal.Num(iErrCode);
iEikonEnv->AlertWin(_L("error"), iDispVal);
}

Retrieving screen saver text:

    iErrCode =iRepository->Get(KScreenSaverText, iDispVal);
if(iErrCode == KErrNone )
{
iEikonEnv->AlertWin(_L("Text is"), iDispVal);
}
else
{
iDispVal.Num(iErrCode);
iEikonEnv->AlertWin(_L("error"), iDispVal);
}
162 page views in the last 30 days.
×