This content has been marked as final. Show 5 replies
I was just too stupid ... :(
here is the solution I found after long tries and research - if somebody will need it:
hope it will be useful for somebody else!
// get root of the persistent storage String rootDir = System.getProperties().getProperty("dvb.persistent.root"); // get oid/aid of this application String orgid = (String)context.getXletProperty("dvb.org.id"); String appid = (String)context.getXletProperty("dvb.app.id"); // build base file name for persistent storage String directory = rootDir+"/"+orgid+"/"+appid;
Is this the way all OCAP applications obtain the path to write the persistent stoarge data?..One more question I had is where would the implementation store the downloaded storage applications(obviously not in persistent storage)...OCAP spec talks about some OCAP_LSV/Logical Storage Volume..Does implementation has to create one to store the downloaded application?
Any feedback is welcome..as i'm in the learning mode
Yes, this is how an OCAP app would store persistent file data, except that I would suggest using File.separator in place of "/" in the paths since that can vary from platform to platform.
Where OCAP stores downloaded apps is up to the implementation, but it will not be where persistent files (as above) are stored. OCAP mandates that these be distinct, but allows the implementer flexibility beyond that.
The app's directory structure, whether stored or no, is read-only to the application. If the application wants to write to the filesystem it must do that under the persistent storage root (as above). It also needs a Permission Request File that requests the file permission.
Hope that answers your question?
Thanks a lot..That answered my questions.
I've one doubt regarding .perm file. To download and store an application whether monitor application should be of type 'storage' or 'registrar'. I am working with vidiom vision work bench it throws error for both. I am unable to get any kind of permissions from .perm file.