Inherits from EOSPropertyObject : EOSObject : NSObject
Declared in EOSCamera.h
EOSCamera.m

Overview

EOSCamera is a class used to represent a camera. It is a subclass of EOSPropertyObject. Instances of this class will typically be created by the [EOSManager getCameras] method.

Tasks

Properties

Initialization

Managing Sessions

Managing Volumes

Getting Supported Values

Sending Commands

Managing the State

Managing the Delegate

Properties

description

A description of the camera.

@property (readonly) NSString *description

Discussion

This is typically the camera’s model name.

Declared In

EOSCamera.h

isOpen

Indicates whether the camera has an open session.

@property (readonly) BOOL isOpen

Declared In

EOSCamera.h

port

The camera’s port name.

@property (readonly) NSString *port

Discussion

This property is provided by the EDSDK and does not seem to represent a physical port. It appears to be the position of the camera in the camera list. Therefore, this value can change if cameras are disconnected, and should not be used as an indentifier.

Declared In

EOSCamera.h

state

The camera’s current state, as defined in EOSCameraState.

@property (readonly) EOSCameraState state

Discussion

The camera’s current state, as defined in EOSCameraState.

Declared In

EOSCamera.h

Instance Methods

closeSession:

Closes the camera session.

- (BOOL)closeSession:(NSError *__autoreleasing *)error

Parameters

error

If unsuccessful, an instance of NSError describes the problem.

Return Value

YES if successful, otherwise NO.

Declared In

EOSCamera.h

delegate

Returns the camera’s delegate.

- (id<EOSCameraDelegate>)delegate

Return Value

The camera’s delegate, or nil if it doesn’t have a delegate.

Declared In

EOSCamera.h

initWithCameraRef:

Initializes a newly allocated EOSCamera instance with a reference to an EDSDK camera.

- (id)initWithCameraRef:(EdsCameraRef)cameraRef

Parameters

cameraRef

An EDSDK camera reference.

Return Value

The intialized EOSCamera object.

Declared In

EOSCamera.h

openSession:

Opens a session with the camera.

- (BOOL)openSession:(NSError *__autoreleasing *)error

Parameters

error

If unsuccessful, an instance of NSError describes the problem.

Return Value

YES if successful, otherwise NO.

Discussion

This must be performed before accessing properties or sending commands.

Declared In

EOSCamera.h

sendCommand:error:

Sends a command to the camera.

- (BOOL)sendCommand:(EOSCameraCommand)command error:(NSError *__autoreleasing *)error

Parameters

command

The command.

error

If unsuccessful, an instance of NSError describes the problem.

Return Value

YES if successful, otherwise NO.

Discussion

Sends a command to the camera.

Declared In

EOSCamera.h

sendCommand:withParameter:error:

Sends a command with a parameter to the camera.

- (BOOL)sendCommand:(EOSCameraCommand)command withParameter:(NSInteger)parameter error:(NSError *__autoreleasing *)error

Parameters

command

The command.

parameter

A parameter to send with the command.

error

If unsuccessful, an instance of NSError describes the problem.

Return Value

YES if successful, otherwise NO.

Discussion

Sends a command with a parameter to the camera.

Declared In

EOSCamera.h

setDelegate:

Sets the camera’s delegate to a given object or removes an existing delegate.

- (void)setDelegate:(id<EOSCameraDelegate>)delegate

Parameters

delegate

The delegate for the camera. Pass nil to remove an existing delegate.

Declared In

EOSCamera.h

setState:error:

Sets the state of the camera.

- (BOOL)setState:(EOSCameraState)state error:(NSError *__autoreleasing *)error

Parameters

state

The target state, as defined in EOSCameraState.

error

If unsuccessful, an instance of NSError describes the problem.

Return Value

YES if successful, otherwise NO.

Declared In

EOSCamera.h

supportedValuesForProperty:error:

Gets a list of values that the camera supports in it’s current mode, for a given property.

- (NSArray *)supportedValuesForProperty:(EOSProperty)property error:(NSError *__autoreleasing *)error

Parameters

property

The property to get supported values for.

error

If unsuccessful, an instance of NSError describes the problem.

Return Value

If successful an array containing the supported values as NSNumbers, otherwise nil.

Discussion

Use this to find the supported values for a numeric type property, such as aperture, shutter speed, ISO etc. The list of supported values may change when the camera’s mode is changed.

Declared In

EOSCamera.h

volumeAtIndex:error:

Gets the volume at the specified index.

- (EOSVolume *)volumeAtIndex:(NSUInteger)index error:(NSError *__autoreleasing *)error

Parameters

index

The index of the volume to get.

error

If unsuccessful, an instance of NSError describes the problem.

Return Value

If successful, an EOSVolume object representing the volume, otherwise nil.

Discussion

Use volumeCount:error: to find the valid index range.

Declared In

EOSCamera.h

volumeCount:

Gets the number of volumes that are mounted on the camera.

- (NSNumber *)volumeCount:(NSError *__autoreleasing *)error

Parameters

error

If unsuccessful, an instance of NSError describes the problem.

Return Value

If successful, the number of volumes, otherwise nil.

Declared In

EOSCamera.h

volumes

Gets all of the volumes that are mounted on the camera.

- (NSArray *)volumes

Return Value

An array containing instances of EOSVolume.

Discussion

If there is an error retrieving a volume, the function will continue without adding it to the array. If you need to check for errors when reteiving each volume, use volumeAtIndex:error: instead.

Declared In

EOSCamera.h