Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
EnTerr
Roku Guru

Is roRegistry flat or deep?

When i hear "registry", i tend to think Windows Registry (or AIX's ODM, if that tickles your fancy), which is multi-level, hierarchical storage, where multiple levels of "sections" exist in file directory tree-like structure.

On reading the API for roRegistry*, seems like there might be only 1 level of "sections" with 2nd level being the (key, value) couples per section. I.e. it would seem that semantically it is more like Windows .INI files (ini files were the predecessors of registry)
[Mail]
MAPI=1
CMC=1
CMCDLLNAME=mapi.dll
CMCDLLNAME32=mapi32.dll
MAPIX=1
MAPIXVER=1.0.0.1
OLEMessaging=1
[MSUCE]
Advanced=1
CodePage=Unicode
Font=Arial
[MAPI 1.0 Time Zone]
Bias=1e0
StandardName=Pacific Standard Time
StandardBias=0
StandardStart=00000A00050002000000000000000000
DaylightName=Pacific Standard Time
DaylightBias=ffffffc4
DaylightStart=00000400010002000000000000000000
ActiveTimeBias=1a4
[drawdib]
vga.drv 1920x1200x32(BGR 0)=1,5,23,5

Now it is not absolutely clear if there is only one possible section level (e.g. i wondered what if some kind of "deep path" a-la "sectionA/subsectionB" may be specified for section name) so i figure i'll ask here - is Roku's "registry" flat, consisting of one level of sections, with key-value leafs underneath?
0 Kudos
3 REPLIES 3
YungBlood
Streaming Star

Re: Is roRegistry flat or deep?

From our perspective, it's basically flat like an .ini file. However it is a permission controlled database. And each project (or goup of projects signed by the same key) can use sections with the same name without conflicts with projects signed with different keys.

As you can see in the docs, roRegistry has a method called getsectionlist, but roRegistrySection doesn't.

So it appears to go 2 deep. First it ties to your key, so you can't see anything outside your "branch". Then you make sections("twigs") on your branch. With data being stored in the "leaves".

So glorified .ini... or basic registry... whatever you call it, just imagine it's your own personal .ini
YungBlood

Bringing more fun to Roku!
0 Kudos
TheEndless
Channel Surfer

Re: Is roRegistry flat or deep?

I'm pretty sure "/" is a valid character for a registry section name, so technically you could treat it as hierarchical if you wanted to. You just can't access via some "child" collection without keeping track of it yourself.
My Channels: http://roku.permanence.com - Twitter: @TheEndlessDev
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)
0 Kudos
EnTerr
Roku Guru

Re: Is roRegistry flat or deep?

Ok i think i get it. So for all practical purposes one (one who is win3.1 damaged) can think of it as a <developer-key>.INI file with [section]s inside and key=values. Including the transactional atomicity of flushing, i am itching to bet it is implemented in ini-like text files
0 Kudos
Need Assistance?
Welcome to the Roku Community! Feel free to search our Community for answers or post your question to get help.

Become a Roku Streaming Expert!

Share your expertise, help fellow streamers, and unlock exclusive rewards as part of the Roku Community. Learn more.