usb.jphoto
Class DevicePropDesc

java.lang.Object
  |
  +--usb.jphoto.Buffer
        |
        +--usb.jphoto.Container
              |
              +--usb.jphoto.Data
                    |
                    +--usb.jphoto.DevicePropDesc

public class DevicePropDesc
extends Data

DeviceProperty descriptions provide metadata (code, type, factory defaults, is-it-writable, and perhaps value ranges or domains) and current values of device properties.

The values exposed are typically java.lang.Integer, java.lang.Long, "int" or "long" arrays, or Strings, and must be cast to more specific types. The 64 bit integral types are supported, but not the 128 bit ones; unsigned 64 bit values may not print as intended.


Inner Class Summary
static class DevicePropDesc.Range
          This class describes value ranges by minima, maxima, and permissible increments.
 
Field Summary
static int Artist
           
static int BatteryLevel
           
static int BurstInterval
           
static int BurstNumber
           
static int CaptureDelay
           
static int CompressionSetting
           
static int Contrast
           
static int CopyrightInfo
           
static int DateTime
           
static int DigitalZoom
           
static int EffectMode
           
static int ExposureBiasCompensation
           
static int ExposureIndex
           
static int ExposureMeteringMode
           
static int ExposureProgramMode
           
static int ExposureTime
           
static int FlashMode
           
static int FocalLength
           
static int FocusDistance
           
static int FocusMeteringMode
           
static int FocusMode
           
static int FStop
           
static int FunctionalMode
           
static int ImageSize
           
static int RGBGain
           
static int Sharpness
           
static int StillCaptureMode
           
static int TimelapseInterval
           
static int TimelapseNumber
           
static int UploadURL
           
static int WhiteBalance
           
 
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.
 java.lang.Object getDefault()
          Returns the factory default value (treat as immutable!)
 java.util.Vector getEnumeration()
          Returns any enumerated options for this property's value, or null
static int getPropertyCode(java.lang.String name)
          Maps standard property names to property codes.
 DevicePropDesc.Range getRange()
          Returns any range constraints for this property's value, or null
 java.lang.Object getValue()
          Returns the current value (treat as immutable!)
 boolean isWritable()
          Returns true if the property is writable
 
Methods inherited from class usb.jphoto.Data
toString
 
Methods inherited from class usb.jphoto.Container
getBlockType, getBlockTypeName, getCode, getCodeString, getCodeString, getCodeType, getLength, getXID
 
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

BatteryLevel

public static final int BatteryLevel

FunctionalMode

public static final int FunctionalMode

ImageSize

public static final int ImageSize

CompressionSetting

public static final int CompressionSetting

WhiteBalance

public static final int WhiteBalance

RGBGain

public static final int RGBGain

FStop

public static final int FStop

FocalLength

public static final int FocalLength

FocusDistance

public static final int FocusDistance

FocusMode

public static final int FocusMode

ExposureMeteringMode

public static final int ExposureMeteringMode

FlashMode

public static final int FlashMode

ExposureTime

public static final int ExposureTime

ExposureProgramMode

public static final int ExposureProgramMode

ExposureIndex

public static final int ExposureIndex

ExposureBiasCompensation

public static final int ExposureBiasCompensation

DateTime

public static final int DateTime

CaptureDelay

public static final int CaptureDelay

StillCaptureMode

public static final int StillCaptureMode

Contrast

public static final int Contrast

Sharpness

public static final int Sharpness

DigitalZoom

public static final int DigitalZoom

EffectMode

public static final int EffectMode

BurstNumber

public static final int BurstNumber

BurstInterval

public static final int BurstInterval

TimelapseNumber

public static final int TimelapseNumber

TimelapseInterval

public static final int TimelapseInterval

FocusMeteringMode

public static final int FocusMeteringMode

UploadURL

public static final int UploadURL

Artist

public static final int Artist

CopyrightInfo

public static final int CopyrightInfo
Method Detail

isWritable

public boolean isWritable()
Returns true if the property is writable

getValue

public java.lang.Object getValue()
Returns the current value (treat as immutable!)

getDefault

public java.lang.Object getDefault()
Returns the factory default value (treat as immutable!)

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 Data

getPropertyCode

public static int getPropertyCode(java.lang.String name)
Maps standard property names to property codes. Case is ignored in these comparisons.
Parameters:
name - string identifying that property.
Returns:
device property code, or -1

getRange

public DevicePropDesc.Range getRange()
Returns any range constraints for this property's value, or null

getEnumeration

public java.util.Vector getEnumeration()
Returns any enumerated options for this property's value, or null


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.