×
Namespaces

Variants
Actions
(Difference between revisions)

Archived:Screensaver Settings Symbian API

From Nokia Developer Wiki
Jump to: navigation, search
Forum Nokia KB (Talk | contribs)
m (1 revision(s))
hamishwillee (Talk | contribs)
 
(11 intermediate revisions by 5 users not shown)
Line 1: Line 1:
[[Category:Symbian C++]][[Category:S60 3rd Edition, Feature Pack 2 ]][[Category:For publishing]][[Category:Code Examples]]
+
{{Archived|timestamp=20120313121922|user=roy.debjit| }}
__NOTOC__
+
[[Category:Symbian C++]][[Category:S60 3rd Edition FP2]][[Category:Code Snippet]]
__NOEDITSECTION__
+
{{ArticleMetaData <!-- v1.2 -->
{{KBCS}}
+
|sourcecode= <!-- Link to example source code (e.g. [[Media:The Code Example ZIP.zip]]) -->
{|style="background:#eceff2" width="660px" border="1" cellpadding="5" cellspacing="0"
+
|installfile= <!-- Link to installation file (e.g. [[Media:The Installation File.sis]]) -->
|-
+
|devices= <!-- Devices tested against - e.g. ''devices=Nokia 6131 NFC, Nokia C7-00'') -->
|'''ID''' ||CS001039
+
|sdk= <!-- SDK(s) built and tested against (e.g. [http://linktosdkdownload/ Nokia Qt SDK 1.1]) -->
|'''Creation date''' ||June 13, 2008
+
|platform= S60 3rd Edition, FP2
|-
+
|devicecompatability= <!-- Compatible devices (e.g.: All* (must have GPS) ) -->
|'''Platform''' ||S60 3rd Edition, FP2
+
|dependencies= <!-- Any other/external dependencies e.g.: Google Maps Api v1.0 -->
|'''Tested on devices''' ||&nbsp;
+
|signing= <!-- Empty or one of Self-Signed, DevCert, Manufacturer -->
|-
+
|capabilities= <!-- Capabilities required by the article/code example (e.g. Location, NetworkServices. -->
|'''Category''' ||Symbian C++
+
|keywords= Screensaver Settings API
|'''Subcategory''' ||&nbsp;
+
|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]] -->
{|style="background:#eceff2" width="660px" border="1" cellpadding="5" cellspacing="0"
+
|review-timestamp= <!-- After re-review: YYYYMMDD -->
|-
+
|update-by= <!-- After significant update: [[User:username]]-->
|'''Keywords (APIs, classes, methods, functions):''' Screensaver Settings API
+
|update-timestamp= <!-- After significant update: YYYYMMDD -->
|}
+
|creationdate= 20080613
 
+
|author= [[User:Technical writer 1]]
 
+
<!-- The following are not in current metadata -->
{{NoteS}}
+
|id= CS001039
:This API is not part of the public SDK. It can be found in the [[SDK API Plug-in]].  
+
}}
{{NoteE}}
+
{{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==
Line 40: Line 39:
  
 
<code cpp>
 
<code cpp>
   LIBRARY   centralrepository.lib  
+
   LIBRARY centralrepository.lib  
 
</code>
 
</code>
  
Line 50: Line 49:
  
 
<code cpp>
 
<code cpp>
     TInt     iErrCode;
+
     TInt iErrCode;
     TInt     iVal;   
+
     TInt iVal;   
 
     TBuf<200> iDispVal;
 
     TBuf<200> iDispVal;
 
</code>
 
</code>
Line 59: 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 <tt>KScreenSaverObject</tt> is set to <tt>EScreensaverTypePlugin</tt>.
+
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.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
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 (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.

Contents

[edit] Header files

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

[edit] Link against

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

[edit] Commonly used instance variables

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

[edit] 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);
}
This page was last modified on 13 June 2012, at 09:11.
97 page views in the last 30 days.
×