zoukankan      html  css  js  c++  java
  • Symbian设置背景灯(转)

  • CRepository? Vals for backlight and screen-saver timeout - 2008-07-27 08:43 #1

    kibi1

    kibi1 is offline

    Registered User kibi1's Avatar


    Join Date
    Mar 2003
    Posts
    24
    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 gss I want to update myself if the user messes with his settings.
    I am gssing there is information somewhere in the CRepository, but if anyone knows where (or knows a simper way) please tell me.
    Many thanks
    Kibi

    Reply With Quote Reply With Quote


  • Re: CRepository? Vals for backlight and screen-saver timeout - 2008-07-27 11:02 #2

    symbiany?

    symbiany? is online now

    Forum Nokia Expert symbiany?'s Avatar


    Join Date
    Mar 2003
    Location
    Bangkok
    Posts
    20,275
    You could check whether the vals are within the API plug-ins, if not then they are considered to be non-p lic, and if somebody have otten the vals from Nokia, then they are bound to the NDA, and thus they can not p lish them.

    Reply With Quote Reply With Quote


  • Re: CRepository? Vals for backlight and screen-saver timeout - 2009-01-04 10:06 #3

    chenziteng

    chenziteng is offline

    Forum Nokia Champion chenziteng's Avatar


    Join Date
    May 2004
    Posts
    2,033

    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 gss I want to update myself if the user messes with his settings.
    I am gssing 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 val 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 val 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 act lly 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\?\z\private\10202be9\101f877c.txt", the key of the item with default val 15 is 0x8, so I gss 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

    Reply With Quote Reply With Quote


  • Re: CRepository? Vals for backlight and screen-saver timeout - 2009-01-04 12:19 #4

    Cxt_programmer

    Cxt_programmer is online now

    Forum Nokia Champion Cxt_programmer's Avatar


    Join Date
    Feb 2006
    Location
    Beijing
    Posts
    4,164

    Send a message via MSN to Cxt_programmer

    wow!!!!! ziteng, you are superman!!!!!

    Stay Hungry. Stay Foolish.
    Cxt_programmer

    Reply With Quote Reply With Quote


  • Re: CRepository? Vals for backlight and screen-saver timeout - 2009-01-06 13:22 #5

    viewsonic0123

    viewsonic0123 is offline

    Registered User viewsonic0123's Avatar


    Join Date
    Nov 2008
    Posts
    38
    //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
查看全文
  • 相关阅读:
    SQLServer之ISO游标使用
    Eclipse Android 代码自动提示功能
    Java中利用MessageFormat对象实现类似C# string.Format方法格式化
    Eclipse的常用快捷键、旁门左道、系统错误小贴士
    Eclipse配置详解(包括智能提示设置、智能提示插件修改,修改空格自动上屏、JDK配置、各种快捷键列表……)
    Unity3D DF根据名称获取多个子控件代码
    unity3d asset store下载的代码所在位置
    Unity3D Update() 和 FixedUpdate()区别
    Unity3D的断点调试功能
    Error building Player: UnityException: Bundle Identifier has not been set up correctly
  • 原文地址:https://www.cnblogs.com/zziss/p/2026341.html
  • Copyright © 2011-2022 走看看