com.sony.remotecontrol.ir
Interface Device


public interface Device

This interface defines methods to retrieve infomation on the device object and to send keys that the device object has.


Field Summary
static int INVALID_DEVICE_ID
           
 
Method Summary
 DeviceCategory getCategory()
          Returns the device's category.
 java.lang.String getDeviceName()
          Returns the device's name.
 int getInstanceId()
          Returns the device's ID.
 java.util.List<Key> getKeyList()
          Returns keys that this device has.
 java.lang.String getManufacturerName()
          Returns a manufacturer name of the device.
 boolean sendKey(Key key)
          Request to send IR code.
 boolean startRepeatKey(Key key)
          Request to send IR code repeatedly.
 void stopRepeatKey()
          Request to stop sending IR code repeatedly.
 

Field Detail

INVALID_DEVICE_ID

static final int INVALID_DEVICE_ID
See Also:
Constant Field Values
Method Detail

getInstanceId

int getInstanceId()
Returns the device's ID. Synchronous method.

Returns:
the device ID or INVALID_DEVICE_ID

getCategory

DeviceCategory getCategory()
Returns the device's category. Synchronous method.

Returns:
the device category. If failed, return null.
Throws:
java.lang.IllegalStateException - if IrManager is not activated. If this device is invalid.

getManufacturerName

java.lang.String getManufacturerName()
Returns a manufacturer name of the device. Synchronous method.

Returns:
manufacturer name. If failed, return null.
Throws:
java.lang.IllegalStateException - if IrManager is not activated. If this device is invalid.

getDeviceName

java.lang.String getDeviceName()
Returns the device's name. Synchronous method.

Returns:
device name. If failed, return null.
Throws:
java.lang.IllegalStateException - if IrManager is not activated. If this device is invalid.

getKeyList

java.util.List<Key> getKeyList()
Returns keys that this device has. Synchronous method.

Returns:
the keys of the device except custom key. If failed, return null.
Throws:
java.lang.IllegalStateException - if IrManager is not activated. If this device is invalid.

sendKey

boolean sendKey(Key key)
Request to send IR code. Asynchronous method.

Parameters:
key - a key to send.
Returns:
success to request or not.
Throws:
java.lang.IllegalStateException - if IrManager is not activated. If this device is invalid.

startRepeatKey

boolean startRepeatKey(Key key)
Request to send IR code repeatedly. Asynchronous method.

Parameters:
key - a key to send.
Returns:
success to request or not.
Throws:
java.lang.IllegalStateException - if IrManager is not activated. If this device is invalid.

stopRepeatKey

void stopRepeatKey()
Request to stop sending IR code repeatedly. Asynchronous method.

Throws:
java.lang.IllegalStateException - if IrManager is not activated. If this device is invalid.