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__ */