libgphoto2 photo camera library (libgphoto2) API 2.5.2

- Main Page
- Related Pages
- Data Structures
- Files

- File List
- Globals

gphoto2-abilities-list.h
Go to the documentation of this file.
1
25 #ifndef __GPHOTO2_ABILITIES_LIST_H__
26 #define __GPHOTO2_ABILITIES_LIST_H__
27
28 #include <gphoto2/gphoto2-context.h>
29 #include <gphoto2/gphoto2-list.h>
30 #include <gphoto2/gphoto2-port-info-list.h>
31
32 #include <gphoto2/gphoto2-port-log.h>
33
34 #ifdef __cplusplus
35 extern "C" {
36 #endif /* __cplusplus */
37
41 typedef enum {
42 GP_DRIVER_STATUS_PRODUCTION,
43 GP_DRIVER_STATUS_TESTING,
44 GP_DRIVER_STATUS_EXPERIMENTAL,
45 GP_DRIVER_STATUS_DEPRECATED
46 } CameraDriverStatus;
47
52 typedef enum {
53 GP_DEVICE_STILL_CAMERA = 0,
54 GP_DEVICE_AUDIO_PLAYER = 1 << 0
55 } GphotoDeviceType;
56
61 typedef enum {
62 GP_OPERATION_NONE = 0,
63 GP_OPERATION_CAPTURE_IMAGE = 1 << 0,
64 GP_OPERATION_CAPTURE_VIDEO = 1 << 1,
65 GP_OPERATION_CAPTURE_AUDIO = 1 << 2,
66 GP_OPERATION_CAPTURE_PREVIEW = 1 << 3,
67 GP_OPERATION_CONFIG = 1 << 4,
68 GP_OPERATION_TRIGGER_CAPTURE = 1 << 5
69 } CameraOperation;
70
74 typedef enum {
75 GP_FILE_OPERATION_NONE = 0,
76 GP_FILE_OPERATION_DELETE = 1 << 1,
77 GP_FILE_OPERATION_PREVIEW = 1 << 3,
78 GP_FILE_OPERATION_RAW = 1 << 4,
79 GP_FILE_OPERATION_AUDIO = 1 << 5,
80 GP_FILE_OPERATION_EXIF = 1 << 6
81 } CameraFileOperation;
82
86 typedef enum {
87 GP_FOLDER_OPERATION_NONE = 0,
88 GP_FOLDER_OPERATION_DELETE_ALL = 1 << 0,
89 GP_FOLDER_OPERATION_PUT_FILE = 1 << 1,
90 GP_FOLDER_OPERATION_MAKE_DIR = 1 << 2,
91 GP_FOLDER_OPERATION_REMOVE_DIR = 1 << 3
92 } CameraFolderOperation;
93
94 #ifdef _GPHOTO2_INTERNAL_CODE
95
96 /* enum CameraOperation */
97 extern const StringFlagItem gpi_camera_operation_map[];
98
99 /* enum CameraFileOperation */
100 extern const StringFlagItem gpi_file_operation_map[];
101
102 /* enum CameraFolderOperation */
103 extern const StringFlagItem gpi_folder_operation_map[];
104
105 /* enum GphotoDeviceType */
106 extern const StringFlagItem gpi_gphoto_device_type_map[];
107
108 /* enum CameraDriverStatus */
109 extern const StringFlagItem gpi_camera_driver_status_map[];
110
111 #endif /* _GPHOTO2_INTERNAL_CODE */
112
113
120 typedef struct {
121 char model [128];
122 CameraDriverStatus status;
125 GPPortType port;
127 int speed [64];
128
129 /* Supported operations */
130 CameraOperation operations;
131 CameraFileOperation file_operations;
132 CameraFolderOperation folder_operations;
134 int usb_vendor;
135 int usb_product;
136 int usb_class;
137 int usb_subclass;
138 int usb_protocol;
140 /* For core use */
141 char library [1024];
142 char id [1024];
144 GphotoDeviceType device_type;
147 int reserved2;
148 int reserved3;
149 int reserved4;
150 int reserved5;
151 int reserved6;
152 int reserved7;
153 int reserved8;
154 } CameraAbilities;
155
156
162 typedef struct _CameraAbilitiesList CameraAbilitiesList;
163
164
165 int gp_abilities_list_new (CameraAbilitiesList **list);
166 int gp_abilities_list_free (CameraAbilitiesList *list);
167
168 int gp_abilities_list_load (CameraAbilitiesList *list, GPContext *context);
169 int gp_abilities_list_load_dir (CameraAbilitiesList *list, const char *dir, GPContext *context);
170 int gp_abilities_list_reset (CameraAbilitiesList *list);
171
172 int gp_abilities_list_detect (CameraAbilitiesList *list,
173 GPPortInfoList *info_list, CameraList *l,
174 GPContext *context);
175
176 int gp_abilities_list_append (CameraAbilitiesList *list,
177 CameraAbilities abilities);
178
179 int gp_abilities_list_count (CameraAbilitiesList *list);
180
181 int gp_abilities_list_lookup_model (CameraAbilitiesList *list,
182 const char *model);
183
184 int gp_abilities_list_get_abilities (CameraAbilitiesList *list, int index,
185 CameraAbilities *abilities);
186
187 const char *gp_message_codeset (const char *);
188
189
197 #ifdef _GPHOTO2_INTERNAL_CODE
198 #define CAMLIBDIR_ENV "CAMLIBS"
199 #endif /* _GPHOTO2_INTERNAL_CODE */
200
201
202 #ifdef __cplusplus
203 }
204 #endif /* __cplusplus */
205
206 #endif /* __GPHOTO2_ABILITIES_LIST_H__ */