×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Registered User
    Join Date
    Mar 2003
    Posts
    27

    CRepository? Values for backlight and screen-saver timeout

    Hi there

    I would like find an API to discover the current timeouts on the device for the backlight and the screen-saver.

    Basically, my application needs to mess with the inactivity timer to do its thing, but I still want the user's light to go out when he expects it, and to give way correctly for the screen saver - and I guess I want to update myself if the user messes with his settings.

    I am guessing there is information somewhere in the CRepository, but if anyone knows where (or knows a simper way) please tell me.

    Many thanks

    Kibi

  2. #2
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,165

    Re: CRepository? Values for backlight and screen-saver timeout

    You could check whether the values are within the API plug-ins, if not then they are considered to be non-public, and if somebody have otten the values from Nokia, then they are bound to the NDA, and thus they can not publish them.

  3. #3
    Nokia Developer Champion
    Join Date
    May 2004
    Posts
    2,267

    Re: CRepository? Values for backlight and screen-saver timeout

    Quote Originally Posted by kibi1 View Post
    Hi there

    I would like find an API to discover the current timeouts on the device for the backlight and the screen-saver.

    Basically, my application needs to mess with the inactivity timer to do its thing, but I still want the user's light to go out when he expects it, and to give way correctly for the screen saver - and I guess I want to update myself if the user messes with his settings.

    I am guessing there is information somewhere in the CRepository, but if anyone knows where (or knows a simper way) please tell me.

    Many thanks

    Kibi

    Hi,

    Assume that the value is stored in a CenRep file, do the following steps,

    1. Start the S60 3rd Edition FP2 emulator and then enter the "Settings" application.

    2. Remember the default value of the Power-saver timeout setting (15s) and then modify it (to 25s, for example), and then exit the "Settings" application

    3. Search in the 'epoc32' folder for recently changed files, there are several modified .cre files.
    101f87ef.cre
    101f877c.cre
    1000a82b.cre
    make a copy of them

    4. Enter the "Settings" application and then modify the setting again (to 30s, for example), and then exit the "Setting" application

    5. Search in the 'epoc32' folder again for recently changed files, still the .cre files. Compare them to the copies made in step 3, and we can see only the 101f877c.cre is changed, and actually only one byte is changed from 0x19 (25s) to 0x1E(30s), so it is must be the one we are looking for.

    6. Check the "\epoc32\release\winscw\udeb\z\private\10202be9\101f877c.txt", the key of the item with default value 15 is 0x8, so I guess it is the key for backlight timeout.
    ...
    0x8 int 15 16777216 cap_rd=alwayspass cap_wr=WriteDeviceData
    ...

    You can make a further confirmation by code:

    Code:
    TInt timeout = 0;
    CRepository* cenrep = CRepository::NewLC(TUid::Uid(0x101F877C));
    User::LeaveIfError(cenrep->Get(0x8, timeout));
    CleanupStack::PopAndDestroy(cenrep);
    Regards

    Ziteng Chen

  4. #4
    Super Contributor
    Join Date
    Feb 2006
    Location
    Beijing
    Posts
    4,361

    Re: CRepository? Values for backlight and screen-saver timeout

    wow!!!!! ziteng, you are superman!!!!!
    Stay Hungry. Stay Foolish.
    Sina Weibo:
    http://weibo.com/cxt728
    QQ Weibo:
    http://t.qq.com/Cxt_programmer

  5. #5
    Registered User
    Join Date
    Nov 2008
    Posts
    39

    Re: CRepository? Values for backlight and screen-saver timeout

    //Screen Saver Time out
    TInt timeout = 0;
    CRepository* cenrep = CRepository::NewLC(TUid::Uid(0x101F877C));
    User::LeaveIfError(cenrep->Get(0x8, timeout));
    CleanupStack::PopAndDestroy(cenrep);

    //Backlight Time out
    TInt timeout = 0;
    CRepository* cenrep = CRepository::NewLC(TUid::Uid(0x101F8781));
    User::LeaveIfError(cenrep->Get(0x1, timeout));
    CleanupStack::PopAndDestroy(cenrep);

    This is for S60 3rd edition. I do not know the others

Similar Threads

  1. Screen saver block in Nokia E62
    By arumugam_chan in forum Mobile Java General
    Replies: 2
    Last Post: 2008-06-24, 00:05
  2. Disabling screen saver on N95
    By jdm1216 in forum Mobile Java General
    Replies: 2
    Last Post: 2007-08-03, 10:58
  3. Screen saver notification
    By heuven in forum Symbian
    Replies: 1
    Last Post: 2006-12-29, 04:48
  4. How to remove the screen saver without turning the backlight on.
    By redzvika in forum Symbian User Interface
    Replies: 0
    Last Post: 2005-07-06, 13:47
  5. screen saver timeout on 7650
    By cpalitti in forum Symbian
    Replies: 0
    Last Post: 2002-11-18, 15:58

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×