gphoto2-abilities-list.h
Go to the documentation of this file.
#ifndef __GPHOTO2_ABILITIES_LIST_H__
#define __GPHOTO2_ABILITIES_LIST_H__
#include <gphoto2/gphoto2-context.h>
#include <gphoto2/gphoto2-list.h>
#include <gphoto2/gphoto2-port-info-list.h>
#include <gphoto2/gphoto2-port-log.h>
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
typedef enum {
GP_DRIVER_STATUS_PRODUCTION,
GP_DRIVER_STATUS_TESTING,
GP_DRIVER_STATUS_EXPERIMENTAL,
GP_DRIVER_STATUS_DEPRECATED
} CameraDriverStatus;
typedef enum {
GP_DEVICE_STILL_CAMERA = 0,
GP_DEVICE_AUDIO_PLAYER = 1 << 0
} GphotoDeviceType;
typedef enum {
GP_OPERATION_NONE = 0,
GP_OPERATION_CAPTURE_IMAGE = 1 << 0,
GP_OPERATION_CAPTURE_VIDEO = 1 << 1,
GP_OPERATION_CAPTURE_AUDIO = 1 << 2,
GP_OPERATION_CAPTURE_PREVIEW = 1 << 3,
GP_OPERATION_CONFIG = 1 << 4
} CameraOperation;
typedef enum {
GP_FILE_OPERATION_NONE = 0,
GP_FILE_OPERATION_DELETE = 1 << 1,
GP_FILE_OPERATION_PREVIEW = 1 << 3,
GP_FILE_OPERATION_RAW = 1 << 4,
GP_FILE_OPERATION_AUDIO = 1 << 5,
GP_FILE_OPERATION_EXIF = 1 << 6
} CameraFileOperation;
typedef enum {
GP_FOLDER_OPERATION_NONE = 0,
GP_FOLDER_OPERATION_DELETE_ALL = 1 << 0,
GP_FOLDER_OPERATION_PUT_FILE = 1 << 1,
GP_FOLDER_OPERATION_MAKE_DIR = 1 << 2,
GP_FOLDER_OPERATION_REMOVE_DIR = 1 << 3
} CameraFolderOperation;
#ifdef _GPHOTO2_INTERNAL_CODE
/* enum CameraOperation */
extern const StringFlagItem gpi_camera_operation_map[];
/* enum CameraFileOperation */
extern const StringFlagItem gpi_file_operation_map[];
/* enum CameraFolderOperation */
extern const StringFlagItem gpi_folder_operation_map[];
/* enum GphotoDeviceType */
extern const StringFlagItem gpi_gphoto_device_type_map[];
/* enum CameraDriverStatus */
extern const StringFlagItem gpi_camera_driver_status_map[];
#endif /* _GPHOTO2_INTERNAL_CODE */
typedef struct {
char model [128];
CameraDriverStatus status;
GPPortType port;
int speed [64];
/* Supported operations */
CameraOperation operations;
CameraFileOperation file_operations;
CameraFolderOperation folder_operations;
int usb_vendor;
int usb_product;
int usb_class;
int usb_subclass;
int usb_protocol;
/* For core use */
char library [1024];
char id [1024];
GphotoDeviceType device_type;
int reserved2;
int reserved3;
int reserved4;
int reserved5;
int reserved6;
int reserved7;
int reserved8;
} CameraAbilities;
typedef struct _CameraAbilitiesList CameraAbilitiesList;
int gp_abilities_list_new (CameraAbilitiesList **list);
int gp_abilities_list_free (CameraAbilitiesList *list);
int gp_abilities_list_load (CameraAbilitiesList *list, GPContext *context);
int gp_abilities_list_reset (CameraAbilitiesList *list);
int gp_abilities_list_detect (CameraAbilitiesList *list,
GPPortInfoList *info_list, CameraList *l,
GPContext *context);
int gp_abilities_list_append (CameraAbilitiesList *list,
CameraAbilities abilities);
int gp_abilities_list_count (CameraAbilitiesList *list);
int gp_abilities_list_lookup_model (CameraAbilitiesList *list,
const char *model);
int gp_abilities_list_get_abilities (CameraAbilitiesList *list, int index,
CameraAbilities *abilities);
const char *gp_message_codeset (const char *);
#ifdef _GPHOTO2_INTERNAL_CODE
#define CAMLIBDIR_ENV "CAMLIBS"
#endif /* _GPHOTO2_INTERNAL_CODE */
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* __GPHOTO2_ABILITIES_LIST_H__ */
CameraAbilities::operations
CameraOperation operations
Camera operation funcs.
Definition: gphoto2-abilities-list.h:129
CameraAbilities::usb_subclass
int usb_subclass
USB device subclass.
Definition: gphoto2-abilities-list.h:136
gp_abilities_list_append
int gp_abilities_list_append(CameraAbilitiesList *list, CameraAbilities abilities)
Append the abilities to the list.
Definition: gphoto2-abilities-list.c:520
CameraAbilities::reserved8
int reserved8
Definition: gphoto2-abilities-list.h:152
CameraAbilities::folder_operations
CameraFolderOperation folder_operations
Camera folder op funcs.
Definition: gphoto2-abilities-list.h:131
gphoto2-list.h
_CameraList
Definition: gphoto2-list.c:77
CameraAbilities::usb_product
int usb_product
USB Product ID.
Definition: gphoto2-abilities-list.h:134
CameraAbilities::reserved6
int reserved6
Definition: gphoto2-abilities-list.h:150
GP_FOLDER_OPERATION_PUT_FILE
Definition: gphoto2-abilities-list.h:88
GP_OPERATION_CONFIG
Definition: gphoto2-abilities-list.h:67
CameraAbilities::reserved7
int reserved7
Definition: gphoto2-abilities-list.h:151
CameraAbilities::port
GPPortType port
Supported port types.
Definition: gphoto2-abilities-list.h:124
GP_OPERATION_CAPTURE_PREVIEW
Definition: gphoto2-abilities-list.h:66
CameraDriverStatus
CameraDriverStatus
Definition: gphoto2-abilities-list.h:41
gp_abilities_list_lookup_model
int gp_abilities_list_lookup_model(CameraAbilitiesList *list, const char *model)
Search the list for an entry of given model name.
Definition: gphoto2-abilities-list.c:622
GP_FOLDER_OPERATION_DELETE_ALL
Definition: gphoto2-abilities-list.h:87
GP_DRIVER_STATUS_PRODUCTION
Definition: gphoto2-abilities-list.h:42
CameraAbilities::reserved3
int reserved3
Definition: gphoto2-abilities-list.h:147
GP_FILE_OPERATION_RAW
Definition: gphoto2-abilities-list.h:77
CameraAbilities::device_type
GphotoDeviceType device_type
Device type.
Definition: gphoto2-abilities-list.h:143
GP_FILE_OPERATION_EXIF
Definition: gphoto2-abilities-list.h:79
_CameraAbilitiesList
Definition: gphoto2-abilities-list.c:69
CameraAbilities::usb_vendor
int usb_vendor
USB Vendor D.
Definition: gphoto2-abilities-list.h:133
gp_message_codeset
const char * gp_message_codeset(const char *)
Set the current character codeset libgphoto2 is operating in.
Definition: gphoto2-abilities-list.c:90
GP_DEVICE_AUDIO_PLAYER
Definition: gphoto2-abilities-list.h:54
gp_abilities_list_reset
int gp_abilities_list_reset(CameraAbilitiesList *list)
Reset the list.
Definition: gphoto2-abilities-list.c:555
CameraAbilities::usb_class
int usb_class
USB device class.
Definition: gphoto2-abilities-list.h:135
CameraAbilities::reserved5
int reserved5
Definition: gphoto2-abilities-list.h:149
CameraAbilities::reserved2
int reserved2
Definition: gphoto2-abilities-list.h:146
gphoto2-context.h
Context callback operation functions.
gphoto2-port-log.h
GP_FILE_OPERATION_PREVIEW
Definition: gphoto2-abilities-list.h:76
GP_OPERATION_CAPTURE_AUDIO
Definition: gphoto2-abilities-list.h:65
CameraAbilities::status
CameraDriverStatus status
driver quality
Definition: gphoto2-abilities-list.h:121
GP_FOLDER_OPERATION_MAKE_DIR
Definition: gphoto2-abilities-list.h:89
_GPPortInfoList
Definition: gphoto2-port-info-list.c:69
CameraAbilities::reserved4
int reserved4
Definition: gphoto2-abilities-list.h:148
GP_DEVICE_STILL_CAMERA
Definition: gphoto2-abilities-list.h:53
gp_abilities_list_get_abilities
int gp_abilities_list_get_abilities(CameraAbilitiesList *list, int index, CameraAbilities *abilities)
Retrieve the camera abilities of entry with supplied index number.
Definition: gphoto2-abilities-list.c:652
gp_abilities_list_new
int gp_abilities_list_new(CameraAbilitiesList **list)
Allocate the memory for a new abilities list.
Definition: gphoto2-abilities-list.c:107
gp_abilities_list_detect
int gp_abilities_list_detect(CameraAbilitiesList *list, GPPortInfoList *info_list, CameraList *l, GPContext *context)
Definition: gphoto2-abilities-list.c:417
CameraAbilities::usb_protocol
int usb_protocol
USB device protocol.
Definition: gphoto2-abilities-list.h:137
gphoto2-port-info-list.h
CameraAbilities::file_operations
CameraFileOperation file_operations
Camera file op funcs.
Definition: gphoto2-abilities-list.h:130
CameraFolderOperation
CameraFolderOperation
Definition: gphoto2-abilities-list.h:85
GP_FILE_OPERATION_DELETE
Definition: gphoto2-abilities-list.h:75
GP_DRIVER_STATUS_TESTING
Definition: gphoto2-abilities-list.h:43
GphotoDeviceType
GphotoDeviceType
Definition: gphoto2-abilities-list.h:52
GP_OPERATION_NONE
Definition: gphoto2-abilities-list.h:62
CameraOperation
CameraOperation
Definition: gphoto2-abilities-list.h:61
gp_abilities_list_load
int gp_abilities_list_load(CameraAbilitiesList *list, GPContext *context)
Scans the system for camera drivers.
Definition: gphoto2-abilities-list.c:314
GP_OPERATION_CAPTURE_VIDEO
Definition: gphoto2-abilities-list.h:64
GP_DRIVER_STATUS_EXPERIMENTAL
Definition: gphoto2-abilities-list.h:44
gp_abilities_list_count
int gp_abilities_list_count(CameraAbilitiesList *list)
Count the entries in the supplied list.
Definition: gphoto2-abilities-list.c:575
CameraFileOperation
CameraFileOperation
Definition: gphoto2-abilities-list.h:73
GP_FOLDER_OPERATION_NONE
Definition: gphoto2-abilities-list.h:86
GP_FILE_OPERATION_AUDIO
Definition: gphoto2-abilities-list.h:78
GP_OPERATION_CAPTURE_IMAGE
Definition: gphoto2-abilities-list.h:63
GP_FILE_OPERATION_NONE
Definition: gphoto2-abilities-list.h:74
GP_DRIVER_STATUS_DEPRECATED
Definition: gphoto2-abilities-list.h:45
CameraAbilities
Describes the properties of a specific camera.
Definition: gphoto2-abilities-list.h:119
_GPContext
Definition: gphoto2-context.c:35
GP_FOLDER_OPERATION_REMOVE_DIR
Definition: gphoto2-abilities-list.h:90
gp_abilities_list_free
int gp_abilities_list_free(CameraAbilitiesList *list)
Free the given CameraAbilitiesList object.
Definition: gphoto2-abilities-list.c:132
GPPortType
GPPortType
The gphoto port type.
Definition: gphoto2-port-info-list.h:34