×
Namespaces

Variants
Actions
(Difference between revisions)

Archived:Clock Settings Symbian API

From Nokia Developer Wiki
Jump to: navigation, search
hamishwillee (Talk | contribs)
lpvalente (Talk | contribs)
m (Lpvalente -)
 
Line 1: Line 1:
{{Archived|timestamp=20120313122029|user=roy.debjit| }}
 
 
[[Category:Symbian C++]][[Category:S60 3rd Edition FP2]][[Category:Code Snippet]][[Category:Code Snippet]]
 
[[Category:Symbian C++]][[Category:S60 3rd Edition FP2]][[Category:Code Snippet]][[Category:Code Snippet]]
 +
{{Archived|timestamp=20120313122029|user=roy.debjit| }}
 +
 
{{ArticleMetaData <!-- v1.2 -->
 
{{ArticleMetaData <!-- v1.2 -->
 
|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]]) -->
Line 32: Line 33:
 
}}
 
}}
 
    
 
    
The Clock Setting APIs are used to retrieve and set the settings information of the Clock Application, such as Clock alarm sound file and Clock alarm snooze time.
+
{{Abstract|The Clock Setting APIs are used to retrieve and set the settings information of the Clock Application, such as Clock alarm sound file and Clock alarm snooze time.}}
  
 
==Header files==
 
==Header files==

Latest revision as of 16:06, 23 January 2013

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: Clock 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.

The Clock Setting APIs are used to retrieve and set the settings information of the Clock Application, such as Clock alarm sound file and Clock alarm snooze time.

Contents

[edit] Header files

    #include <clockdomaincrkeys.h>
#include <centralrepository.h> // Headers Used for CRepository

[edit] Link against

    LIBRARY centralrepository.lib

[edit] Capabilities

    WriteUserData WriteDeviceData
    // We need to Query Central Repository
CRepository* iRepository = CRepository::NewL( KCRUidClockApp );

[edit] Commonly used instance variables

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


[edit] Code examples

Retrieving the clock alarm sound file:

     iErrCode = iRepository->Get(KClockAppSoundFile ,iDispVal);
if(iErrCode == KErrNone)
{
iEikonEnv->AlertWin(_L("soundfile"),iDispVal);
}
else
{
iDispVal.Num(iErrCode) ;
iEikonEnv->AlertWin(_L("error"),iDispVal);
}

Retrieving clock alarm snooze time:

     iErrCode =iRepository->Get(KClockAppSnoozeTime ,iVal);
if(iErrCode == KErrNone)
{
iDispVal.Num(iVal) ;
iEikonEnv->AlertWin(_L("snoozetime"),iDispVal);
}
else
{
iDispVal.Num(iErrCode) ;
iEikonEnv->AlertWin(_L("error"),iDispVal);
}

Setting Clock alarm snooze time:

     iErrCode = iRepository->Get(KClockAppSnoozeTime ,iVal);
if(iErrCode == KErrNone)
{
iRepository->Set(KClockAppSnoozeTime,(iVal+1));
}
else
{
iDispVal.Num(iErrCode) ;
iEikonEnv->AlertWin(_L("error"),iDispVal);
}
This page was last modified on 23 January 2013, at 16:06.
104 page views in the last 30 days.
×