com.hqme.cm
Interface IStorageManager

All Known Implementing Classes:
IStorageManager.Stub

public interface IStorageManager

IStorageManager defines the HQME Virtual Storage Device(VSD) plugin manager interfaces. IStorageManager provides an abstract interface for an application to query and determine the number/attributes of VSDs that are available for the client.


Nested Class Summary
static class IStorageManager.Stub
          Local-side IPC implementation stub class.
 
Method Summary
 long[] getFunctionGroups(int storageId)
          Retrieve function groups for a registered VSD
 IVSD getStorage(int storageId)
          Retrieve an instance of a client's VSD with the matching storageId
 int[] getStorageIds(long[] functiongroups)
          Provide a list of VSD storageIds that are ready and available on the client.
 void registerCallback(IStorageManagerCallback cb)
          Register a client application callback function to get informed with VSDs' status changes.
 int registerPlugin(IVSD pluginProxy)
          Interface to let a VSD plugin register itself with IStorageManager (aka the plugin manager).
 void unregisterCallback(IStorageManagerCallback cb)
          Unregister a client application callback function.
 void unregisterPlugin(IVSD pluginProxy)
          Interface to let a VSD plugin unregister itself with IStorageManager (aka the plugin manager).
 void updateStatus(int eventCode, int storageID)
          Interface to let a VSD plugin inform IStorageManager its status' change.
 int VSDCount()
          Provides a count of the number of ready and available VSDs on the client.
 

Method Detail

registerPlugin

int registerPlugin(IVSD pluginProxy)
                   throws android.os.RemoteException
Interface to let a VSD plugin register itself with IStorageManager (aka the plugin manager).

Parameters:
pluginProxy - the instance of the VSD plugin.
Returns:
VSD storage id. It is assigned by the content storage manager and shall be persistent and stored in VSD. Note: not a P2200 API
Throws:
android.os.RemoteException

unregisterPlugin

void unregisterPlugin(IVSD pluginProxy)
                      throws android.os.RemoteException
Interface to let a VSD plugin unregister itself with IStorageManager (aka the plugin manager).

Parameters:
pluginProxy - the instance of the VSD plugin. Note: not a P2200 API
Throws:
android.os.RemoteException

updateStatus

void updateStatus(int eventCode,
                  int storageID)
                  throws android.os.RemoteException
Interface to let a VSD plugin inform IStorageManager its status' change. This is not a HQME App's interface.

Parameters:
eventCode - enumeration of the event code.
storageId - indicates the storage the event sent from. Note: not a P2200 API
Throws:
android.os.RemoteException

registerCallback

void registerCallback(IStorageManagerCallback cb)
                      throws android.os.RemoteException
Register a client application callback function to get informed with VSDs' status changes.

Parameters:
cb - the client application's callback function Note: not a P2200 API
Throws:
android.os.RemoteException

unregisterCallback

void unregisterCallback(IStorageManagerCallback cb)
                        throws android.os.RemoteException
Unregister a client application callback function.

Parameters:
cb - the client application's callback function Note: not a P2200 API
Throws:
android.os.RemoteException

VSDCount

int VSDCount()
             throws android.os.RemoteException
Provides a count of the number of ready and available VSDs on the client.

Returns:
Count of available VSDs. Negative if error. Possible error codes are "ERR_NOT_FOUND", "ERR_GENERAL".
Throws:
android.os.RemoteException

getStorageIds

int[] getStorageIds(long[] functiongroups)
                    throws android.os.RemoteException
Provide a list of VSD storageIds that are ready and available on the client.

Parameters:
functiongroups - Filter for desired VSDs. If not null, this optional argument is an array of long values identifying one or more capabilities supported by the VSD.
Returns:
List of storage ids. Return null if no VSD available.
Throws:
android.os.RemoteException

getStorage

IVSD getStorage(int storageId)
                throws android.os.RemoteException
Retrieve an instance of a client's VSD with the matching storageId

Parameters:
storageId -
Returns:
Reference to actual VSD. If the storage ID value is "zero", the default VSD will be returned to the caller.
Throws:
android.os.RemoteException

getFunctionGroups

long[] getFunctionGroups(int storageId)
                         throws android.os.RemoteException
Retrieve function groups for a registered VSD

Parameters:
storageId -
Returns:
Array of function groups for the given VSD storage. If the storage ID value is "zero", the first VSD will be returned to the caller. If NULL is returned, the storageId may be invalid, or the VSD may have been removed from the time the storageIds were retrieved to the time this method was invoked. NULL may be returned if the VSD does not support any additional function groups.
Throws:
android.os.RemoteException