|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The USB Storage Manager Service provides tools for management of USB Mass Storage devices.
Field Summary | |
static java.lang.String |
SERVICE_NAME
Reports the class name representing this interface. |
static java.lang.String |
USB_STORAGE_ATTACHED
|
static java.lang.String |
USB_STORAGE_DETACHED
|
Method Summary | |
boolean |
areDevicesPresent()
This method returns whether or not there are any devices currently attached. |
java.lang.String |
getDeviceNode(java.lang.String usbPortNumber)
This method returns the device node that has been assigned to the USB Mass Storage device attached to a specified USB port. |
java.lang.String[] |
getDeviceUsbPorts()
Returns an array of Strings that represent the USB port names of the connected devices. |
java.lang.String[] |
getPartitions(java.lang.String deviceNode)
Returns a list of Strings representing the partitions on the storage device, null if no partitions exits. |
boolean |
mountDevice(java.lang.String deviceNode,
java.lang.String mountPoint,
java.lang.String type)
This method mounts a specified USB Mass Storage device to a specified mount point. |
void |
registerListener(UsbStorageListener listener)
This method registers an USB Storage Listener to be notified when a device has been attached or detached |
boolean |
unmountDevice(java.lang.String mountPoint)
This method unmounts a specified USB Mass Storage device. |
void |
unregisterListener(UsbStorageListener listener)
This method unregisters an USB Storage Listener |
Field Detail |
public static final java.lang.String SERVICE_NAME
public static final java.lang.String USB_STORAGE_ATTACHED
public static final java.lang.String USB_STORAGE_DETACHED
Method Detail |
public boolean areDevicesPresent()
public java.lang.String[] getDeviceUsbPorts()
public java.lang.String getDeviceNode(java.lang.String usbPortNumber)
usbPortNumber
- A String representing the USB port that the device is plugged into.
public boolean mountDevice(java.lang.String deviceNode, java.lang.String mountPoint, java.lang.String type)
deviceNode
- A String representing the USB device node assigned to the USB device.mountPoint
- A String representing the mount point for the USB device to be mounted to.type
- The filesystem type to mount the device as
public boolean unmountDevice(java.lang.String mountPoint)
mountPoint
- A String representing the mount point for the USB device to be unmounted.
public void registerListener(UsbStorageListener listener)
listener
- A class implementing the UsbStorageListener interfacepublic void unregisterListener(UsbStorageListener listener)
listener
- A class implementing the UsbStorageListener interfacepublic java.lang.String[] getPartitions(java.lang.String deviceNode)
deviceNode
- A String representing the USB device node assigned to the USB device.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |