×

Discussion Board

Results 1 to 7 of 7
  1. #1
    Registered User
    Join Date
    Jun 2006
    Posts
    5

    how to create a new repository file? (Central repository) 3rd edition

    I want to make an application which can save data to the central repository.
    So, I want to create a new repository in which to save the data.
    How can I create the new file (*.cre) which has an unique id that i can
    give it to the constructor of the CRepository class?

    CRepository *m_repository=CRepository::NewL(KSomeRepository);

    What should I put instead of KSomeRepository?
    I don't want some existing repositories, instead I want to create my own.

    Thanks

  2. #2
    Super Contributor
    Join Date
    Nov 2004
    Location
    Wiltshire, UK
    Posts
    3,644

    Re: how to create a new repository file? (Central repository) 3rd edition

    You cannot create new repositories

  3. #3
    Super Contributor
    Join Date
    Aug 2005
    Location
    india
    Posts
    2,078

    Re: how to create a new repository file? (Central repository) 3rd edition

    hi,

    Todd try this one might help.............
    #include <centralrepository.h>
    CRepository *crep = CRepository::NewL(KCRUidBluetoothPowerState);
    TInt value=0;
    User::LeaveIfError( crep->Get(KBTPowerState, value) );


    //some unique UID
    static const TUid KSomeRepository = { 0x00001234 };
    const TUint32 KOldKey = 1234;
    const TUint32 KNewKey = 4321;
    _LIT(KHelloWorld, "HelloWorld!\n");
    //Here is the actual creation
    CRepository *repository =
    CRepository::NewL( KSomeRepository );

    enjoy coding .........

    Regards,
    Mateen Maldar
    "Whatever the mind can conceive and believe, the mind can achieve"

  4. #4
    Super Contributor
    Join Date
    Nov 2004
    Location
    Wiltshire, UK
    Posts
    3,644

    Re: how to create a new repository file? (Central repository) 3rd edition

    Well, I tried the code and as I expected it leaves with KErrNotFound when attempting to instantiate a repository that does not exist, matching what is in the documentation.

    Here is a thread I started a while back on the CentralRepostiory
    http://discussion.forum.nokia.com/fo...ad.php?t=79064

  5. #5
    Regular Contributor
    Join Date
    Aug 2004
    Location
    East Coast, USA
    Posts
    192

    Re: how to create a new repository file? (Central repository) 3rd edition

    Hi,


    You cannot create new repositories in the sense, that you would need All Files capability and knowledge about undocumented steps (at least in the normal sdk), about how to create a new entry. I guess Nokia/Symbian made the choice to make this not publicly available.

    Since you don't get All Files capabilities without a very good reason, I would not spend too much time investigating in this direction...

    Regards,

    --Blizzz

  6. #6
    Super Contributor
    Join Date
    Aug 2005
    Location
    india
    Posts
    2,078

    Re: how to create a new repository file? (Central repository) 3rd edition

    hi,

    one can retrive values from the central repository and placing values to central repository can be possible through secure ID.

    4.1.2 Central Repository (3rd Edition, Symbian OS v9.1)
    CenRep provides a generic way to access and share persistent settings and data. On the other hand, P&S is used for non-persistent (RAM-based) Shared Data settings. Both CenRep and P&S are services provided by Symbian OS. The Central Repository API is offered to read the key values from the Central Repository.

    Regards,
    Mateen Maldar
    "Whatever the mind can conceive and believe, the mind can achieve"

  7. #7
    Registered User
    Join Date
    Dec 2003
    Posts
    19

    Re: how to create a new repository file? (Central repository) 3rd edition

    Hi,

    In order to create a central repository you need to create a .xls file defining the repository UID, keys uid and other information of the keys (such as RO/RW and default values.)
    Series 60 (3rd edition) provides some perl scripts that take the .xls file as input and creates the .storable and .cre/.txt files.

    The format of the XLS can be found in the SDK under \s60\example\cenrep\keys_example.xls

    I think you need to be a licensee of S60/Symbian to access these tools and example.

Similar Threads

  1. S60 3rd Edition SDK: Code bloat from AknsConstants.h
    By mgroeber9110 in forum Symbian
    Replies: 6
    Last Post: 2011-02-04, 10:41
  2. S60 2nd OR 3rd edition for new software development
    By patil_ruturaj in forum Mobile Java Tools & SDKs
    Replies: 3
    Last Post: 2006-06-30, 08:57
  3. Can't create settings file and log file.
    By skhimsara in forum Symbian
    Replies: 1
    Last Post: 2006-05-08, 09:25
  4. How to create custom SIP header fields in S60 3rd edition
    By murkyl in forum Symbian Networking & Messaging (Closed)
    Replies: 3
    Last Post: 2006-03-21, 21:13

Posting Permissions

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