Skip to content

Instantly share code, notes, and snippets.

@yeroc
Created February 14, 2011 18:25
Show Gist options
  • Save yeroc/826304 to your computer and use it in GitHub Desktop.
Save yeroc/826304 to your computer and use it in GitHub Desktop.
Canon EOS SDK v2.9 Headers
/******************************************************************************
* *
* PROJECT : EOS Digital Software Development Kit EDSDK *
* NAME : EDSDK.h *
* *
* Description: PROTO TYPE DEFINITION OF EDSDK API *
* *
*******************************************************************************
* *
* Written and developed by Canon Inc. *
* Copyright Canon Inc. 2006-2007 All Rights Reserved *
* *
*******************************************************************************
* File Update Information: *
* DATE Identify Comment *
* ----------------------------------------------------------------------- *
* 06-03-16 F-001 create first version. *
* *
******************************************************************************/
#ifndef _EDSDK_H_
#define _EDSDK_H_
#ifdef __cplusplus
extern "C" {
#endif
#ifdef __MACOS__
#include<CoreFoundation/CoreFoundation.h>
#else
#include <windows.h>
#endif
#include "EDSDKTypes.h"
#include "EDSDKErrors.h"
#if defined( BUILD_EDSDK_DLL )
#define EDSAPI EDSEXPORT EDSSTDCALL
#else
#define EDSAPI EDSIMPORT EDSSTDCALL
#endif
#define oldif 0
/*----------------------------------------------------------------------------*/
/******************************************************************************
*******************************************************************************
//
// Basic functions
//
*******************************************************************************
******************************************************************************/
/*-----------------------------------------------------------------------------
//
// Function: EdsInitializeSDK
//
// Description:
// Initializes the libraries.
// When using the EDSDK libraries, you must call this API once
// before using EDSDK APIs.
//
// Parameters:
// In: None
// Out: None
//
// Returns: Any of the sdk errors.
-----------------------------------------------------------------------------*/
EdsError EDSAPI EdsInitializeSDK();
/*-----------------------------------------------------------------------------
//
// Function: EdsTerminateSDK
//
// Description:
// Terminates use of the libraries.
// This function muse be called when ending the SDK.
// Calling this function releases all resources allocated by the libraries.
//
// Parameters:
// In: None
// Out: None
//
// Returns: Any of the sdk errors.
-----------------------------------------------------------------------------*/
EdsError EDSAPI EdsTerminateSDK();
/******************************************************************************
*******************************************************************************
//
// Reference-counter operating functions
//
*******************************************************************************
******************************************************************************/
/*-----------------------------------------------------------------------------
//
// Function: EdsRetain
//
// Description:
// Increments the reference counter of existing objects.
//
// Parameters:
// In: inRef - The reference for the item.
// Out: None
//
// Returns: Any of the sdk errors.
-----------------------------------------------------------------------------*/
EdsUInt32 EDSAPI EdsRetain( EdsBaseRef inRef );
/*-----------------------------------------------------------------------------
//
// Function: EdsRelease
//
// Description:
// Decrements the reference counter to an object.
// When the reference counter reaches 0, the object is released.
//
// Parameters:
// In: inRef - The reference of the item.
// Out: None
// Returns: Any of the sdk errors.
-----------------------------------------------------------------------------*/
EdsUInt32 EDSAPI EdsRelease( EdsBaseRef inRef );
/******************************************************************************
*******************************************************************************
//
// Item-tree operating functions
//
*******************************************************************************
******************************************************************************/
/*-----------------------------------------------------------------------------
//
// Function: EdsGetChildCount
//
// Description:
// Gets the number of child objects of the designated object.
// Example: Number of files in a directory
//
// Parameters:
// In: inRef - The reference of the list.
// Out: outCount - Number of elements in this list.
//
// Returns: Any of the sdk errors.
-----------------------------------------------------------------------------*/
EdsError EDSAPI EdsGetChildCount( EdsBaseRef inRef,
EdsUInt32* outCount );
/*-----------------------------------------------------------------------------
//
// Function: EdsGetChildAtIndex
//
// Description:
// Gets an indexed child object of the designated object.
//
// Parameters:
// In: inRef - The reference of the item.
// inIndex - The index that is passed in, is zero based.
// Out: outRef - The pointer which receives reference of the
// specified index .
//
// Returns: Any of the sdk errors.
-----------------------------------------------------------------------------*/
EdsError EDSAPI EdsGetChildAtIndex( EdsBaseRef inRef,
EdsInt32 inIndex,
EdsBaseRef* outRef );
/*-----------------------------------------------------------------------------
//
// Function: EdsGetParent
//
// Description:
// Gets the parent object of the designated object.
//
// Parameters:
// In: inRef - The reference of the item.
// Out: outParentRef - The pointer which receives reference.
//
// Returns: Any of the sdk errors.
-----------------------------------------------------------------------------*/
EdsError EDSAPI EdsGetParent( EdsBaseRef inRef,
EdsBaseRef* outParentRef );
/******************************************************************************
*******************************************************************************
//
// Property operating functions
//
*******************************************************************************
******************************************************************************/
/*-----------------------------------------------------------------------------
//
// Function: EdsGetPropertySize
//
// Description:
// Gets the byte size and data type of a designated property
// from a camera object or image object.
//
// Parameters:
// In: inRef - The reference of the item.
// inPropertyID - The ProprtyID
// inParam - Additional information of property.
// We use this parameter in order to specify an index
// in case there are two or more values over the same ID.
// Out: outDataType - Pointer to the buffer that is to receive the property
// type data.
// outSize - Pointer to the buffer that is to receive the property
// size.
//
// Returns: Any of the sdk errors.
-----------------------------------------------------------------------------*/
EdsError EDSAPI EdsGetPropertySize( EdsBaseRef inRef,
EdsPropertyID inPropertyID,
EdsInt32 inParam,
EdsDataType* outDataType,
EdsUInt32* outSize );
/*-----------------------------------------------------------------------------
//
// Function: EdsGetPropertyData
//
// Description:
// Gets property information from the object designated in inRef.
//
// Parameters:
// In: inRef - The reference of the item.
// inPropertyID - The ProprtyID
// inParam - Additional information of property.
// We use this parameter in order to specify an index
// in case there are two or more values over the same ID.
// inPropertySize - The number of bytes of the prepared buffer
// for receive property-value.
// Out: outPropertyData - The buffer pointer to receive property-value.
//
// Returns: Any of the sdk errors.
-----------------------------------------------------------------------------*/
EdsError EDSAPI EdsGetPropertyData( EdsBaseRef inRef,
EdsPropertyID inPropertyID,
EdsInt32 inParam,
EdsUInt32 inPropertySize,
EdsVoid* outPropertyData );
/*-----------------------------------------------------------------------------
//
// Function: EdsSetPropertyData
//
// Description:
// Sets property data for the object designated in inRef.
//
// Parameters:
// In: inRef - The reference of the item.
// inPropertyID - The ProprtyID
// inParam - Additional information of property.
// inPropertySize - The number of bytes of the prepared buffer
// for set property-value.
// inPropertyData - The buffer pointer to set property-value.
// Out: None
//
// Returns: Any of the sdk errors.
-----------------------------------------------------------------------------*/
EdsError EDSAPI EdsSetPropertyData( EdsBaseRef inRef,
EdsPropertyID inPropertyID,
EdsInt32 inParam,
EdsUInt32 inPropertySize,
const EdsVoid* inPropertyData );
/*-----------------------------------------------------------------------------
//
// Function: EdsGetPropertyDesc
//
// Description:
// Gets a list of property data that can be set for the object
// designated in inRef, as well as maximum and minimum values.
// This API is intended for only some shooting-related properties.
//
// Parameters:
// In: inRef - The reference of the camera.
// inPropertyID - The Property ID.
// Out: outPropertyDesc - Array of the value which can be set up.
//
// Returns: Any of the sdk errors.
-----------------------------------------------------------------------------*/
EdsError EDSAPI EdsGetPropertyDesc( EdsBaseRef inRef,
EdsPropertyID inPropertyID,
EdsPropertyDesc* outPropertyDesc );
/******************************************************************************
*******************************************************************************
//
// Device-list and device operating functions
//
*******************************************************************************
******************************************************************************/
/*-----------------------------------------------------------------------------
//
// Function: EdsGetCameraList
//
// Description:
// Gets camera list objects.
//
// Parameters:
// In: None
// Out: outCameraListRef - Pointer to the camera-list.
//
// Returns: Any of the sdk errors.
-----------------------------------------------------------------------------*/
EdsError EDSAPI EdsGetCameraList( EdsCameraListRef* outCameraListRef );
/******************************************************************************
*******************************************************************************
//
// Camera operating functions
//
*******************************************************************************
******************************************************************************/
/*-----------------------------------------------------------------------------
//
// Function: EdsGetDeviceInfo
//
// Description:
// Gets device information, such as the device name.
// Because device information of remote cameras is stored
// on the host computer, you can use this API
// before the camera object initiates communication
// (that is, before a session is opened).
//
// Parameters:
// In: inCameraRef - The reference of the camera.
// Out: outDeviceInfo - Information as device of camera.
//
// Returns: Any of the sdk errors.
-----------------------------------------------------------------------------*/
EdsError EDSAPI EdsGetDeviceInfo( EdsCameraRef inCameraRef,
EdsDeviceInfo* outDeviceInfo );
/*-----------------------------------------------------------------------------
//
// Function: EdsOpenSession
//
// Description:
// Establishes a logical connection with a remote camera.
// Use this API after getting the camera's EdsCamera object.
//
// Parameters:
// In: inCameraRef - The reference of the camera
// Out: None
//
// Returns: Any of the sdk errors.
-----------------------------------------------------------------------------*/
EdsError EDSAPI EdsOpenSession( EdsCameraRef inCameraRef );
/*-----------------------------------------------------------------------------
//
// Function: EdsCloseSession
//
// Description:
// Closes a logical connection with a remote camera.
//
// Parameters:
// In: inCameraRef - The reference of the camera
// Out: None
//
// Returns: Any of the sdk errors.
-----------------------------------------------------------------------------*/
EdsError EDSAPI EdsCloseSession( EdsCameraRef inCameraRef );
/*-----------------------------------------------------------------------------
//
// Function: EdsSendCommand
//
// Description:
// Sends a command such as "Shoot" to a remote camera.
//
// Parameters:
// In: inCameraRef - The reference of the camera which will receive the
// command.
// inCommand - Specifies the command to be sent.
// inParam - Specifies additional command-specific information.
// Out: None
//
// Returns: Any of the sdk errors.
-----------------------------------------------------------------------------*/
EdsError EDSAPI EdsSendCommand( EdsCameraRef inCameraRef,
EdsCameraCommand inCommand,
EdsInt32 inParam );
/*-----------------------------------------------------------------------------
//
// Function: EdsSendStatusCommand
//
// Description:
// Sets the remote camera state or mode.
//
// Parameters:
// In: inCameraRef - The reference of the camera which will receive the
// command.
// inStatusCommand - Specifies the command to be sent.
// inParam - Specifies additional command-specific information.
// Out: None
//
// Returns: Any of the sdk errors.
-----------------------------------------------------------------------------*/
EdsError EDSAPI EdsSendStatusCommand(
EdsCameraRef inCameraRef,
EdsCameraStatusCommand inStatusCommand,
EdsInt32 inParam );
/*-----------------------------------------------------------------------------
//
// Function: EdsSetCapacity
//
// Description:
// Sets the remaining HDD capacity on the host computer
// (excluding the portion from image transfer),
// as calculated by subtracting the portion from the previous time.
// Set a reset flag initially and designate the cluster length
// and number of free clusters.
// Some type 2 protocol standard cameras can display the number of shots
// left on the camera based on the available disk capacity
// of the host computer.
// For these cameras, after the storage destination is set to the computer,
// use this API to notify the camera of the available disk capacity
// of the host computer.
//
// Parameters:
// In: inCameraRef - The reference of the camera which will receive the
// command.
// inCapacity - The remaining capacity of a transmission place.
// Out: None
//
// Returns: Any of the sdk errors.
-----------------------------------------------------------------------------*/
EdsError EDSAPI EdsSetCapacity( EdsCameraRef inCameraRef,
EdsCapacity inCapacity );
/******************************************************************************
*******************************************************************************
//
// Volume operating functions
//
*******************************************************************************
******************************************************************************/
/*-----------------------------------------------------------------------------
//
// Function: EdsGetVolumeInfo
//
// Description:
// Gets volume information for a memory card in the camera.
//
// Parameters:
// In: inVolumeRef - The reference of the volume.
// Out: outVolumeInfo - information of the volume.
//
// Returns: Any of the sdk errors.
-----------------------------------------------------------------------------*/
EdsError EDSAPI EdsGetVolumeInfo( EdsVolumeRef inVolumeRef,
EdsVolumeInfo* outVolumeInfo );
/*-----------------------------------------------------------------------------
//
// Function: EdsFormatVolume
//
// Description:
// Formats volumes of memory cards in a camera.
//
// Parameters:
// In: inVolumeRef - The reference of volume .
//
// Returns: Any of the sdk errors.
-----------------------------------------------------------------------------*/
EdsError EDSAPI EdsFormatVolume( EdsVolumeRef inVolumeRef );
/******************************************************************************
*******************************************************************************
//
// Directory-item operating functions
//
*******************************************************************************
******************************************************************************/
/*-----------------------------------------------------------------------------
//
// Function: EdsGetDirectoryItemInfo
//
// Description:
// Gets information about the directory or file objects
// on the memory card (volume) in a remote camera.
//
// Parameters:
// In: inDirItemRef - The reference of the directory item.
// Out: outDirItemInfo - information of the directory item.
//
// Returns: Any of the sdk errors.
-----------------------------------------------------------------------------*/
EdsError EDSAPI EdsGetDirectoryItemInfo(
EdsDirectoryItemRef inDirItemRef,
EdsDirectoryItemInfo* outDirItemInfo );
/*-----------------------------------------------------------------------------
//
// Function: EdsDeleteDirectoryItem
//
// Description:
// Deletes a camera folder or file.
// If folders with subdirectories are designated, all files are deleted
// except protected files.
// EdsDirectoryItem objects deleted by means of this API are implicitly
// released by the EDSDK. Thus, there is no need to release them
// by means of EdsRelease.
//
// Parameters:
// In: inDirItemRef - The reference of the directory item.
//
// Returns: Any of the sdk errors.
-----------------------------------------------------------------------------*/
EdsError EDSAPI EdsDeleteDirectoryItem( EdsDirectoryItemRef inDirItemRef );
/*-----------------------------------------------------------------------------
//
// Function: EdsDownload
//
// Description:
// Downloads a file on a remote camera
// (in the camera memory or on a memory card) to the host computer.
// The downloaded file is sent directly to a file stream created in advance.
// When dividing the file being retrieved, call this API repeatedly.
// Also in this case, make the data block size a multiple of 512 (bytes),
// excluding the final block.
//
// Parameters:
// In: inDirItemRef - The reference of the directory item.
// inReadSize -
//
// Out: outStream - The reference of the stream.
//
// Returns: Any of the sdk errors.
-----------------------------------------------------------------------------*/
EdsError EDSAPI EdsDownload( EdsDirectoryItemRef inDirItemRef,
EdsUInt32 inReadSize,
EdsStreamRef outStream );
/*-----------------------------------------------------------------------------
//
// Function: EdsDownloadCancel
//
// Description:
// Must be executed when downloading of a directory item is canceled.
// Calling this API makes the camera cancel file transmission.
// It also releases resources.
// This operation need not be executed when using EdsDownloadThumbnail.
//
// Parameters:
// In: inDirItemRef - The reference of the directory item.
//
// Returns: Any of the sdk errors.
-----------------------------------------------------------------------------*/
EdsError EDSAPI EdsDownloadCancel( EdsDirectoryItemRef inDirItemRef );
/*-----------------------------------------------------------------------------
//
// Function: EdsDownloadComplete
//
// Description:
// Must be called when downloading of directory items is complete.
// Executing this API makes the camera
// recognize that file transmission is complete.
// This operation need not be executed when using EdsDownloadThumbnail.
//
// Parameters:
// In: inDirItemRef - The reference of the directory item.
//
// Out: outStream - None.
//
// Returns: Any of the sdk errors.
-----------------------------------------------------------------------------*/
EdsError EDSAPI EdsDownloadComplete( EdsDirectoryItemRef inDirItemRef );
/*-----------------------------------------------------------------------------
//
// Function: EdsDownloadThumbnail
//
// Description:
// Extracts and downloads thumbnail information from image files in a camera.
// Thumbnail information in the camera's image files is downloaded
// to the host computer.
// Downloaded thumbnails are sent directly to a file stream created in advance.
//
// Parameters:
// In: inDirItemRef - The reference of the directory item.
//
// Out: outStream - The reference of the stream.
//
// Returns: Any of the sdk errors.
-----------------------------------------------------------------------------*/
EdsError EDSAPI EdsDownloadThumbnail( EdsDirectoryItemRef inDirItemRef,
EdsStreamRef outStream );
/*-----------------------------------------------------------------------------
//
// Function: EdsGetAttribute
//
// Description:
// Gets attributes of files on a camera.
//
// Parameters:
// In: inDirItemRef - The reference of the directory item.
// Out: outFileAttribute - Indicates the file attributes.
// As for the file attributes, OR values of the value defined
// by enum EdsFileAttributes can be retrieved. Thus, when
// determining the file attributes, you must check
// if an attribute flag is set for target attributes.
//
// Returns: Any of the sdk errors.
-----------------------------------------------------------------------------*/
EdsError EDSAPI EdsGetAttribute( EdsDirectoryItemRef inDirItemRef,
EdsFileAttributes* outFileAttribute );
/*-----------------------------------------------------------------------------
//
// Function: EdsSetAttribute
//
// Description:
// Changes attributes of files on a camera.
//
// Parameters:
// In: inDirItemRef - The reference of the directory item.
// inFileAttribute - Indicates the file attributes.
// As for the file attributes, OR values of the value
// defined by enum EdsFileAttributes can be retrieved.
// Out: None
//
// Returns: Any of the sdk errors.
-----------------------------------------------------------------------------*/
EdsError EDSAPI EdsSetAttribute(
EdsDirectoryItemRef inDirItemRef,
EdsFileAttributes inFileAttribute );
/******************************************************************************
*******************************************************************************
//
// Stream operating functions
//
*******************************************************************************
******************************************************************************/
/*-----------------------------------------------------------------------------
//
// Function: EdsCreateFileStream
//
// Description:
// Creates a new file on a host computer (or opens an existing file)
// and creates a file stream for access to the file.
// If a new file is designated before executing this API,
// the file is actually created following the timing of writing
// by means of EdsWrite or the like with respect to an open stream.
//
// Parameters:
// In: inFileName - Pointer to a null-terminated string that specifies
// the file name.
// inCreateDisposition - Action to take on files that exist,
// and which action to take when files do not exist.
// inDesiredAccess - Access to the stream (reading, writing, or both).
// Out: outStream - The reference of the stream.
//
// Returns: Any of the sdk errors.
-----------------------------------------------------------------------------*/
EdsError EDSAPI EdsCreateFileStream(
const EdsChar* inFileName,
EdsFileCreateDisposition inCreateDisposition,
EdsAccess inDesiredAccess,
EdsStreamRef* outStream );
/*-----------------------------------------------------------------------------
//
// Function: EdsCreateMemoryStream
//
// Description:
// Creates a stream in the memory of a host computer.
// In the case of writing in excess of the allocated buffer size,
// the memory is automatically extended.
//
// Parameters:
// In: inBufferSize - The number of bytes of the memory to allocate.
// Out: outStream - The reference of the stream.
//
// Returns: Any of the sdk errors.
-----------------------------------------------------------------------------*/
EdsError EDSAPI EdsCreateMemoryStream(
EdsUInt32 inBufferSize,
EdsStreamRef* outStream );
/*-----------------------------------------------------------------------------
//
// Function: EdsCreateStreamEx
//
// Description:
// An extended version of EdsCreateStreamFromFile.
// Use this function when working with Unicode file names.
//
// Parameters:
// In: inURL (for Macintosh) - Designate CFURLRef.
// inFileName (for Windows) - Designate the file name.
// inCreateDisposition - Action to take on files that exist,
// and which action to take when files do not exist.
// inDesiredAccess - Access to the stream (reading, writing, or both).
//
// Out: outStream - The reference of the stream.
//
// Returns: Any of the sdk errors.
-----------------------------------------------------------------------------*/
EdsError EDSAPI EdsCreateFileStreamEx(
#ifdef __MACOS__
const CFURLRef inURL,
#else
const WCHAR* inFileName,
#endif
EdsFileCreateDisposition inCreateDisposition,
EdsAccess inDesiredAccess,
EdsStreamRef* outStream );
/*-----------------------------------------------------------------------------
//
// Function: EdsCreateMemoryStreamFromPointer
//
// Description:
// Creates a stream from the memory buffer you prepare.
// Unlike the buffer size of streams created by means of EdsCreateMemoryStream,
// the buffer size you prepare for streams created this way does not expand.
//
// Parameters:
// In: inUserBuffer - Pointer to the buffer you have prepared.
// Streams created by means of this API lead to this buffer.
// inBufferSize - The number of bytes of the memory to allocate.
// Out: outStream - The reference of the stream.
//
// Returns: Any of the sdk errors.
-----------------------------------------------------------------------------*/
EdsError EDSAPI EdsCreateMemoryStreamFromPointer(
EdsVoid* inUserBuffer,
EdsUInt32 inBufferSize,
EdsStreamRef* outStream );
/*-----------------------------------------------------------------------------
//
// Function: EdsGetPointer
//
// Description:
// Gets the pointer to the start address of memory managed by the memory stream.
// As the EDSDK automatically resizes the buffer, the memory stream provides
// you with the same access methods as for the file stream.
// If access is attempted that is excessive with regard to the buffer size
// for the stream, data before the required buffer size is allocated
// is copied internally, and new writing occurs.
// Thus, the buffer pointer might be switched on an unknown timing.
// Caution in use is therefore advised.
//
// Parameters:
// In: inStream - Designate the memory stream for the pointer to retrieve.
// Out: outPointer - If successful, returns the pointer to the buffer
// written in the memory stream.
//
// Returns: Any of the sdk errors.
-----------------------------------------------------------------------------*/
EdsError EDSAPI EdsGetPointer(
EdsStreamRef inStream,
EdsVoid** outPointer );
/*-----------------------------------------------------------------------------
//
// Function: EdsRead
//
// Description:
// Reads data the size of inReadSize into the outBuffer buffer,
// starting at the current read or write position of the stream.
// The size of data actually read can be designated in outReadSize.
//
// Parameters:
// In: inStreamRef - The reference of the stream or image.
// inReadSize - The number of bytes to read.
// Out: outBuffer - Pointer to the user-supplied buffer that is to receive
// the data read from the stream.
// outReadSize - The actually read number of bytes.
//
// Returns: Any of the sdk errors.
-----------------------------------------------------------------------------*/
EdsError EDSAPI EdsRead(
EdsStreamRef inStreamRef,
EdsUInt32 inReadSize,
EdsVoid* outBuffer,
EdsUInt32* outReadSize );
/*-----------------------------------------------------------------------------
//
// Function: EdsWrite
//
// Description:
// Writes data of a designated buffer
// to the current read or write position of the stream.
//
// Parameters:
// In: inStreamRef - The reference of the stream or image.
// inWriteSize - The number of bytes to write.
// inBuffer - A pointer to the user-supplied buffer that contains
// the data to be written to the stream.
// Out: outWrittenSize - The actually written-in number of bytes.
//
// Returns: Any of the sdk errors.
-----------------------------------------------------------------------------*/
EdsError EDSAPI EdsWrite(
EdsStreamRef inStreamRef,
EdsUInt32 inWriteSize,
const EdsVoid* inBuffer,
EdsUInt32* outWrittenSize );
/*-----------------------------------------------------------------------------
//
// Function: EdsSeek
//
// Description:
// Moves the read or write position of the stream
(that is, the file position indicator).
//
// Parameters:
// In: inStreamRef - The reference of the stream or image.
// inSeekOffset - Number of bytes to move the pointer.
// inSeekOrigin - Pointer movement mode. Must be one of the following
// values.
// kEdsSeek_Cur Move the stream pointer inSeekOffset bytes
// from the current position in the stream.
// kEdsSeek_Begin Move the stream pointer inSeekOffset bytes
// forward from the beginning of the stream.
// kEdsSeek_End Move the stream pointer inSeekOffset bytes
// from the end of the stream.
//
// Returns: Any of the sdk errors.
-----------------------------------------------------------------------------*/
EdsError EDSAPI EdsSeek(
EdsStreamRef inStreamRef,
EdsInt32 inSeekOffset,
EdsSeekOrigin inSeekOrigin );
/*-----------------------------------------------------------------------------
//
// Function: EdsGetPosition
//
// Description:
// Gets the current read or write position of the stream
// (that is, the file position indicator).
//
// Parameters:
// In: inStreamRef - The reference of the stream or image.
// Out: outPosition - The current stream pointer.
//
// Returns: Any of the sdk errors.
-----------------------------------------------------------------------------*/
EdsError EDSAPI EdsGetPosition(
EdsStreamRef inStreamRef,
EdsUInt32* outPosition );
/*-----------------------------------------------------------------------------
//
// Function: EdsGetLength
//
// Description:
// Gets the stream size.
//
// Parameters:
// In: inStreamRef - The reference of the stream or image.
// Out: outLength - The length of the stream.
//
// Returns: Any of the sdk errors.
-----------------------------------------------------------------------------*/
EdsError EDSAPI EdsGetLength(
EdsStreamRef inStreamRef,
EdsUInt32* outLength );
/*-----------------------------------------------------------------------------
//
// Function: EdsCopyData
//
// Description:
// Copies data from the copy source stream to the copy destination stream.
// The read or write position of the data to copy is determined from
// the current file read or write position of the respective stream.
// After this API is executed, the read or write positions of the copy source
// and copy destination streams are moved an amount corresponding to
// inWriteSize in the positive direction.
//
// Parameters:
// In: inStreamRef - The reference of the stream or image.
// inWriteSize - The number of bytes to copy.
// Out: outStreamRef - The reference of the stream or image.
//
// Returns: Any of the sdk errors.
-----------------------------------------------------------------------------*/
EdsError EDSAPI EdsCopyData(
EdsStreamRef inStreamRef,
EdsUInt32 inWriteSize,
EdsStreamRef outStreamRef );
/*-----------------------------------------------------------------------------
//
// Function: EdsSetProgressCallback
//
// Description:
// Register a progress callback function.
// An event is received as notification of progress during processing that
// takes a relatively long time, such as downloading files from a
// remote camera.
// If you register the callback function, the EDSDK calls the callback
// function during execution or on completion of the following APIs.
// This timing can be used in updating on-screen progress bars, for example.
//
// Parameters:
// In: inRef - The reference of the stream or image.
// inProgressCallback - Pointer to a progress callback function.
// inProgressOption - The option about progress is specified.
// Must be one of the following values.
// kEdsProgressOption_Done
// When processing is completed,a callback function
// is called only at once.
// kEdsProgressOption_Periodically
// A callback function is performed periodically.
// inContext - Application information, passed in the argument
// when the callback function is called. Any information
// required for your program may be added.
// Out: None
//
// Returns: Any of the sdk errors.
-----------------------------------------------------------------------------*/
EdsError EDSAPI EdsSetProgressCallback(
EdsBaseRef inRef,
EdsProgressCallback inProgressCallback,
EdsProgressOption inProgressOption,
EdsVoid* inContext );
/******************************************************************************
*******************************************************************************
//
// Image operating functions
//
*******************************************************************************
******************************************************************************/
/*-----------------------------------------------------------------------------
//
// Function: EdsCreateImageRef
//
// Description:
// Creates an image object from an image file.
// Without modification, stream objects cannot be worked with as images.
// Thus, when extracting images from image files,
// you must use this API to create image objects.
// The image object created this way can be used to get image information
// (such as the height and width, number of color components, and
// resolution), thumbnail image data, and the image data itself.
//
// Parameters:
// In: inStreamRef - The reference of the stream.
//
// Out: outImageRef - The reference of the image.
//
// Returns: Any of the sdk errors.
-----------------------------------------------------------------------------*/
EdsError EDSAPI EdsCreateImageRef( EdsStreamRef inStreamRef,
EdsImageRef* outImageRef );
/*-----------------------------------------------------------------------------
//
// Function: EdsGetImageInfo
//
// Description:
// Gets image information from a designated image object.
// Here, image information means the image width and height,
// number of color components, resolution, and effective image area.
//
// Parameters:
// In: inStreamRef - Designate the object for which to get image information.
// inImageSource - Of the various image data items in the image file,
// designate the type of image data representing the
// information you want to get. Designate the image as
// defined in Enum EdsImageSource.
//
// kEdsImageSrc_FullView
// The image itself (a full-sized image)
// kEdsImageSrc_Thumbnail
// A thumbnail image
// kEdsImageSrc_Preview
// A preview image
// kEdsImageSrc_RAWThumbnail
// A RAW thumbnail image
// kEdsImageSrc_RAWFullView
// A RAW full-sized image
// Out: outImageInfo - Stores the image data information designated
// in inImageSource.
//
// Returns: Any of the sdk errors.
-----------------------------------------------------------------------------*/
EdsError EDSAPI EdsGetImageInfo( EdsImageRef inImageRef,
EdsImageSource inImageSource,
EdsImageInfo* outImageInfo );
/*-----------------------------------------------------------------------------
//
// Function: EdsGetImage
//
// Description:
// Gets designated image data from an image file, in the form of a
// designated rectangle.
// Returns uncompressed results for JPEGs and processed results
// in the designated pixel order (RGB, Top-down BGR, and so on) for
// RAW images.
// Additionally, by designating the input/output rectangle,
// it is possible to get reduced, enlarged, or partial images.
// However, because images corresponding to the designated output rectangle
// are always returned by the SDK, the SDK does not take the aspect
// ratio into account.
// To maintain the aspect ratio, you must keep the aspect ratio in mind
// when designating the rectangle.
//
// Parameters:
// In:
// inImageRef - Designate the image object for which to get
// the image data.
// inImageSource - Designate the type of image data to get from
// the image file (thumbnail, preview, and so on).
// Designate values as defined in Enum EdsImageSource.
// inImageType - Designate the output image type. Because
// the output format of EdGetImage may only be RGB, only
// kEdsTargetImageType_RGB or kEdsTargetImageType_RGB16
// can be designated.
// However, image types exceeding the resolution of
// inImageSource cannot be designated.
// inSrcRect - Designate the coordinates and size of the rectangle
// to be retrieved (processed) from the source image.
// inDstSize - Designate the rectangle size for output.
//
// Out:
// outStreamRef - Designate the memory or file stream for output of
// the image.
// Returns: Any of the sdk errors.
-----------------------------------------------------------------------------*/
EdsError EDSAPI EdsGetImage(
EdsImageRef inImageRef,
EdsImageSource inImageSource,
EdsTargetImageType inImageType,
EdsRect inSrcRect,
EdsSize inDstSize,
EdsStreamRef outStreamRef );
/*-----------------------------------------------------------------------------
//
// Function: EdsSaveImage
//
// Description:
// Saves as a designated image type after RAW processing.
// When saving with JPEG compression,
// the JPEG quality setting applies with respect to EdsOptionRef.
//
// Parameters:
// In:
// inImageRef - Designate the image object for which to produce the file.
// inImageType - Designate the image type to produce. Designate the
// following image types.
//
// kEdsTargetImageType - Jpeg JPEG
// kEdsTargetImageType - TIFF 8-bit TIFF
// kEdsTargetImageType - TIFF16 16-bit TIFF
// inSaveSetting - Designate saving options, such as JPEG image quality.
// Out:
// outStreamRef - Specifies the output file stream. The memory stream
// cannot be specified here.
// Returns: Any of the sdk errors.
-----------------------------------------------------------------------------*/
EdsError EDSAPI EdsSaveImage(
EdsImageRef inImageRef,
EdsTargetImageType inImageType,
EdsSaveImageSetting inSaveSetting,
EdsStreamRef outStreamRef );
/*-----------------------------------------------------------------------------
//
// Function: EdsCacheImage
//
// Description:
// Switches a setting on and off for creation of an image cache in the SDK
// for a designated image object during extraction (processing) of
// the image data.
// Creating the cache increases the processing speed, starting from
// the second time.
//
// Parameters:
// In: inImageRef - The reference of the image.
// inUseCache - If cache image data or not
// If set to FALSE, the cached image data will released.
// Out: None
//
// Returns: Any of the sdk errors.
-----------------------------------------------------------------------------*/
EdsError EDSAPI EdsCacheImage( EdsImageRef inImageRef,
EdsBool inUseCache );
/*-----------------------------------------------------------------------------
//
// Function: EdsReflectImageProperty
// Description:
// Incorporates image object property changes
// (effected by means of EdsSetPropertyData) in the stream.
//
// Parameters:
// In: inImageRef - The reference of the image.
// Out: None
//
// Returns: Any of the sdk errors.
-----------------------------------------------------------------------------*/
EdsError EDSAPI EdsReflectImageProperty( EdsImageRef inImageRef );
/*-----------------------------------------------------------------------------
//
// Function: EdsCreateEvfImageRef
// Description:
// Creates an object used to get the live view image data set.
//
// Parameters:
// In: inStreamRef - The stream reference which opened to get EVF JPEG image.
// Out: outEvfImageRef - The EVFData reference.
//
// Returns: Any of the sdk errors.
-----------------------------------------------------------------------------*/
EdsError EdsCreateEvfImageRef (
EdsStreamRef inStreamRef,
EdsEvfImageRef *outEvfImageRef ) ;
/*-----------------------------------------------------------------------------
//
// Function: EdsDownloadEvfImage
// Description:
// Downloads the live view image data set for a camera currently in live view mode.
// Live view can be started by using the property ID:kEdsPropertyID_Evf_OutputDevice and
// data:EdsOutputDevice_PC to call EdsSetPropertyData.
// In addition to image data, information such as zoom, focus position, and histogram data
// is included in the image data set. Image data is saved in a stream maintained by EdsEvfImageRef.
// EdsGetPropertyData can be used to get information such as the zoom, focus position, etc.
// Although the information of the zoom and focus position can be obtained from EdsEvfImageRef,
// settings are applied to EdsCameraRef.
//
// Parameters:
// In: inCameraRef - The Camera reference.
// In: inEvfImageRef - The EVFData reference.
//
// Returns: Any of the sdk errors.
-----------------------------------------------------------------------------*/
EdsError EdsDownloadEvfImage ( EdsCameraRef inCameraRef,
EdsEvfImageRef inEvfImageRef ) ;
/******************************************************************************
*******************************************************************************
//
// Event handler registering functions
//
*******************************************************************************
******************************************************************************/
/*-----------------------------------------------------------------------------
//
// Function: EdsSetCameraAddedHandler
//
// Description:
// Registers a callback function for when a camera is detected.
//
// Parameters:
// In: inCameraAddedHandler - Pointer to a callback function
// called when a camera is connected physically
// inContext - Specifies an application-defined value to be sent to
// the callback function pointed to by CallBack parameter.
// Out: None
//
// Returns: Any of the sdk errors.
-----------------------------------------------------------------------------*/
EdsError EDSAPI EdsSetCameraAddedHandler(
EdsCameraAddedHandler inCameraAddedHandler,
EdsVoid* inContext );
/*-----------------------------------------------------------------------------
//
// Function: EdsSetPropertyEventHandler
//
// Description:
// Registers a callback function for receiving status
// change notification events for property states on a camera.
//
// Parameters:
// In: inCameraRef - Designate the camera object.
// inEvent - Designate one or all events to be supplemented.
// inPropertyEventHandler - Designate the pointer to the callback
// function for receiving property-related camera events.
// inContext - Designate application information to be passed by
// means of the callback function. Any data needed for
// your application can be passed.
// Out: None
//
// Returns: Any of the sdk errors.
-----------------------------------------------------------------------------*/
EdsError EDSAPI EdsSetPropertyEventHandler(
EdsCameraRef inCameraRef,
EdsPropertyEvent inEvnet,
EdsPropertyEventHandler inPropertyEventHandler,
EdsVoid* inContext );
/*-----------------------------------------------------------------------------
//
// Function: EdsSetObjectEventHandler
//
// Description:
// Registers a callback function for receiving status
// change notification events for objects on a remote camera.
// Here, object means volumes representing memory cards, files and directories,
// and shot images stored in memory, in particular.
//
// Parameters:
// In: inCameraRef - Designate the camera object.
// inEvent - Designate one or all events to be supplemented.
// To designate all events, use kEdsObjectEvent_All.
// inObjectEventHandler - Designate the pointer to the callback function
// for receiving object-related camera events.
// inContext - Passes inContext without modification,
// as designated as an EdsSetObjectEventHandler argument.
// Out: None
//
// Returns: Any of the sdk errors.
-----------------------------------------------------------------------------*/
EdsError EDSAPI EdsSetObjectEventHandler(
EdsCameraRef inCameraRef,
EdsObjectEvent inEvnet,
EdsObjectEventHandler inObjectEventHandler,
EdsVoid* inContext );
/*-----------------------------------------------------------------------------
//
// Function: EdsSetCameraStateEventHandler
//
// Description:
// Registers a callback function for receiving status
// change notification events for property states on a camera.
//
// Parameters:
// In: inCameraRef - Designate the camera object.
// inEvent - Designate one or all events to be supplemented.
// To designate all events, use kEdsStateEvent_All.
// inStateEventHandler - Designate the pointer to the callback function
// for receiving events related to camera object states.
// inContext - Designate application information to be passed
// by means of the callback function. Any data needed for
// your application can be passed.
// Out: None
//
// Returns: Any of the sdk errors.
-----------------------------------------------------------------------------*/
EdsError EDSAPI EdsSetCameraStateEventHandler(
EdsCameraRef inCameraRef,
EdsStateEvent inEvnet,
EdsStateEventHandler inStateEventHandler,
EdsVoid* inContext );
/*----------------------------------------------------------------------------*/
EdsError EDSAPI EdsCreateStream(EdsIStream* inStream, EdsStreamRef* outStreamRef);
/*-----------------------------------------------------------------------------
//
// Function: EdsGetEvent
//
// Description:
// This function acquires an event.
// In console application, please call this function regularly to acquire
// the event from a camera.
//
// Parameters:
// In: None
// Out: None
//
// Returns: Any of the sdk errors.
-----------------------------------------------------------------------------*/
EdsError EDSAPI EdsGetEvent();
#ifdef __cplusplus
}
#endif
#endif /* _EDSDK_H_ */
/******************************************************************************
* *
* PROJECT : EOS Digital Software Development Kit EDSDK *
* NAME : EDSDKErros.h *
* *
* Description: ERROR DEFINITION FOR EDSDK *
* *
*******************************************************************************
* *
* Written and developed by Canon Inc. *
* Copyright Canon Inc. 2006-2007 All Rights Reserved *
* *
*******************************************************************************
* File Update Information: *
* DATE Identify Comment *
* ----------------------------------------------------------------------- *
* 06-03-16 F-001 create first version. *
* *
******************************************************************************/
#ifndef _EDS_ERRORS_H_
#define _EDS_ERRORS_H_
/*----------------------------------------------------------------------------*/
/******************************************************************************
Definition of error Codes
******************************************************************************/
/*-----------------------------------------------------------------------
ED-SDK Error Code Masks
------------------------------------------------------------------------*/
#define EDS_ISSPECIFIC_MASK 0x80000000L
#define EDS_COMPONENTID_MASK 0x7F000000L
#define EDS_RESERVED_MASK 0x00FF0000L
#define EDS_ERRORID_MASK 0x0000FFFFL
/*-----------------------------------------------------------------------
ED-SDK Base Component IDs
------------------------------------------------------------------------*/
#define EDS_CMP_ID_CLIENT_COMPONENTID 0x01000000L
#define EDS_CMP_ID_LLSDK_COMPONENTID 0x02000000L
#define EDS_CMP_ID_HLSDK_COMPONENTID 0x03000000L
/*-----------------------------------------------------------------------
ED-SDK Functin Success Code
------------------------------------------------------------------------*/
#define EDS_ERR_OK 0x00000000L
/*-----------------------------------------------------------------------
ED-SDK Generic Error IDs
------------------------------------------------------------------------*/
/* Miscellaneous errors */
#define EDS_ERR_UNIMPLEMENTED 0x00000001L
#define EDS_ERR_INTERNAL_ERROR 0x00000002L
#define EDS_ERR_MEM_ALLOC_FAILED 0x00000003L
#define EDS_ERR_MEM_FREE_FAILED 0x00000004L
#define EDS_ERR_OPERATION_CANCELLED 0x00000005L
#define EDS_ERR_INCOMPATIBLE_VERSION 0x00000006L
#define EDS_ERR_NOT_SUPPORTED 0x00000007L
#define EDS_ERR_UNEXPECTED_EXCEPTION 0x00000008L
#define EDS_ERR_PROTECTION_VIOLATION 0x00000009L
#define EDS_ERR_MISSING_SUBCOMPONENT 0x0000000AL
#define EDS_ERR_SELECTION_UNAVAILABLE 0x0000000BL
/* File errors */
#define EDS_ERR_FILE_IO_ERROR 0x00000020L
#define EDS_ERR_FILE_TOO_MANY_OPEN 0x00000021L
#define EDS_ERR_FILE_NOT_FOUND 0x00000022L
#define EDS_ERR_FILE_OPEN_ERROR 0x00000023L
#define EDS_ERR_FILE_CLOSE_ERROR 0x00000024L
#define EDS_ERR_FILE_SEEK_ERROR 0x00000025L
#define EDS_ERR_FILE_TELL_ERROR 0x00000026L
#define EDS_ERR_FILE_READ_ERROR 0x00000027L
#define EDS_ERR_FILE_WRITE_ERROR 0x00000028L
#define EDS_ERR_FILE_PERMISSION_ERROR 0x00000029L
#define EDS_ERR_FILE_DISK_FULL_ERROR 0x0000002AL
#define EDS_ERR_FILE_ALREADY_EXISTS 0x0000002BL
#define EDS_ERR_FILE_FORMAT_UNRECOGNIZED 0x0000002CL
#define EDS_ERR_FILE_DATA_CORRUPT 0x0000002DL
#define EDS_ERR_FILE_NAMING_NA 0x0000002EL
/* Directory errors */
#define EDS_ERR_DIR_NOT_FOUND 0x00000040L
#define EDS_ERR_DIR_IO_ERROR 0x00000041L
#define EDS_ERR_DIR_ENTRY_NOT_FOUND 0x00000042L
#define EDS_ERR_DIR_ENTRY_EXISTS 0x00000043L
#define EDS_ERR_DIR_NOT_EMPTY 0x00000044L
/* Property errors */
#define EDS_ERR_PROPERTIES_UNAVAILABLE 0x00000050L
#define EDS_ERR_PROPERTIES_MISMATCH 0x00000051L
#define EDS_ERR_PROPERTIES_NOT_LOADED 0x00000053L
/* Function Parameter errors */
#define EDS_ERR_INVALID_PARAMETER 0x00000060L
#define EDS_ERR_INVALID_HANDLE 0x00000061L
#define EDS_ERR_INVALID_POINTER 0x00000062L
#define EDS_ERR_INVALID_INDEX 0x00000063L
#define EDS_ERR_INVALID_LENGTH 0x00000064L
#define EDS_ERR_INVALID_FN_POINTER 0x00000065L
#define EDS_ERR_INVALID_SORT_FN 0x00000066L
/* Device errors */
#define EDS_ERR_DEVICE_NOT_FOUND 0x00000080L
#define EDS_ERR_DEVICE_BUSY 0x00000081L
#define EDS_ERR_DEVICE_INVALID 0x00000082L
#define EDS_ERR_DEVICE_EMERGENCY 0x00000083L
#define EDS_ERR_DEVICE_MEMORY_FULL 0x00000084L
#define EDS_ERR_DEVICE_INTERNAL_ERROR 0x00000085L
#define EDS_ERR_DEVICE_INVALID_PARAMETER 0x00000086L
#define EDS_ERR_DEVICE_NO_DISK 0x00000087L
#define EDS_ERR_DEVICE_DISK_ERROR 0x00000088L
#define EDS_ERR_DEVICE_CF_GATE_CHANGED 0x00000089L
#define EDS_ERR_DEVICE_DIAL_CHANGED 0x0000008AL
#define EDS_ERR_DEVICE_NOT_INSTALLED 0x0000008BL
#define EDS_ERR_DEVICE_STAY_AWAKE 0x0000008CL
#define EDS_ERR_DEVICE_NOT_RELEASED 0x0000008DL
/* Stream errors */
#define EDS_ERR_STREAM_IO_ERROR 0x000000A0L
#define EDS_ERR_STREAM_NOT_OPEN 0x000000A1L
#define EDS_ERR_STREAM_ALREADY_OPEN 0x000000A2L
#define EDS_ERR_STREAM_OPEN_ERROR 0x000000A3L
#define EDS_ERR_STREAM_CLOSE_ERROR 0x000000A4L
#define EDS_ERR_STREAM_SEEK_ERROR 0x000000A5L
#define EDS_ERR_STREAM_TELL_ERROR 0x000000A6L
#define EDS_ERR_STREAM_READ_ERROR 0x000000A7L
#define EDS_ERR_STREAM_WRITE_ERROR 0x000000A8L
#define EDS_ERR_STREAM_PERMISSION_ERROR 0x000000A9L
#define EDS_ERR_STREAM_COULDNT_BEGIN_THREAD 0x000000AAL
#define EDS_ERR_STREAM_BAD_OPTIONS 0x000000ABL
#define EDS_ERR_STREAM_END_OF_STREAM 0x000000ACL
/* Communications errors */
#define EDS_ERR_COMM_PORT_IS_IN_USE 0x000000C0L
#define EDS_ERR_COMM_DISCONNECTED 0x000000C1L
#define EDS_ERR_COMM_DEVICE_INCOMPATIBLE 0x000000C2L
#define EDS_ERR_COMM_BUFFER_FULL 0x000000C3L
#define EDS_ERR_COMM_USB_BUS_ERR 0x000000C4L
/* Lock/Unlock */
#define EDS_ERR_USB_DEVICE_LOCK_ERROR 0x000000D0L
#define EDS_ERR_USB_DEVICE_UNLOCK_ERROR 0x000000D1L
/* STI/WIA */
#define EDS_ERR_STI_UNKNOWN_ERROR 0x000000E0L
#define EDS_ERR_STI_INTERNAL_ERROR 0x000000E1L
#define EDS_ERR_STI_DEVICE_CREATE_ERROR 0x000000E2L
#define EDS_ERR_STI_DEVICE_RELEASE_ERROR 0x000000E3L
#define EDS_ERR_DEVICE_NOT_LAUNCHED 0x000000E4L
#define EDS_ERR_ENUM_NA 0x000000F0L
#define EDS_ERR_INVALID_FN_CALL 0x000000F1L
#define EDS_ERR_HANDLE_NOT_FOUND 0x000000F2L
#define EDS_ERR_INVALID_ID 0x000000F3L
#define EDS_ERR_WAIT_TIMEOUT_ERROR 0x000000F4L
/* PTP */
#define EDS_ERR_SESSION_NOT_OPEN 0x00002003
#define EDS_ERR_INVALID_TRANSACTIONID 0x00002004
#define EDS_ERR_INCOMPLETE_TRANSFER 0x00002007
#define EDS_ERR_INVALID_STRAGEID 0x00002008
#define EDS_ERR_DEVICEPROP_NOT_SUPPORTED 0x0000200A
#define EDS_ERR_INVALID_OBJECTFORMATCODE 0x0000200B
#define EDS_ERR_SELF_TEST_FAILED 0x00002011
#define EDS_ERR_PARTIAL_DELETION 0x00002012
#define EDS_ERR_SPECIFICATION_BY_FORMAT_UNSUPPORTED 0x00002014
#define EDS_ERR_NO_VALID_OBJECTINFO 0x00002015
#define EDS_ERR_INVALID_CODE_FORMAT 0x00002016
#define EDS_ERR_UNKNOWN_VENDOR_CODE 0x00002017
#define EDS_ERR_CAPTURE_ALREADY_TERMINATED 0x00002018
#define EDS_ERR_INVALID_PARENTOBJECT 0x0000201A
#define EDS_ERR_INVALID_DEVICEPROP_FORMAT 0x0000201B
#define EDS_ERR_INVALID_DEVICEPROP_VALUE 0x0000201C
#define EDS_ERR_SESSION_ALREADY_OPEN 0x0000201E
#define EDS_ERR_TRANSACTION_CANCELLED 0x0000201F
#define EDS_ERR_SPECIFICATION_OF_DESTINATION_UNSUPPORTED 0x00002020
/* PTP Vendor */
#define EDS_ERR_UNKNOWN_COMMAND 0x0000A001
#define EDS_ERR_OPERATION_REFUSED 0x0000A005
#define EDS_ERR_LENS_COVER_CLOSE 0x0000A006
#define EDS_ERR_LOW_BATTERY 0x0000A101
#define EDS_ERR_OBJECT_NOTREADY 0x0000A102
#define EDS_ERR_TAKE_PICTURE_AF_NG 0x00008D01L
#define EDS_ERR_TAKE_PICTURE_RESERVED 0x00008D02L
#define EDS_ERR_TAKE_PICTURE_MIRROR_UP_NG 0x00008D03L
#define EDS_ERR_TAKE_PICTURE_SENSOR_CLEANING_NG 0x00008D04L
#define EDS_ERR_TAKE_PICTURE_SILENCE_NG 0x00008D05L
#define EDS_ERR_TAKE_PICTURE_NO_CARD_NG 0x00008D06L
#define EDS_ERR_TAKE_PICTURE_CARD_NG 0x00008D07L
#define EDS_ERR_TAKE_PICTURE_CARD_PROTECT_NG 0x00008D08L
#define EDS_ERR_TAKE_PICTURE_MOVIE_CROP_NG 0x00008D09L
#define EDS_ERR_TAKE_PICTURE_STROBO_CHARGE_NG 0x00008D0AL
#define EDS_ERR_LAST_GENERIC_ERROR_PLUS_ONE 0x000000F5L
/*----------------------------------------------------------------------------*/
#endif /* _EDS_ERRORS_H_ */
/******************************************************************************
* *
* PROJECT : EOS Digital Software Development Kit EDSDK *
* NAME : EdsTypes.h *
* *
* Description: COMMON DEFINITION FOR EDSDK *
* *
*******************************************************************************
* *
* Written and developed by Canon Inc. *
* Copyright Canon Inc. 2006-2008 All Rights Reserved *
* *
*******************************************************************************
* File Update Information: *
* DATE Identify Comment *
* ----------------------------------------------------------------------- *
* 06-03-16 F-001 create first version. *
* *
******************************************************************************/
#ifndef _EDS_TYPES_H_
#define _EDS_TYPES_H_
#ifdef __MACOS__
#if PRAGMA_STRUCT_ALIGN
#pragma options align=mac68k
#endif
#else
#pragma pack (push, 8)
#endif
#ifdef __MACOS__
#define EDSSTDCALL
#define EDSEXPORT
#define EDSIMPORT
#else
#define EDSSTDCALL __stdcall
#define EDSEXPORT __declspec(dllexport)
#define EDSIMPORT __declspec(dllimport)
#endif
/*----------------------------------------------------------------------------*/
/******************************************************************************
Definition of Constants
******************************************************************************/
#define EDS_MAX_NAME 256
#define EDS_TRANSFER_BLOCK_SIZE 512
/******************************************************************************
Definition of Data Types
******************************************************************************/
/*-----------------------------------------------------------------------------
Callback Types
-----------------------------------------------------------------------------*/
#define EDSCALLBACK EDSSTDCALL
/*-----------------------------------------------------------------------------
Basic Types
-----------------------------------------------------------------------------*/
#ifndef NULL
#ifdef __cplusplus
#define NULL 0
#else
#define NULL ((void *)0)
#endif
#endif
#ifndef FALSE
#define FALSE 0
#endif
#ifndef TRUE
#define TRUE 1
#endif
typedef void EdsVoid;
typedef int EdsBool;
typedef char EdsChar;
typedef char EdsInt8;
typedef unsigned char EdsUInt8;
typedef short EdsInt16;
typedef unsigned short EdsUInt16;
typedef long EdsInt32;
typedef unsigned long EdsUInt32;
#ifdef __MACOS__
#ifdef __cplusplus
typedef long long EdsInt64;
typedef unsigned long long EdsUInt64;
#else
typedef SInt64 EdsInt64;
typedef UInt64 EdsUInt64;
#endif
#else
typedef __int64 EdsInt64;
typedef unsigned __int64 EdsUInt64;
#endif
typedef float EdsFloat;
typedef double EdsDouble;
/*-----------------------------------------------------------------------------
Error Types
-----------------------------------------------------------------------------*/
typedef EdsUInt32 EdsError;
/*-----------------------------------------------------------------------------
Reference Types
-----------------------------------------------------------------------------*/
typedef struct __EdsObject* EdsBaseRef;
typedef EdsBaseRef EdsCameraListRef;
typedef EdsBaseRef EdsCameraRef;
typedef EdsBaseRef EdsVolumeRef;
typedef EdsBaseRef EdsDirectoryItemRef;
typedef EdsBaseRef EdsStreamRef;
typedef EdsStreamRef EdsImageRef;
typedef EdsBaseRef EdsEvfImageRef ;
/*-----------------------------------------------------------------------------
Data Types
-----------------------------------------------------------------------------*/
typedef enum
{
kEdsDataType_Unknown = 0,
kEdsDataType_Bool = 1,
kEdsDataType_String = 2,
kEdsDataType_Int8 = 3,
kEdsDataType_UInt8 = 6,
kEdsDataType_Int16 = 4,
kEdsDataType_UInt16 = 7,
kEdsDataType_Int32 = 8,
kEdsDataType_UInt32 = 9,
kEdsDataType_Int64 = 10,
kEdsDataType_UInt64 = 11,
kEdsDataType_Float = 12,
kEdsDataType_Double = 13,
kEdsDataType_ByteBlock = 14,
kEdsDataType_Rational = 20,
kEdsDataType_Point = 21,
kEdsDataType_Rect = 22,
kEdsDataType_Time = 23,
kEdsDataType_Bool_Array = 30,
kEdsDataType_Int8_Array = 31,
kEdsDataType_Int16_Array = 32,
kEdsDataType_Int32_Array = 33,
kEdsDataType_UInt8_Array = 34,
kEdsDataType_UInt16_Array = 35,
kEdsDataType_UInt32_Array = 36,
kEdsDataType_Rational_Array = 37,
kEdsDataType_FocusInfo = 101,
kEdsDataType_PictureStyleDesc,
} EdsDataType;
/*-----------------------------------------------------------------------------
Property IDs
-----------------------------------------------------------------------------*/
typedef EdsUInt32 EdsPropertyID;
/*----------------------------------
Camera Setting Properties
----------------------------------*/
#define kEdsPropID_Unknown 0x0000ffff
#define kEdsPropID_ProductName 0x00000002
#define kEdsPropID_BodyID 0x00000003
#define kEdsPropID_OwnerName 0x00000004
#define kEdsPropID_MakerName 0x00000005
#define kEdsPropID_DateTime 0x00000006
#define kEdsPropID_FirmwareVersion 0x00000007
#define kEdsPropID_BatteryLevel 0x00000008
#define kEdsPropID_CFn 0x00000009
#define kEdsPropID_SaveTo 0x0000000b
#define kEdsPropID_CurrentStorage 0x0000000c
#define kEdsPropID_CurrentFolder 0x0000000d
#define kEdsPropID_MyMenu 0x0000000e
#define kEdsPropID_BatteryQuality 0x00000010
#define kEdsPropID_HDDirectoryStructure 0x00000020
/*----------------------------------
Image Properties
----------------------------------*/
#define kEdsPropID_ImageQuality 0x00000100
#define kEdsPropID_JpegQuality 0x00000101
#define kEdsPropID_Orientation 0x00000102
#define kEdsPropID_ICCProfile 0x00000103
#define kEdsPropID_FocusInfo 0x00000104
#define kEdsPropID_DigitalExposure 0x00000105
#define kEdsPropID_WhiteBalance 0x00000106
#define kEdsPropID_ColorTemperature 0x00000107
#define kEdsPropID_WhiteBalanceShift 0x00000108
#define kEdsPropID_Contrast 0x00000109
#define kEdsPropID_ColorSaturation 0x0000010a
#define kEdsPropID_ColorTone 0x0000010b
#define kEdsPropID_Sharpness 0x0000010c
#define kEdsPropID_ColorSpace 0x0000010d
#define kEdsPropID_ToneCurve 0x0000010e
#define kEdsPropID_PhotoEffect 0x0000010f
#define kEdsPropID_FilterEffect 0x00000110
#define kEdsPropID_ToningEffect 0x00000111
#define kEdsPropID_ParameterSet 0x00000112
#define kEdsPropID_ColorMatrix 0x00000113
#define kEdsPropID_PictureStyle 0x00000114
#define kEdsPropID_PictureStyleDesc 0x00000115
#define kEdsPropID_ETTL2Mode 0x00000117
#define kEdsPropID_PictureStyleCaption 0x00000200
/*----------------------------------
Image Processing Properties
----------------------------------*/
#define kEdsPropID_Linear 0x00000300
#define kEdsPropID_ClickWBPoint 0x00000301
#define kEdsPropID_WBCoeffs 0x00000302
/*----------------------------------
Image GPS Properties
----------------------------------*/
#define kEdsPropID_GPSVersionID 0x00000800
#define kEdsPropID_GPSLatitudeRef 0x00000801
#define kEdsPropID_GPSLatitude 0x00000802
#define kEdsPropID_GPSLongitudeRef 0x00000803
#define kEdsPropID_GPSLongitude 0x00000804
#define kEdsPropID_GPSAltitudeRef 0x00000805
#define kEdsPropID_GPSAltitude 0x00000806
#define kEdsPropID_GPSTimeStamp 0x00000807
#define kEdsPropID_GPSSatellites 0x00000808
#define kEdsPropID_GPSStatus 0x00000809
#define kEdsPropID_GPSMapDatum 0x00000812
#define kEdsPropID_GPSDateStamp 0x0000081D
/*----------------------------------
Property Mask
----------------------------------*/
#define kEdsPropID_AtCapture_Flag 0x80000000
/*----------------------------------
Capture Properties
----------------------------------*/
#define kEdsPropID_AEMode 0x00000400
#define kEdsPropID_DriveMode 0x00000401
#define kEdsPropID_ISOSpeed 0x00000402
#define kEdsPropID_MeteringMode 0x00000403
#define kEdsPropID_AFMode 0x00000404
#define kEdsPropID_Av 0x00000405
#define kEdsPropID_Tv 0x00000406
#define kEdsPropID_ExposureCompensation 0x00000407
#define kEdsPropID_FlashCompensation 0x00000408
#define kEdsPropID_FocalLength 0x00000409
#define kEdsPropID_AvailableShots 0x0000040a
#define kEdsPropID_Bracket 0x0000040b
#define kEdsPropID_WhiteBalanceBracket 0x0000040c
#define kEdsPropID_LensName 0x0000040d
#define kEdsPropID_AEBracket 0x0000040e
#define kEdsPropID_FEBracket 0x0000040f
#define kEdsPropID_ISOBracket 0x00000410
#define kEdsPropID_NoiseReduction 0x00000411
#define kEdsPropID_FlashOn 0x00000412
#define kEdsPropID_RedEye 0x00000413
#define kEdsPropID_FlashMode 0x00000414
#define kEdsPropID_LensStatus 0x00000416
#define kEdsPropID_Artist 0x00000418
#define kEdsPropID_Copyright 0x00000419
#define kEdsPropID_DepthOfField 0x0000041b
#define kEdsPropID_EFCompensation 0x0000041e
/*----------------------------------
EVF Properties
----------------------------------*/
#define kEdsPropID_Evf_OutputDevice 0x00000500
#define kEdsPropID_Evf_Mode 0x00000501
#define kEdsPropID_Evf_WhiteBalance 0x00000502
#define kEdsPropID_Evf_ColorTemperature 0x00000503
#define kEdsPropID_Evf_DepthOfFieldPreview 0x00000504
// EVF IMAGE DATA Properties
#define kEdsPropID_Evf_Zoom 0x00000507
#define kEdsPropID_Evf_ZoomPosition 0x00000508
#define kEdsPropID_Evf_FocusAid 0x00000509
#define kEdsPropID_Evf_Histogram 0x0000050A
#define kEdsPropID_Evf_ImagePosition 0x0000050B
#define kEdsPropID_Evf_HistogramStatus 0x0000050C
#define kEdsPropID_Evf_AFMode 0x0000050E
#define kEdsPropID_Evf_CoordinateSystem 0x00000540
#define kEdsPropID_Evf_ZoomRect 0x00000541
/*-----------------------------------------------------------------------------
Camera Commands
-----------------------------------------------------------------------------*/
typedef EdsUInt32 EdsCameraCommand;
/*----------------------------------
Send Commands
----------------------------------*/
#define kEdsCameraCommand_TakePicture 0x00000000
#define kEdsCameraCommand_ExtendShutDownTimer 0x00000001
#define kEdsCameraCommand_BulbStart 0x00000002
#define kEdsCameraCommand_BulbEnd 0x00000003
#define kEdsCameraCommand_DoEvfAf 0x00000102
#define kEdsCameraCommand_DriveLensEvf 0x00000103
#define kEdsCameraCommand_DoClickWBEvf 0x00000104
#define kEdsCameraCommand_PressShutterButton 0x00000004
typedef enum
{
kEdsCameraCommand_EvfAf_OFF = 0,
kEdsCameraCommand_EvfAf_ON = 1,
} EdsEvfAf ;
typedef enum
{
kEdsCameraCommand_ShutterButton_OFF = 0x00000000,
kEdsCameraCommand_ShutterButton_Halfway = 0x00000001,
kEdsCameraCommand_ShutterButton_Completely = 0x00000003,
kEdsCameraCommand_ShutterButton_Halfway_NonAF = 0x00010001,
kEdsCameraCommand_ShutterButton_Completely_NonAF = 0x00010003,
} EdsShutterButton ;
typedef EdsUInt32 EdsCameraStatusCommand;
/*----------------------------------
Camera Status Commands
----------------------------------*/
#define kEdsCameraStatusCommand_UILock 0x00000000
#define kEdsCameraStatusCommand_UIUnLock 0x00000001
#define kEdsCameraStatusCommand_EnterDirectTransfer 0x00000002
#define kEdsCameraStatusCommand_ExitDirectTransfer 0x00000003
/*-----------------------------------------------------------------------------
Camera Events
-----------------------------------------------------------------------------*/
typedef EdsUInt32 EdsPropertyEvent;
/*----------------------------------
Property Event
----------------------------------*/
/* Notifies all property events. */
#define kEdsPropertyEvent_All 0x00000100
/* Notifies that a camera property value has been changed.
The changed property can be retrieved from event data.
The changed value can be retrieved by means of EdsGetPropertyData.
In the case of type 1 protocol standard cameras,
notification of changed properties can only be issued for custom functions (CFn).
If the property type is 0x0000FFFF, the changed property cannot be identified.
Thus, retrieve all required properties repeatedly. */
#define kEdsPropertyEvent_PropertyChanged 0x00000101
/* Notifies of changes in the list of camera properties with configurable values.
The list of configurable values for property IDs indicated in event data
can be retrieved by means of EdsGetPropertyDesc.
For type 1 protocol standard cameras, the property ID is identified as "Unknown"
during notification.
Thus, you must retrieve a list of configurable values for all properties and
retrieve the property values repeatedly.
(For details on properties for which you can retrieve a list of configurable
properties,
see the description of EdsGetPropertyDesc). */
#define kEdsPropertyEvent_PropertyDescChanged 0x00000102
typedef EdsUInt32 EdsObjectEvent;
/*----------------------------------
Object Event
----------------------------------*/
/* Notifies all object events. */
#define kEdsObjectEvent_All 0x00000200
/* Notifies that the volume object (memory card) state (VolumeInfo)
has been changed.
Changed objects are indicated by event data.
The changed value can be retrieved by means of EdsGetVolumeInfo.
Notification of this event is not issued for type 1 protocol standard cameras. */
#define kEdsObjectEvent_VolumeInfoChanged 0x00000201
/* Notifies if the designated volume on a camera has been formatted.
If notification of this event is received, get sub-items of the designated
volume again as needed.
Changed volume objects can be retrieved from event data.
Objects cannot be identified on cameras earlier than the D30
if files are added or deleted.
Thus, these events are subject to notification. */
#define kEdsObjectEvent_VolumeUpdateItems 0x00000202
/* Notifies if many images are deleted in a designated folder on a camera.
If notification of this event is received, get sub-items of the designated
folder again as needed.
Changed folders (specifically, directory item objects) can be retrieved
from event data. */
#define kEdsObjectEvent_FolderUpdateItems 0x00000203
/* Notifies of the creation of objects such as new folders or files
on a camera compact flash card or the like.
This event is generated if the camera has been set to store captured
images simultaneously on the camera and a computer,
for example, but not if the camera is set to store images
on the computer alone.
Newly created objects are indicated by event data.
Because objects are not indicated for type 1 protocol standard cameras,
(that is, objects are indicated as NULL),
you must again retrieve child objects under the camera object to
identify the new objects. */
#define kEdsObjectEvent_DirItemCreated 0x00000204
/* Notifies of the deletion of objects such as folders or files on a camera
compact flash card or the like.
Deleted objects are indicated in event data.
Because objects are not indicated for type 1 protocol standard cameras,
you must again retrieve child objects under the camera object to
identify deleted objects. */
#define kEdsObjectEvent_DirItemRemoved 0x00000205
/* Notifies that information of DirItem objects has been changed.
Changed objects are indicated by event data.
The changed value can be retrieved by means of EdsGetDirectoryItemInfo.
Notification of this event is not issued for type 1 protocol standard cameras. */
#define kEdsObjectEvent_DirItemInfoChanged 0x00000206
/* Notifies that header information has been updated, as for rotation information
of image files on the camera.
If this event is received, get the file header information again, as needed.
This function is for type 2 protocol standard cameras only. */
#define kEdsObjectEvent_DirItemContentChanged 0x00000207
/* Notifies that there are objects on a camera to be transferred to a computer.
This event is generated after remote release from a computer or local release
from a camera.
If this event is received, objects indicated in the event data must be downloaded.
Furthermore, if the application does not require the objects, instead
of downloading them,
execute EdsDownloadCancel and release resources held by the camera.
The order of downloading from type 1 protocol standard cameras must be the order
in which the events are received. */
#define kEdsObjectEvent_DirItemRequestTransfer 0x00000208
/* Notifies if the camera's direct transfer button is pressed.
If this event is received, objects indicated in the event data must be downloaded.
Furthermore, if the application does not require the objects, instead of
downloading them,
execute EdsDownloadCancel and release resources held by the camera.
Notification of this event is not issued for type 1 protocol standard cameras. */
#define kEdsObjectEvent_DirItemRequestTransferDT 0x00000209
/* Notifies of requests from a camera to cancel object transfer
if the button to cancel direct transfer is pressed on the camera.
If the parameter is 0, it means that cancellation of transfer is requested for
objects still not downloaded,
with these objects indicated by kEdsObjectEvent_DirItemRequestTransferDT.
Notification of this event is not issued for type 1 protocol standard cameras. */
#define kEdsObjectEvent_DirItemCancelTransferDT 0x0000020a
#define kEdsObjectEvent_VolumeAdded 0x0000020c
#define kEdsObjectEvent_VolumeRemoved 0x0000020d
typedef EdsUInt32 EdsStateEvent;
/*----------------------------------
State Event
----------------------------------*/
/* Notifies all state events. */
#define kEdsStateEvent_All 0x00000300
/* Indicates that a camera is no longer connected to a computer,
whether it was disconnected by unplugging a cord, opening
the compact flash compartment,
turning the camera off, auto shut-off, or by other means. */
#define kEdsStateEvent_Shutdown 0x00000301
/* Notifies of whether or not there are objects waiting to
be transferred to a host computer.
This is useful when ensuring all shot images have been transferred
when the application is closed.
Notification of this event is not issued for type 1 protocol
standard cameras. */
#define kEdsStateEvent_JobStatusChanged 0x00000302
/* Notifies that the camera will shut down after a specific period.
Generated only if auto shut-off is set.
Exactly when notification is issued (that is, the number of
seconds until shutdown) varies depending on the camera model.
To continue operation without having the camera shut down,
use EdsSendCommand to extend the auto shut-off timer.
The time in seconds until the camera shuts down is returned
as the initial value. */
#define kEdsStateEvent_WillSoonShutDown 0x00000303
/* As the counterpart event to kEdsStateEvent_WillSoonShutDown,
this event notifies of updates to the number of seconds until
a camera shuts down.
After the update, the period until shutdown is model-dependent. */
#define kEdsStateEvent_ShutDownTimerUpdate 0x00000304
/* Notifies that a requested release has failed, due to focus
failure or similar factors. */
#define kEdsStateEvent_CaptureError 0x00000305
/* Notifies of internal SDK errors.
If this error event is received, the issuing device will probably
not be able to continue working properly,
so cancel the remote connection. */
#define kEdsStateEvent_InternalError 0x00000306
#define kEdsStateEvent_AfResult 0x00000309
#define kEdsStateEvent_BulbExposureTime 0x00000310
/*-----------------------------------------------------------------------------
Drive Lens
-----------------------------------------------------------------------------*/
typedef enum
{
kEdsEvfDriveLens_Near1 = 0x00000001,
kEdsEvfDriveLens_Near2 = 0x00000002,
kEdsEvfDriveLens_Near3 = 0x00000003,
kEdsEvfDriveLens_Far1 = 0x00008001,
kEdsEvfDriveLens_Far2 = 0x00008002,
kEdsEvfDriveLens_Far3 = 0x00008003,
} EdsEvfDriveLens ;
/*-----------------------------------------------------------------------------
Depth of Field Preview
-----------------------------------------------------------------------------*/
typedef enum {
kEdsEvfDepthOfFieldPreview_OFF = 0x00000000,
kEdsEvfDepthOfFieldPreview_ON = 0x00000001,
} EdsEvfDepthOfFieldPreview ;
/*-----------------------------------------------------------------------------
Stream Seek Origins
-----------------------------------------------------------------------------*/
typedef enum
{
kEdsSeek_Cur = 0,
kEdsSeek_Begin ,
kEdsSeek_End ,
} EdsSeekOrigin;
/*-----------------------------------------------------------------------------
File and Propaties Access
-----------------------------------------------------------------------------*/
typedef enum
{
kEdsAccess_Read = 0,
kEdsAccess_Write ,
kEdsAccess_ReadWrite ,
kEdsAccess_Error = 0xFFFFFFFF,
} EdsAccess;
/*-----------------------------------------------------------------------------
File Create Disposition
-----------------------------------------------------------------------------*/
typedef enum
{
kEdsFileCreateDisposition_CreateNew = 0,
kEdsFileCreateDisposition_CreateAlways ,
kEdsFileCreateDisposition_OpenExisting ,
kEdsFileCreateDisposition_OpenAlways ,
kEdsFileCreateDisposition_TruncateExsisting ,
} EdsFileCreateDisposition;
/*-----------------------------------------------------------------------------
Image Types
-----------------------------------------------------------------------------*/
typedef enum
{
kEdsImageType_Unknown = 0x00000000,
kEdsImageType_Jpeg = 0x00000001,
kEdsImageType_CRW = 0x00000002,
kEdsImageType_RAW = 0x00000004,
kEdsImageType_CR2 = 0x00000006,
kEdsImageType_MOVwithTHM = 0x0000000C,
kEdsImageType_MOVwithoutTHM = 0x0000000D,
} EdsImageType;
/*-----------------------------------------------------------------------------
Image Size
-----------------------------------------------------------------------------*/
typedef enum
{
kEdsImageSize_Large = 0,
kEdsImageSize_Middle = 1,
kEdsImageSize_Small = 2,
kEdsImageSize_Middle1 = 5,
kEdsImageSize_Middle2 = 6,
kEdsImageSize_Unknown = 0xffffffff,
} EdsImageSize;
/*-----------------------------------------------------------------------------
Image Compress Quality
-----------------------------------------------------------------------------*/
typedef enum
{
kEdsCompressQuality_Normal = 2,
kEdsCompressQuality_Fine = 3,
kEdsCompressQuality_Lossless = 4,
kEdsCompressQuality_SuperFine = 5,
kEdsCompressQuality_Unknown = 0xffffffff,
} EdsCompressQuality;
/*-----------------------------------------------------------------------------
Image Quality
-----------------------------------------------------------------------------*/
typedef enum
{
/* Jpeg Only */
EdsImageQuality_LJ = 0x0010ff0f, /* Jpeg Large */
EdsImageQuality_M1J = 0x0510ff0f, /* Jpeg Middle1 */
EdsImageQuality_M2J = 0x0610ff0f, /* Jpeg Middle2 */
EdsImageQuality_SJ = 0x0210ff0f, /* Jpeg Small */
EdsImageQuality_LJF = 0x0013ff0f, /* Jpeg Large Fine */
EdsImageQuality_LJN = 0x0012ff0f, /* Jpeg Large Normal */
EdsImageQuality_MJF = 0x0113ff0f, /* Jpeg Middle Fine */
EdsImageQuality_MJN = 0x0112ff0f, /* Jpeg Middle Normal */
EdsImageQuality_SJF = 0x0213ff0f, /* Jpeg Small Fine */
EdsImageQuality_SJN = 0x0213ff0f, /* Jpeg Small Normal */
EdsImageQuality_S1JF = 0x0E13ff0f, /* Jpeg Small1 Fine */
EdsImageQuality_S1JN = 0x0E12ff0f, /* Jpeg Small1 Normal */
EdsImageQuality_S2JF = 0x0F13ff0f, /* Jpeg Small2 */
EdsImageQuality_S3JF = 0x1013ff0f, /* Jpeg Small3 */
/* RAW + Jpeg */
EdsImageQuality_LR = 0x0064ff0f, /* RAW */
EdsImageQuality_LRLJF = 0x00640013, /* RAW + Jpeg Large Fine */
EdsImageQuality_LRLJN = 0x00640012, /* RAW + Jpeg Large Normal */
EdsImageQuality_LRMJF = 0x00640113, /* RAW + Jpeg Middle Fine */
EdsImageQuality_LRMJN = 0x00640112, /* RAW + Jpeg Middle Normal */
EdsImageQuality_LRSJF = 0x00640213, /* RAW + Jpeg Small Fine */
EdsImageQuality_LRSJN = 0x00640212, /* RAW + Jpeg Small Normal */
EdsImageQuality_LRS1JF = 0x00640E13, /* RAW + Jpeg Small1 Fine */
EdsImageQuality_LRS1JN = 0x00640E12, /* RAW + Jpeg Small1 Normal */
EdsImageQuality_LRS2JF = 0x00640F13, /* RAW + Jpeg Small2 */
EdsImageQuality_LRS3JF = 0x00641013, /* RAW + Jpeg Small3 */
EdsImageQuality_LRLJ = 0x00640010, /* RAW + Jpeg Large */
EdsImageQuality_LRM1J = 0x00640510, /* RAW + Jpeg Middle1 */
EdsImageQuality_LRM2J = 0x00640610, /* RAW + Jpeg Middle2 */
EdsImageQuality_LRSJ = 0x00640210, /* RAW + Jpeg Small */
/* MRAW(SRAW1) + Jpeg */
EdsImageQuality_MR = 0x0164ff0f, /* MRAW(SRAW1) */
EdsImageQuality_MRLJF = 0x01640013, /* MRAW(SRAW1) + Jpeg Large Fine */
EdsImageQuality_MRLJN = 0x01640012, /* MRAW(SRAW1) + Jpeg Large Normal */
EdsImageQuality_MRMJF = 0x01640113, /* MRAW(SRAW1) + Jpeg Middle Fine */
EdsImageQuality_MRMJN = 0x01640112, /* MRAW(SRAW1) + Jpeg Middle Normal */
EdsImageQuality_MRSJF = 0x01640213, /* MRAW(SRAW1) + Jpeg Small Fine */
EdsImageQuality_MRSJN = 0x01640212, /* MRAW(SRAW1) + Jpeg Small Normal */
EdsImageQuality_MRS1JF = 0x01640E13, /* MRAW(SRAW1) + Jpeg Small1 Fine */
EdsImageQuality_MRS1JN = 0x01640E12, /* MRAW(SRAW1) + Jpeg Small1 Normal */
EdsImageQuality_MRS2JF = 0x01640F13, /* MRAW(SRAW1) + Jpeg Small2 */
EdsImageQuality_MRS3JF = 0x01641013, /* MRAW(SRAW1) + Jpeg Small3 */
EdsImageQuality_MRLJ = 0x01640010, /* MRAW(SRAW1) + Jpeg Large */
EdsImageQuality_MRM1J = 0x01640510, /* MRAW(SRAW1) + Jpeg Middle1 */
EdsImageQuality_MRM2J = 0x01640610, /* MRAW(SRAW1) + Jpeg Middle2 */
EdsImageQuality_MRSJ = 0x01640210, /* MRAW(SRAW1) + Jpeg Small */
/* SRAW(SRAW2) + Jpeg */
EdsImageQuality_SR = 0x0264ff0f, /* SRAW(SRAW2) */
EdsImageQuality_SRLJF = 0x02640013, /* SRAW(SRAW2) + Jpeg Large Fine */
EdsImageQuality_SRLJN = 0x02640012, /* SRAW(SRAW2) + Jpeg Large Normal */
EdsImageQuality_SRMJF = 0x02640113, /* SRAW(SRAW2) + Jpeg Middle Fine */
EdsImageQuality_SRMJN = 0x02640112, /* SRAW(SRAW2) + Jpeg Middle Normal */
EdsImageQuality_SRSJF = 0x02640213, /* SRAW(SRAW2) + Jpeg Small Fine */
EdsImageQuality_SRSJN = 0x02640212, /* SRAW(SRAW2) + Jpeg Small Normal */
EdsImageQuality_SRS1JF = 0x02640E13, /* SRAW(SRAW2) + Jpeg Small1 Fine */
EdsImageQuality_SRS1JN = 0x02640E12, /* SRAW(SRAW2) + Jpeg Small1 Normal */
EdsImageQuality_SRS2JF = 0x02640F13, /* SRAW(SRAW2) + Jpeg Small2 */
EdsImageQuality_SRS3JF = 0x02641013, /* SRAW(SRAW2) + Jpeg Small3 */
EdsImageQuality_SRLJ = 0x02640010, /* SRAW(SRAW2) + Jpeg Large */
EdsImageQuality_SRM1J = 0x02640510, /* SRAW(SRAW2) + Jpeg Middle1 */
EdsImageQuality_SRM2J = 0x02640610, /* SRAW(SRAW2) + Jpeg Middle2 */
EdsImageQuality_SRSJ = 0x02640210, /* SRAW(SRAW2) + Jpeg Small */
EdsImageQuality_Unknown = 0xffffffff,
}EdsImageQuality;
typedef enum
{
kEdsImageQualityForLegacy_LJ = 0x001f000f, /* Jpeg Large */
kEdsImageQualityForLegacy_M1J = 0x051f000f, /* Jpeg Middle1 */
kEdsImageQualityForLegacy_M2J = 0x061f000f, /* Jpeg Middle2 */
kEdsImageQualityForLegacy_SJ = 0x021f000f, /* Jpeg Small */
kEdsImageQualityForLegacy_LJF = 0x00130000, /* Jpeg Large Fine */
kEdsImageQualityForLegacy_LJN = 0x00120000, /* Jpeg Large Normal */
kEdsImageQualityForLegacy_MJF = 0x01130000, /* Jpeg Middle Fine */
kEdsImageQualityForLegacy_MJN = 0x01120000, /* Jpeg Middle Normal */
kEdsImageQualityForLegacy_SJF = 0x02130000, /* Jpeg Small Fine */
kEdsImageQualityForLegacy_SJN = 0x02130000, /* Jpeg Small Normal */
kEdsImageQualityForLegacy_LR = 0x00240000, /* RAW */
kEdsImageQualityForLegacy_LRLJF = 0x00240013, /* RAW + Jpeg Large Fine */
kEdsImageQualityForLegacy_LRLJN = 0x00240012, /* RAW + Jpeg Large Normal */
kEdsImageQualityForLegacy_LRMJF = 0x00240113, /* RAW + Jpeg Middle Fine */
kEdsImageQualityForLegacy_LRMJN = 0x00240112, /* RAW + Jpeg Middle Normal */
kEdsImageQualityForLegacy_LRSJF = 0x00240213, /* RAW + Jpeg Small Fine */
kEdsImageQualityForLegacy_LRSJN = 0x00240212, /* RAW + Jpeg Small Normal */
kEdsImageQualityForLegacy_LR2 = 0x002f000f, /* RAW */
kEdsImageQualityForLegacy_LR2LJ = 0x002f001f, /* RAW + Jpeg Large */
kEdsImageQualityForLegacy_LR2M1J = 0x002f051f, /* RAW + Jpeg Middle1 */
kEdsImageQualityForLegacy_LR2M2J = 0x002f061f, /* RAW + Jpeg Middle2 */
kEdsImageQualityForLegacy_LR2SJ = 0x002f021f, /* RAW + Jpeg Small */
kEdsImageQualityForLegacy_Unknown = 0xffffffff,
}EdsImageQualityForLegacy;
/*-----------------------------------------------------------------------------
Image Source
-----------------------------------------------------------------------------*/
typedef enum
{
kEdsImageSrc_FullView = 0 ,
kEdsImageSrc_Thumbnail ,
kEdsImageSrc_Preview ,
kEdsImageSrc_RAWThumbnail ,
kEdsImageSrc_RAWFullView ,
} EdsImageSource;
/*-----------------------------------------------------------------------------
Target Image Types
-----------------------------------------------------------------------------*/
typedef enum
{
kEdsTargetImageType_Unknown = 0x00000000,
kEdsTargetImageType_Jpeg = 0x00000001,
kEdsTargetImageType_TIFF = 0x00000007,
kEdsTargetImageType_TIFF16 = 0x00000008,
kEdsTargetImageType_RGB = 0x00000009,
kEdsTargetImageType_RGB16 = 0x0000000A,
kEdsTargetImageType_DIB = 0x0000000B
} EdsTargetImageType;
/*-----------------------------------------------------------------------------
Progress Option
-----------------------------------------------------------------------------*/
typedef enum
{
kEdsProgressOption_NoReport = 0,
kEdsProgressOption_Done ,
kEdsProgressOption_Periodically ,
} EdsProgressOption;
/*-----------------------------------------------------------------------------
File attribute
-----------------------------------------------------------------------------*/
typedef enum
{
kEdsFileAttribute_Normal = 0x00000000,
kEdsFileAttribute_ReadOnly = 0x00000001,
kEdsFileAttribute_Hidden = 0x00000002,
kEdsFileAttribute_System = 0x00000004,
kEdsFileAttribute_Archive = 0x00000020,
} EdsFileAttributes;
/*-----------------------------------------------------------------------------
Battery level
-----------------------------------------------------------------------------*/
typedef enum
{
kEdsBatteryLevel2_Empty = 0,
kEdsBatteryLevel2_Low = 9,
kEdsBatteryLevel2_Half = 49,
kEdsBatteryLevel2_Normal = 80,
kEdsBatteryLevel2_Hi = 69,
kEdsBatteryLevel2_Quarter = 19,
kEdsBatteryLevel2_Error = 0,
kEdsBatteryLevel2_BCLevel = 0,
kEdsBatteryLevel2_AC = 0xFFFFFFFF,
} EdsBatteryLevel2;
/*-----------------------------------------------------------------------------
Save To
-----------------------------------------------------------------------------*/
typedef enum
{
kEdsSaveTo_Camera = 1,
kEdsSaveTo_Host = 2,
kEdsSaveTo_Both = kEdsSaveTo_Camera | kEdsSaveTo_Host,
} EdsSaveTo;
/*-----------------------------------------------------------------------------
StorageType
-----------------------------------------------------------------------------*/
typedef enum
{
kEdsStorageType_Non = 0,
kEdsStorageType_CF = 1,
kEdsStorageType_SD = 2,
kEdsStorageType_HD = 4,
} EdsStorageType;
/*-----------------------------------------------------------------------------
White Balance
-----------------------------------------------------------------------------*/
typedef enum
{
kEdsWhiteBalance_Auto = 0,
kEdsWhiteBalance_Daylight = 1,
kEdsWhiteBalance_Cloudy = 2,
kEdsWhiteBalance_Tangsten = 3,
kEdsWhiteBalance_Fluorescent = 4,
kEdsWhiteBalance_Strobe = 5,
kEdsWhiteBalance_WhitePaper = 6,
kEdsWhiteBalance_Shade = 8,
kEdsWhiteBalance_ColorTemp = 9,
kEdsWhiteBalance_PCSet1 = 10,
kEdsWhiteBalance_PCSet2 = 11,
kEdsWhiteBalance_PCSet3 = 12,
kEdsWhiteBalance_WhitePaper2 = 15,
kEdsWhiteBalance_WhitePaper3 = 16,
kEdsWhiteBalance_WhitePaper4 = 18,
kEdsWhiteBalance_WhitePaper5 = 19,
kEdsWhiteBalance_PCSet4 = 20,
kEdsWhiteBalance_PCSet5 = 21,
kEdsWhiteBalance_Click = -1,
kEdsWhiteBalance_Pasted = -2,
} EdsWhiteBalance;
/*-----------------------------------------------------------------------------
Photo Effects
-----------------------------------------------------------------------------*/
typedef enum
{
kEdsPhotoEffect_Off = 0,
kEdsPhotoEffect_Monochrome = 5,
} EdsPhotoEffect;
/*-----------------------------------------------------------------------------
Color Matrix
-----------------------------------------------------------------------------*/
typedef enum
{
kEdsColorMatrix_Custom = 0,
kEdsColorMatrix_1 = 1,
kEdsColorMatrix_2 = 2,
kEdsColorMatrix_3 = 3,
kEdsColorMatrix_4 = 4,
kEdsColorMatrix_5 = 5,
kEdsColorMatrix_6 = 6,
kEdsColorMatrix_7 = 7,
} EdsColorMatrix;
/*-----------------------------------------------------------------------------
Filter Effects
-----------------------------------------------------------------------------*/
typedef enum
{
kEdsFilterEffect_None = 0,
kEdsFilterEffect_Yellow = 1,
kEdsFilterEffect_Orange = 2,
kEdsFilterEffect_Red = 3,
kEdsFilterEffect_Green = 4,
} EdsFilterEffect;
/*-----------------------------------------------------------------------------
Toning Effects
-----------------------------------------------------------------------------*/
typedef enum
{
kEdsTonigEffect_None = 0,
kEdsTonigEffect_Sepia = 1,
kEdsTonigEffect_Blue = 2,
kEdsTonigEffect_Purple = 3,
kEdsTonigEffect_Green = 4,
} EdsTonigEffect;
/*-----------------------------------------------------------------------------
Color Space
-----------------------------------------------------------------------------*/
typedef enum
{
kEdsColorSpace_sRGB = 1,
kEdsColorSpace_AdobeRGB = 2,
kEdsColorSpace_Unknown = 0xffffffff,
} EdsColorSpace;
/*-----------------------------------------------------------------------------
PictureStyle
-----------------------------------------------------------------------------*/
typedef enum
{
kEdsPictureStyle_Standard = 0x0081,
kEdsPictureStyle_Portrait = 0x0082,
kEdsPictureStyle_Landscape = 0x0083,
kEdsPictureStyle_Neutral = 0x0084,
kEdsPictureStyle_Faithful = 0x0085,
kEdsPictureStyle_Monochrome = 0x0086,
kEdsPictureStyle_User1 = 0x0021,
kEdsPictureStyle_User2 = 0x0022,
kEdsPictureStyle_User3 = 0x0023,
kEdsPictureStyle_PC1 = 0x0041,
kEdsPictureStyle_PC2 = 0x0042,
kEdsPictureStyle_PC3 = 0x0043,
} EdsPictureStyle;
/*-----------------------------------------------------------------------------
Transfer Option
-----------------------------------------------------------------------------*/
typedef enum
{
kEdsTransferOption_ByDirectTransfer = 1,
kEdsTransferOption_ByRelease = 2,
kEdsTransferOption_ToDesktop = 0x00000100,
} EdsTransferOption;
/*-----------------------------------------------------------------------------
AE Mode
-----------------------------------------------------------------------------*/
typedef enum
{
kEdsAEMode_Program = 0 ,
kEdsAEMode_Tv = 1,
kEdsAEMode_Av = 2,
kEdsAEMode_Manual = 3,
kEdsAEMode_Bulb = 4,
kEdsAEMode_A_DEP = 5,
kEdsAEMode_DEP = 6,
kEdsAEMode_Custom = 7,
kEdsAEMode_Lock = 8,
kEdsAEMode_Green = 9,
kEdsAEMode_NightPortrait = 10,
kEdsAEMode_Sports = 11,
kEdsAEMode_Portrait = 12,
kEdsAEMode_Landscape = 13,
kEdsAEMode_Closeup = 14,
kEdsAEMode_FlashOff = 15,
kEdsAEMode_CreativeAuto = 19,
kEdsAEMode_Movie = 20,
kEdsAEMode_PhotoInMovie = 21,
kEdsAEMode_Unknown = 0xffffffff,
} EdsAEMode;
/*-----------------------------------------------------------------------------
Bracket
-----------------------------------------------------------------------------*/
typedef enum
{
kEdsBracket_AEB = 0x01,
kEdsBracket_ISOB = 0x02,
kEdsBracket_WBB = 0x04,
kEdsBracket_FEB = 0x08,
kEdsBracket_Unknown = 0xffffffff,
} EdsBracket;
/*-----------------------------------------------------------------------------
EVF Output Device [Flag]
-----------------------------------------------------------------------------*/
typedef enum
{
kEdsEvfOutputDevice_TFT = 1,
kEdsEvfOutputDevice_PC = 2,
} EdsEvfOutputDevice;
/*-----------------------------------------------------------------------------
EVF Zoom
-----------------------------------------------------------------------------*/
typedef enum
{
kEdsEvfZoom_Fit = 1,
kEdsEvfZoom_x5 = 5,
kEdsEvfZoom_x10 = 10,
} EdsEvfZoom;
/*-----------------------------------------------------------------------------
EVF AF Mode
-----------------------------------------------------------------------------*/
typedef enum
{
Evf_AFMode_Quick = 0,
Evf_AFMode_Live = 1,
Evf_AFMode_LiveFace = 2,
} EdsEvfAFMode;
/*-----------------------------------------------------------------------------
Strobo Mode
-----------------------------------------------------------------------------*/
typedef enum
{
kEdsStroboModeInternal = 0,
kEdsStroboModeExternalETTL = 1,
kEdsStroboModeExternalATTL = 2,
kEdsStroboModeExternalTTL = 3,
kEdsStroboModeExternalAuto = 4,
kEdsStroboModeExternalManual = 5,
kEdsStroboModeManual = 6,
}EdsStroboMode;
/*-----------------------------------------------------------------------------
ETTL-II Mode
-----------------------------------------------------------------------------*/
typedef enum
{
kEdsETTL2ModeEvaluative = 0,
kEdsETTL2ModeAverage = 1,
}EdsETTL2Mode;
/******************************************************************************
Definition of base Structures
******************************************************************************/
/*-----------------------------------------------------------------------------
Point
-----------------------------------------------------------------------------*/
typedef struct tagEdsPoint
{
EdsInt32 x;
EdsInt32 y;
} EdsPoint;
/*-----------------------------------------------------------------------------
Size
-----------------------------------------------------------------------------*/
typedef struct tagEdsSize
{
EdsInt32 width;
EdsInt32 height;
} EdsSize;
/*-----------------------------------------------------------------------------
Rectangle
-----------------------------------------------------------------------------*/
typedef struct tagEdsRect
{
EdsPoint point;
EdsSize size;
} EdsRect;
/*-----------------------------------------------------------------------------
Rational
-----------------------------------------------------------------------------*/
typedef struct tagEdsRational
{
EdsInt32 numerator;
EdsUInt32 denominator;
} EdsRational;
/*-----------------------------------------------------------------------------
Time
-----------------------------------------------------------------------------*/
typedef struct tagEdsTime
{
EdsUInt32 year;
EdsUInt32 month;
EdsUInt32 day;
EdsUInt32 hour;
EdsUInt32 minute;
EdsUInt32 second;
EdsUInt32 milliseconds;
} EdsTime;
/*-----------------------------------------------------------------------------
Device Info
-----------------------------------------------------------------------------*/
typedef struct tagEdsDeviceInfo
{
EdsChar szPortName[ EDS_MAX_NAME ];
EdsChar szDeviceDescription[ EDS_MAX_NAME ];
EdsUInt32 deviceSubType;
EdsUInt32 reserved;
} EdsDeviceInfo;
/*-----------------------------------------------------------------------------
Volume Info
-----------------------------------------------------------------------------*/
typedef struct tagEdsVolumeInfo
{
EdsUInt32 storageType;
EdsAccess access;
EdsUInt64 maxCapacity;
EdsUInt64 freeSpaceInBytes;
EdsChar szVolumeLabel[ EDS_MAX_NAME ];
} EdsVolumeInfo;
/*-----------------------------------------------------------------------------
DirectoryItem Info
-----------------------------------------------------------------------------*/
typedef struct tagEdsDirectoryItemInfo
{
EdsUInt32 size;
EdsBool isFolder;
EdsUInt32 groupID;
EdsUInt32 option;
EdsChar szFileName[ EDS_MAX_NAME ];
EdsUInt32 format;
} EdsDirectoryItemInfo;
/*-----------------------------------------------------------------------------
Image Info
-----------------------------------------------------------------------------*/
typedef struct tagEdsImageInfo
{
EdsUInt32 width;
EdsUInt32 height;
EdsUInt32 numOfComponents;
EdsUInt32 componentDepth;
EdsRect effectiveRect;
EdsUInt32 reserved1;
EdsUInt32 reserved2;
} EdsImageInfo;
/*-----------------------------------------------------------------------------
SaveImage Setting
-----------------------------------------------------------------------------*/
typedef struct tagEdsSaveImageSetting
{
EdsUInt32 JPEGQuality;
EdsStreamRef iccProfileStream;
EdsUInt32 reserved;
} EdsSaveImageSetting;
/*-----------------------------------------------------------------------------
Property Desc
-----------------------------------------------------------------------------*/
typedef struct tagEdsPropertyDesc
{
EdsInt32 form;
EdsInt32 access;
EdsInt32 numElements;
EdsInt32 propDesc[128];
} EdsPropertyDesc;
/*-----------------------------------------------------------------------------
Picture Style Desc
-----------------------------------------------------------------------------*/
typedef struct tagEdsPictureStyleDesc
{
EdsInt32 contrast;
EdsUInt32 sharpness;
EdsInt32 saturation;
EdsInt32 colorTone;
EdsUInt32 filterEffect;
EdsUInt32 toningEffect;
} EdsPictureStyleDesc;
/*-----------------------------------------------------------------------------
Focus Info
-----------------------------------------------------------------------------*/
typedef struct tagEdsFrameDesc
{
EdsUInt32 valid;
EdsUInt32 selected;
EdsUInt32 justFocus;
EdsRect rect;
EdsUInt32 reserved;
} EdsFocusPoint;
typedef struct tagEdsFocusInfo
{
EdsRect imageRect;
EdsUInt32 pointNumber;
EdsFocusPoint focusPoint[128];
EdsUInt32 executeMode;
} EdsFocusInfo;
/*-----------------------------------------------------------------------------
User WhiteBalance (PC set1,2,3)/ User ToneCurve / User PictureStyle dataset
-----------------------------------------------------------------------------*/
typedef struct tagEdsUsersetData
{
EdsUInt32 valid;
EdsUInt32 dataSize;
EdsChar szCaption[32];
EdsUInt8 data[1];
} EdsUsersetData;
/*-----------------------------------------------------------------------------
Capacity
-----------------------------------------------------------------------------*/
typedef struct tagEdsCapacity
{
EdsInt32 numberOfFreeClusters;
EdsInt32 bytesPerSector;
EdsBool reset;
} EdsCapacity;
/******************************************************************************
Callback Functions
******************************************************************************/
/*-----------------------------------------------------------------------------
EdsProgressCallback
-----------------------------------------------------------------------------*/
typedef EdsError ( EDSCALLBACK *EdsProgressCallback )(
EdsUInt32 inPercent,
EdsVoid * inContext,
EdsBool * outCancel );
/*-----------------------------------------------------------------------------
EdsCameraAddedHandler
-----------------------------------------------------------------------------*/
typedef EdsError ( EDSCALLBACK *EdsCameraAddedHandler )(
EdsVoid *inContext );
/*-----------------------------------------------------------------------------
EdsPropertyEventHandler
-----------------------------------------------------------------------------*/
typedef EdsError ( EDSCALLBACK *EdsPropertyEventHandler )(
EdsPropertyEvent inEvent,
EdsPropertyID inPropertyID,
EdsUInt32 inParam,
EdsVoid * inContext );
/*-----------------------------------------------------------------------------
EdsObjectEventHandler
-----------------------------------------------------------------------------*/
typedef EdsError ( EDSCALLBACK *EdsObjectEventHandler )(
EdsObjectEvent inEvent,
EdsBaseRef inRef,
EdsVoid * inContext );
/*-----------------------------------------------------------------------------
EdsStateEventHandler
-----------------------------------------------------------------------------*/
typedef EdsError ( EDSCALLBACK *EdsStateEventHandler )(
EdsStateEvent inEvent,
EdsUInt32 inEventData,
EdsVoid * inContext );
/*----------------------------------------------------------------------------*/
typedef EdsError EDSSTDCALL EdsReadStream (void *inContext, EdsUInt32 inReadSize, EdsVoid* outBuffer, EdsUInt32* outReadSize);
typedef EdsError EDSSTDCALL EdsWriteStream (void *inContext, EdsUInt32 inWriteSize, const EdsVoid* inBuffer, EdsUInt32* outWrittenSize);
typedef EdsError EDSSTDCALL EdsSeekStream (void *inContext, EdsInt32 inSeekOffset, EdsSeekOrigin inSeekOrigin);
typedef EdsError EDSSTDCALL EdsTellStream (void *inContext, EdsInt32 *outPosition);
typedef EdsError EDSSTDCALL EdsGetStreamLength (void *inContext, EdsUInt32 *outLength);
typedef struct
{
void *context;
EdsReadStream *read;
EdsWriteStream *write;
EdsSeekStream *seek;
EdsTellStream *tell;
EdsGetStreamLength *getLength;
} EdsIStream;
#ifdef __MACOS__
#if PRAGMA_STRUCT_ALIGN
#pragma options align=reset
#endif
#else
#pragma pack (pop)
#endif
#endif /* _EDS_TYPES_H_ */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment