public interface IUsbStorageManagerService
Modifier and Type | Field and Description |
---|---|
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 |
Modifier and Type | Method and Description |
---|---|
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
|
static final java.lang.String SERVICE_NAME
static final java.lang.String USB_STORAGE_ATTACHED
static final java.lang.String USB_STORAGE_DETACHED
boolean areDevicesPresent()
java.lang.String[] getDeviceUsbPorts()
java.lang.String getDeviceNode(java.lang.String usbPortNumber)
usbPortNumber
- A String representing the USB port that the device is plugged into.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 asboolean unmountDevice(java.lang.String mountPoint)
mountPoint
- A String representing the mount point for the USB device to be unmounted.void registerListener(UsbStorageListener listener)
listener
- A class implementing the UsbStorageListener interfacevoid unregisterListener(UsbStorageListener listener)
listener
- A class implementing the UsbStorageListener interfacejava.lang.String[] getPartitions(java.lang.String deviceNode)
deviceNode
- A String representing the USB device node assigned to the USB device.Copyright © 2009 Eurotech Inc. All rights reserved.