|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--usb.jphoto.NameFactory | +--usb.jphoto.BaselineInitiator | +--usb.jphoto.Initiator
This supports all standardized PTP-over-USB operations, including operations (and modes) that are optional for all responders. Filtering operations invoked on this class may be done on the device, or may be emulated on the client side. At this time, not all standardized operations are supported.
Constructor Summary | |
Initiator(usb.core.Device dev)
This is essentially a class driver, following Annex D of the PTP specification. |
|
Initiator(usb.core.Interface intf)
This is essentially a class driver, following Annex D of the PTP specification. |
Method Summary | |
int |
copyObject(int handle,
int storageId,
int parent)
|
int |
deleteObject(int handle,
int formats)
|
int |
formatStore(int storageId,
int formatCode)
Reformats the specified storage unit. |
int |
getDevicePropDesc(int propcode,
DevicePropDesc desc)
Fills out the provided device property description. |
int |
getDevicePropValue(int propcode,
DevicePropValue value)
Gets the value of the specified device property. |
int[] |
getImageHandles(int storageID,
int association)
Returns an array of image handles in the store (or stores) specified; uses device-side filtering when it's available. |
int |
getNumImages(int storageID,
int association)
Returns the number of images in the specified association on the specified store; uses device-side filtering when it's available. |
Response |
getPartialObject(int handle,
int offset,
int count)
|
int |
initiateCapture(int storageId,
int formatCode)
Starts the capture of one (or more) new data objects, according to current device properties. |
int |
initiateOpenCapture(int storageId,
int formatCode)
Starts an open-ended capture of new data objects, according to current device properties. |
int |
moveObject(int handle,
int storageId,
int parent)
|
int |
powerDown()
Sends a PowerDown command to the device, causing it to power down and close all currently open sessions. |
int |
resetDevice()
Sends a ResetDevice command to the device, putting it into a default state and closing all open sessions. |
int |
resetDevicePropValue(int propcode)
Resets the value of the specified device property to the factory default. |
int |
selfTest(int type)
Sends a SelfTest command to the device. |
int |
setDevicePropValue(int propcode,
DevicePropValue value)
Sets the value of the specified device property. |
int |
setObjectProtection(int handle,
int status)
|
int |
terminateOpenCapture()
Closes the current session's open capture operation. |
Methods inherited from class usb.jphoto.BaselineInitiator |
close, closeSession, fillObject, finalize, getDeviceInfo, getDeviceInfoUncached, getNumObjects, getObject, getObjectHandles, getObjectInfo, getPortIdentifier, getPtpInterface, getSessionId, getStorageIDs, getStorageInfo, getThumb, isPull, isPush, openSession, reset, run, sendObject, sendObjectInfo, transact, transact0, transact1, transact2, transact3 |
Methods inherited from class usb.jphoto.NameFactory |
getEventString, getFormatString, getOpcodeString, getPropertyName, getResponseString |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Initiator(usb.core.Device dev) throws java.io.IOException
public Initiator(usb.core.Interface intf) throws java.io.IOException
Method Detail |
public int copyObject(int handle, int storageId, int parent) throws java.io.IOException
public int deleteObject(int handle, int formats) throws java.io.IOException
public int formatStore(int storageId, int formatCode) throws java.io.IOException
deleteObject(int, int)
.storageId
- the storage unit to reformatformatCode
- normally zero. Otherwise, a value as defined
in table 12 of the PTP specification, selecting among types of
filesystem supported by the device (flat, hierarchical, DCF,
vendor-defined, and so on).public int getDevicePropDesc(int propcode, DevicePropDesc desc) throws java.io.IOException
propcode
- code identifying the property of interestdesc
- description to be filled; it may be a subtype
associated with with domain-specific methodspublic int getDevicePropValue(int propcode, DevicePropValue value) throws java.io.IOException
propcode
- code identifying the property of interestvalue
- the value to be filledpublic int[] getImageHandles(int storageID, int association) throws java.io.IOException
storageID
- either ~0 to indicate all media, or the
ID for some particular store.association
- either zero, or ~0 to specify the root
of a store; or else an association handle.public int getNumImages(int storageID, int association) throws java.io.IOException
storageID
- either ~0 to indicate all media, or the
ID for some particular store.association
- 0, or the object handle for some associationpublic Response getPartialObject(int handle, int offset, int count) throws java.io.IOException
public int initiateCapture(int storageId, int formatCode) throws java.io.IOException
storageId
- Where to store the object(s), or zero to
let the device choose.formatCode
- Type of object(s) to capture, or zero to
use the device default.initiateOpenCapture(int, int)
public int initiateOpenCapture(int storageId, int formatCode) throws java.io.IOException
terminateOpenCapture()
is invoked.
Intended applications include "manually" controlled exposures,
and capture of time-based data such as audio or video.storageId
- Where to store the object(s), or zero to
let the device choose.formatCode
- Type of object(s) to capture, or zero to
use the device default.initiateCapture(int, int)
public int moveObject(int handle, int storageId, int parent) throws java.io.IOException
public int powerDown() throws java.io.IOException
public int resetDevice() throws java.io.IOException
public int resetDevicePropValue(int propcode) throws java.io.IOException
propcode
- code identifying the property of interestpublic int selfTest(int type) throws java.io.IOException
type
- typically zero, or a vendor-defined codepublic int setDevicePropValue(int propcode, DevicePropValue value) throws java.io.IOException
propcode
- code identifying the property of interestvalue
- the value to be assignedpublic int setObjectProtection(int handle, int status) throws java.io.IOException
public int terminateOpenCapture() throws java.io.IOException
initiateOpenCapture(int, int)
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |