| The Canon driver reference |
|---|
#include <canon.h> #define CHECK_PARAM_NULL (param) #define CON_CHECK_PARAM_NULL (param) #define GP_PORT_DEFAULT #define GP_PORT_DEFAULT_RETURN (RETVAL) #define GP_PORT_DEFAULT_RETURN_EMPTY #define GP_PORT_DEFAULT_RETURN_INTERNAL (return_statement) enum canonJpegMarkerCode; enum canonDownloadImageType; #define GP_MODULE
#define CHECK_PARAM_NULL(param)
Checks if the given parameter is NULL. If so, returns GP_ERROR_BAD_PARAMETERS from the enclosing function.
param : | value to check for NULL |
#define CON_CHECK_PARAM_NULL(param)
Checks if the given parameter is NULL. If so, reports through
gp_context_error() (assuming that "context" is defined) and returns
GP_ERROR_BAD_PARAMETERS from the enclosing function.
param : | value to check for NULL |
#define GP_PORT_DEFAULT GP_PORT_DEFAULT_RETURN(GP_ERROR_BAD_PARAMETERS)
Return as a default case in switch (camera->port->type) statements in functions returning a gphoto2 error code where this value of camera->port->type is unexpected.
#define GP_PORT_DEFAULT_RETURN(RETVAL) GP_PORT_DEFAULT_RETURN_INTERNAL(return RETVAL)
Return as a default case in switch (camera->port->type) statements in functions returning a value.
RETVAL : | Value to return from this function |
#define GP_PORT_DEFAULT_RETURN_EMPTY GP_PORT_DEFAULT_RETURN_INTERNAL(return)
Return as a default case in switch (camera->port->type) statements in functions returning void.
#define GP_PORT_DEFAULT_RETURN_INTERNAL(return_statement)
Used only by GP_PORT_DEFAULT_RETURN_EMPTY(),
GP_PORT_DEFAULT_RETURN(), and GP_PORT_DEFAULT()
return_statement : | Statement to use for return |
typedef enum {
JPEG_ESC = 0xFF,
JPEG_A50_SOS = 0xC4,
JPEG_BEG = 0xD8,
JPEG_SOI = 0xD8,
JPEG_END = 0xD9,
JPEG_SOS = 0xDB,
JPEG_APP1 = 0xE1,
} canonJpegMarkerCode;Flags to find important points in JFIF or EXIF files
| JPEG_ESC | Byte value to flag possible JPEG code. |
| JPEG_A50_SOS | Byte value to flag a JPEG SOS marker in a file from a PowerShot A50 camera. |
| JPEG_BEG | Byte value which, immediately after JPEG_ESC, marks the start of JPEG image data in a JFIF file. |
| JPEG_SOI | |
| JPEG_END | Byte code to mark the end of a JPEG image? |
| JPEG_SOS | Byte value to flag a JPEG SOS marker. |
| JPEG_APP1 |
typedef enum {
CANON_DOWNLOAD_THUMB = 1,
CANON_DOWNLOAD_FULL = 2
} canonDownloadImageType;Codes for "Download Captured Image" command to tell the camera to download either the thumbnail or the full image for the most recently captured image.
| CANON_DOWNLOAD_THUMB | Get just the thumbnail for the image |
| CANON_DOWNLOAD_FULL | Get the full image |
| <<< Utility Macros | Serial Communication >>> |