Archived:Screensaver Settings Symbian API
debjit.roy
(Talk | contribs) (Debjit.roy -) |
hamishwillee
(Talk | contribs) |
||
| (3 intermediate revisions by one user not shown) | |||
| Line 1: | Line 1: | ||
| − | [[Category:Symbian C++]][[Category:S60 3rd Edition | + | {{Archived|timestamp=20120313121922|user=roy.debjit| }} |
| − | + | [[Category:Symbian C++]][[Category:S60 3rd Edition FP2]][[Category:Code Snippet]] | |
| − | + | {{ArticleMetaData <!-- v1.2 --> | |
| − | + | ||
| − | {{ArticleMetaData | + | |
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
|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]]) --> | ||
| − | |sdk=<!-- SDK(s) built and tested against (e.g. [http://linktosdkdownload/ Nokia Qt SDK 1.1]) --> | + | |devices= <!-- Devices tested against - e.g. ''devices=Nokia 6131 NFC, Nokia C7-00'') --> |
| − | |devicecompatability=<!-- Compatible devices (e.g.: All* (must have GPS) ) --> | + | |sdk= <!-- SDK(s) built and tested against (e.g. [http://linktosdkdownload/ Nokia Qt SDK 1.1]) --> |
| − | |signing=<!-- Empty or one of Self-Signed, DevCert, Manufacturer --> | + | |platform= S60 3rd Edition, FP2 |
| − | |capabilities=<!-- Capabilities required (e.g. Location, NetworkServices. | + | |devicecompatability= <!-- Compatible devices (e.g.: All* (must have GPS) ) --> |
| − | |author=[[User:Technical writer 1]] | + | |dependencies= <!-- Any other/external dependencies e.g.: Google Maps Api v1.0 --> |
| + | |signing= <!-- Empty or one of Self-Signed, DevCert, Manufacturer --> | ||
| + | |capabilities= <!-- Capabilities required by the article/code example (e.g. Location, NetworkServices. --> | ||
| + | |keywords= Screensaver Settings API | ||
| + | |language= <!-- Language category code for non-English topics - e.g. Lang-Chinese --> | ||
| + | |translated-by= <!-- [[User:XXXX]] --> | ||
| + | |translated-from-title= <!-- Title only --> | ||
| + | |translated-from-id= <!-- Id of translated revision --> | ||
| + | |review-by= <!-- After re-review: [[User:username]] --> | ||
| + | |review-timestamp= <!-- After re-review: YYYYMMDD --> | ||
| + | |update-by= <!-- After significant update: [[User:username]]--> | ||
| + | |update-timestamp= <!-- After significant update: YYYYMMDD --> | ||
| + | |creationdate= 20080613 | ||
| + | |author= [[User:Technical writer 1]] | ||
| + | <!-- The following are not in current metadata --> | ||
| + | |id= CS001039 | ||
}} | }} | ||
{{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. | ||
| Line 32: | Line 39: | ||
<code cpp> | <code cpp> | ||
| − | LIBRARY | + | LIBRARY centralrepository.lib |
</code> | </code> | ||
| Line 42: | Line 49: | ||
<code cpp> | <code cpp> | ||
| − | TInt | + | TInt iErrCode; |
| − | TInt | + | TInt iVal; |
TBuf<200> iDispVal; | TBuf<200> iDispVal; | ||
</code> | </code> | ||
| Line 51: | Line 58: | ||
Retrieving the name of screen saver plug-in currently in use: | 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 | + | Note: The string does not contain path information, only the name of plug-in module. This value applies only if {{Icode|KScreenSaverObject}} is set to {{Icode|EScreensaverTypePlugin}}. |
<code cpp> | <code cpp> | ||
Latest revision as of 09:11, 13 June 2012
Archived: 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
Compatibility
Platform(s): S60 3rd Edition, FP2
Article
Keywords: Screensaver Settings API
Created: User:Technical writer 1
(13 Jun 2008)
Last edited: hamishwillee
(13 Jun 2012)
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.
Contents |
Header files
#include <screensaverinternalcrkeys.h>
#include <centralrepository.h> // for CRepository
Link against
LIBRARY centralrepository.libCRepository* 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);
}

