Skip to main content

Proposed MPEOS API additions for DVB storage

  2 posts   Feedicon  
Replies: 1 - Last Post: May 04, 2012 20:18
by: scottdeboy
showing 1 - 2 of 2
Posted: April 19, 2012 17:57 by greg80303
We have identified unimplemented OCAP APIs in our implementation that requires the addition of some new MPEOS APIs. These MPEOS APIs are meant to satisfy the following OCAP APIs:

org.ocap.storage.StorageManager.getTotalPersistentStorage();
org.ocap.storage.StorageManager.getAvailablePersistentStorage();

The propsed MPEOS APIs are (in mpeos_storage.h):

/**
 * Gets the total amount of persistent storage under the location indicated
 * by the dvb.persistent.root property and that is usable by all OCAP-J
 * applications. This value SHALL remain constant.
 *
 * @param numBytes the location where the implementation will return the
 *      total number of bytes provided to applications under dvb.persistent.root
 *
 * @return MPE_STORAGE_ERR_NOERR if success
 *         MPE_STORAGE_ERR_INVALID_PARAM if numBytes is null
 */
mpe_StorageError mpeos_storageGetTotalDVBStorage(uint64_t* numBytes);

/**
 * Gets the available amount of persistent storage under the location
 * indicated by the dvb.persistent.root property that is available to all
 * applications. The value returned by this method can be incorrect as soon
 * as this function returns
 *
 * @param numBytes the location where the implementation will return the
 *      number of bytes available to all applications under dvb.persistent.root
 * @return MPE_STORAGE_ERR_NOERR if success
 *         MPE_STORAGE_ERR_INVALID_PARAM if numBytes is null
 */
mpe_StorageError mpeos_storageGetAvailableDVBStorage(uint64_t* numBytes);
Posted: May 04, 2012 20:18 by scottdeboy
After further discussion, the proposed APIs are being modified to allow the stack to pass the location of dvb persistent root as the stack already knows this value:

/**
 * Gets the total amount of persistent storage under the location indicated
 * by the dvb.persistent.root property and that is usable by all OCAP-J
 * applications. This value SHALL remain constant.
 *
 * @param path a null-terminated char array containing the path to the directory representing dvb.persistent.root
 * @param numBytes the location where the implementation will return the
 *      total number of bytes provided to applications under dvb.persistent.root
 * @return MPE_STORAGE_ERR_NOERR if success
 *         MPE_STORAGE_ERR_INVALID_PARAM if numBytes or path is null
 */
mpe_StorageError mpeos_storageGetTotalDVBStorage(char* path, uint64_t* numBytes);

/**
 * Gets the available amount of persistent storage under the location
 * indicated by the dvb.persistent.root property that is available to all
 * applications. The value returned by this method can be incorrect as soon
 * as this function returns
 *
 * @param path a null-terminated char array containing the path to the directory representing dvb.persistent.root
 * @param numBytes the location where the implementation will return the
 *      number of bytes available to all applications under dvb.persistent.root
 * @return MPE_STORAGE_ERR_NOERR if success
 *         MPE_STORAGE_ERR_INVALID_PARAM if numBytes or path is null
 */
mpe_StorageError mpeos_storageGetAvailableDVBStorage(char* path, uint64_t* numBytes);

Replies: 1 - Last Post: May 04, 2012 20:18
by: scottdeboy
 
 
Close
loading
Please Confirm
Close