usb.jphoto
Class Command

java.lang.Object
  |
  +--usb.jphoto.Buffer
        |
        +--usb.jphoto.Container
              |
              +--usb.jphoto.ParamVector
                    |
                    +--usb.jphoto.Command

public class Command
extends ParamVector

Command messages start PTP transactions, and are sent from initiator to responder. They include an operation code, either conform to chapter 10 of the PTP specification or are vendor-specific commands.

Create these objects in helper routines which package intelligence about a given Operation. That is, it'll know the command code, how many command and response parameters may be used, particularly significant response code, and whether the transaction has a data phase (and its direction).


Field Summary
static int CloseSession
          OperationCode:
static int CopyObject
          OperationCode:
static int DeleteObject
          OperationCode:
static int FormatStore
          OperationCode:
static int GetDeviceInfo
          OperationCode:
static int GetDevicePropDesc
          OperationCode:
static int GetDevicePropValue
          OperationCode:
static int GetNumObjects
          OperationCode:
static int GetObject
          OperationCode:
static int GetObjectHandles
          OperationCode:
static int GetObjectInfo
          OperationCode:
static int GetPartialObject
          OperationCode:
static int GetStorageIDs
          OperationCode:
static int GetStorageInfo
          OperationCode:
static int GetThumb
          OperationCode:
static int InitiateCapture
          OperationCode:
static int InitiateOpenCapture
          OperationCode:
static int MoveObject
          OperationCode:
static int OpenSession
          OperationCode:
static int PowerDown
          OperationCode:
static int ResetDevice
          OperationCode:
static int ResetDevicePropValue
          OperationCode:
static int SelfTest
          OperationCode:
static int SendObject
          OperationCode:
static int SendObjectInfo
          OperationCode:
static int SetDevicePropValue
          OperationCode:
static int SetObjectProtection
          OperationCode:
static int TerminateOpenCapture
          OperationCode:
 
Method Summary
 java.lang.String getCodeName(int code)
          Subclasses override this to map PTP codes to their names; the results are always interned strings, so that they can be efficiently compared ("=", "!=") against constants.
 
Methods inherited from class usb.jphoto.ParamVector
getNumParams, getParam1, getParam2, getParam3
 
Methods inherited from class usb.jphoto.Container
getBlockType, getBlockTypeName, getCode, getCodeString, getCodeString, getCodeType, getLength, getXID, toString
 
Methods inherited from class usb.jphoto.Buffer
getS16, getS32, getS64, getS8, getString, getU16, getU8, nextS16, nextS16Array, nextS32, nextS32Array, nextS64, nextS64Array, nextS8, nextS8Array, nextString, nextU16, nextU16Array, nextU8, nextU8Array, put16, put32, put64, put8, putString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

GetDeviceInfo

public static final int GetDeviceInfo
OperationCode:

OpenSession

public static final int OpenSession
OperationCode:

CloseSession

public static final int CloseSession
OperationCode:

GetStorageIDs

public static final int GetStorageIDs
OperationCode:

GetStorageInfo

public static final int GetStorageInfo
OperationCode:

GetNumObjects

public static final int GetNumObjects
OperationCode:

GetObjectHandles

public static final int GetObjectHandles
OperationCode:

GetObjectInfo

public static final int GetObjectInfo
OperationCode:

GetObject

public static final int GetObject
OperationCode:

GetThumb

public static final int GetThumb
OperationCode:

DeleteObject

public static final int DeleteObject
OperationCode:

SendObjectInfo

public static final int SendObjectInfo
OperationCode:

SendObject

public static final int SendObject
OperationCode:

InitiateCapture

public static final int InitiateCapture
OperationCode:

FormatStore

public static final int FormatStore
OperationCode:

ResetDevice

public static final int ResetDevice
OperationCode:

SelfTest

public static final int SelfTest
OperationCode:

SetObjectProtection

public static final int SetObjectProtection
OperationCode:

PowerDown

public static final int PowerDown
OperationCode:

GetDevicePropDesc

public static final int GetDevicePropDesc
OperationCode:

GetDevicePropValue

public static final int GetDevicePropValue
OperationCode:

SetDevicePropValue

public static final int SetDevicePropValue
OperationCode:

ResetDevicePropValue

public static final int ResetDevicePropValue
OperationCode:

TerminateOpenCapture

public static final int TerminateOpenCapture
OperationCode:

MoveObject

public static final int MoveObject
OperationCode:

CopyObject

public static final int CopyObject
OperationCode:

GetPartialObject

public static final int GetPartialObject
OperationCode:

InitiateOpenCapture

public static final int InitiateOpenCapture
OperationCode:
Method Detail

getCodeName

public java.lang.String getCodeName(int code)
Description copied from class: Container
Subclasses override this to map PTP codes to their names; the results are always interned strings, so that they can be efficiently compared ("=", "!=") against constants. Such per-instance methods permit type-specific subclasses (and vendor extensions) to name their code values, invoking superclass methods to name all other codes.
Overrides:
getCodeName in class Container


Associated source code is licenced under the GPL.
See http://jphoto.sourceforge.net
This documentation was derived from that source code on 2001-04-12.