libgphoto2 photo camera library (libgphoto2) API 2.5.24

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__ */
fsfuncs
CameraFilesystemFuncs fsfuncs
Definition: template.c:504
CameraAbilities
Describes the properties of a specific camera.
Definition: gphoto2-abilities-list.h:120
GP_OPERATION_CAPTURE_PREVIEW
@ GP_OPERATION_CAPTURE_PREVIEW
Definition: gphoto2-abilities-list.h:66
CameraAbilities::operations
CameraOperation operations
Camera operation funcs.
Definition: gphoto2-abilities-list.h:130
CameraAbilities::reserved5
int reserved5
Definition: gphoto2-abilities-list.h:150
GP_FOLDER_OPERATION_NONE
@ GP_FOLDER_OPERATION_NONE
Definition: gphoto2-abilities-list.h:87
GP_OPERATION_CAPTURE_IMAGE
@ GP_OPERATION_CAPTURE_IMAGE
Definition: gphoto2-abilities-list.h:63
CameraAbilities::model
char model[128]
name of camera model
Definition: gphoto2-abilities-list.h:121
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:607
GP_FILE_OPERATION_AUDIO
@ GP_FILE_OPERATION_AUDIO
Definition: gphoto2-abilities-list.h:79
GP_FOLDER_OPERATION_DELETE_ALL
@ GP_FOLDER_OPERATION_DELETE_ALL
Definition: gphoto2-abilities-list.h:88
put_file_func
int put_file_func(CameraFilesystem *fs, const char *folder, const char *name, CameraFileType type, CameraFile *file, void *data, GPContext *context)
Definition: template.c:274
camera_manual
int camera_manual(Camera *camera, CameraText *manual, GPContext *context)
Definition: template.c:203
CameraAbilities::usb_vendor
int usb_vendor
USB Vendor D.
Definition: gphoto2-abilities-list.h:134
gp_abilities_list_new
int gp_abilities_list_new(CameraAbilitiesList **list)
Allocate the memory for a new abilities list.
Definition: gphoto2-abilities-list.c:101
gp_abilities_list_append
int gp_abilities_list_append(CameraAbilitiesList *list, CameraAbilities abilities)
Append the abilities to the list.
Definition: gphoto2-abilities-list.c:510
file_list_func
int file_list_func(CameraFilesystem *fs, const char *folder, CameraList *list, void *data, GPContext *context)
Definition: template.c:399
_GPPortInfoList
Definition: gphoto2-port-info-list.c:74
GP_DRIVER_STATUS_DEPRECATED
@ GP_DRIVER_STATUS_DEPRECATED
Definition: gphoto2-abilities-list.h:45
CameraAbilities::reserved6
int reserved6
Definition: gphoto2-abilities-list.h:151
gp_abilities_list_count
int gp_abilities_list_count(CameraAbilitiesList *list)
Count the entries in the supplied list.
Definition: gphoto2-abilities-list.c:560
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:636
GP_OPERATION_TRIGGER_CAPTURE
@ GP_OPERATION_TRIGGER_CAPTURE
Definition: gphoto2-abilities-list.h:68
gp_abilities_list_free
int gp_abilities_list_free(CameraAbilitiesList *list)
Free the given CameraAbilitiesList object.
Definition: gphoto2-abilities-list.c:125
CameraAbilities::reserved8
int reserved8
Definition: gphoto2-abilities-list.h:153
delete_file_func
int delete_file_func(CameraFilesystem *fs, const char *folder, const char *filename, void *data, GPContext *context)
Definition: template.c:296
CameraFile
File structure.
camera_exit
int camera_exit(Camera *camera, GPContext *context)
Definition: template.c:103
_CameraFunctions::get_config
CameraGetConfigFunc get_config
Called for requesting the configuration widgets.
Definition: gphoto2-camera.h:292
storage_info_func
int storage_info_func(CameraFilesystem *fs, CameraStorageInformation **storageinformations, int *nrofstorageinformations, void *data, GPContext *context)
Definition: template.c:420
camera_capture
int camera_capture(Camera *camera, CameraCaptureType type, CameraFilePath *path, GPContext *context)
Definition: template.c:171
CameraAbilities::usb_product
int usb_product
USB Product ID.
Definition: gphoto2-abilities-list.h:135
_CameraFunctions::capture_preview
CameraCapturePreviewFunc capture_preview
Preview viewfinder content.
Definition: gphoto2-camera.h:302
folder_list_func
int folder_list_func(CameraFilesystem *fs, const char *folder, CameraList *list, void *data, GPContext *context)
Definition: template.c:379
_CameraFunctions::capture
CameraCaptureFunc capture
Remote control the camera to capture.
Definition: gphoto2-camera.h:300
CameraFileType
CameraFileType
The type of view on the specified file.
Definition: gphoto2-file.h:73
CameraAbilities::reserved2
int reserved2
Definition: gphoto2-abilities-list.h:147
GP_DRIVER_STATUS_PRODUCTION
@ GP_DRIVER_STATUS_PRODUCTION
Definition: gphoto2-abilities-list.h:42
GP_FOLDER_OPERATION_PUT_FILE
@ GP_FOLDER_OPERATION_PUT_FILE
Definition: gphoto2-abilities-list.h:89
CameraAbilities::reserved3
int reserved3
Definition: gphoto2-abilities-list.h:148
GP_OPERATION_CONFIG
@ GP_OPERATION_CONFIG
Definition: gphoto2-abilities-list.h:67
camera_abilities
int camera_abilities(CameraAbilitiesList *list)
Get a list of abilities of all supported cameras.
Definition: template.c:476
GP_FILE_OPERATION_RAW
@ GP_FILE_OPERATION_RAW
Definition: gphoto2-abilities-list.h:78
_Camera
Definition: gphoto2-camera.h:325
CameraFolderOperation
CameraFolderOperation
Definition: gphoto2-abilities-list.h:86
camera_summary
int camera_summary(Camera *camera, CameraText *summary, GPContext *context)
Definition: template.c:187
gphoto2-result.h
GP_FILE_OPERATION_EXIF
@ GP_FILE_OPERATION_EXIF
Definition: gphoto2-abilities-list.h:80
CameraAbilities::device_type
GphotoDeviceType device_type
Device type.
Definition: gphoto2-abilities-list.h:144
gp_abilities_list_append
int gp_abilities_list_append(CameraAbilitiesList *list, CameraAbilities abilities)
Append the abilities to the list.
Definition: gphoto2-abilities-list.c:510
GP_PORT_USB
@ GP_PORT_USB
USB port.
Definition: gphoto2-port-info-list.h:37
CameraAbilities::reserved7
int reserved7
Definition: gphoto2-abilities-list.h:152
CameraDriverStatus
CameraDriverStatus
Definition: gphoto2-abilities-list.h:41
CameraAbilities::status
CameraDriverStatus status
driver quality
Definition: gphoto2-abilities-list.h:122
_CameraWidget
Definition: gphoto2-widget.c:38
_CameraAbilitiesList
Definition: gphoto2-abilities-list.c:62
GP_OK
#define GP_OK
Everything is OK.
Definition: gphoto2-port-result.h:30
camera_config_set
int camera_config_set(Camera *camera, CameraWidget *window, GPContext *context)
Definition: template.c:135
CameraFileOperation
CameraFileOperation
Definition: gphoto2-abilities-list.h:74
gp_filesystem_set_funcs
int gp_filesystem_set_funcs(CameraFilesystem *fs, CameraFilesystemFuncs *funcs, void *data)
Set all filesystem related function pointers.
Definition: gphoto2-filesys.c:1825
_CameraFunctions::exit
CameraExitFunc exit
Function called on closing the camera.
Definition: gphoto2-camera.h:289
gp_abilities_list_load
int gp_abilities_list_load(CameraAbilitiesList *list, GPContext *context)
Scans the system for camera drivers.
Definition: gphoto2-abilities-list.c:302
CameraAbilities::reserved4
int reserved4
Definition: gphoto2-abilities-list.h:149
GP_DEVICE_AUDIO_PLAYER
@ GP_DEVICE_AUDIO_PLAYER
Definition: gphoto2-abilities-list.h:54
GP_OPERATION_CAPTURE_AUDIO
@ GP_OPERATION_CAPTURE_AUDIO
Definition: gphoto2-abilities-list.h:65
get_info_func
int get_info_func(CameraFilesystem *fs, const char *folder, const char *filename, CameraFileInfo *info, void *data, GPContext *context)
Definition: template.c:341
GP_FOLDER_OPERATION_MAKE_DIR
@ GP_FOLDER_OPERATION_MAKE_DIR
Definition: gphoto2-abilities-list.h:90
GP_FILE_OPERATION_DELETE
@ GP_FILE_OPERATION_DELETE
Definition: gphoto2-abilities-list.h:76
_CameraFunctions::about
CameraAboutFunc about
A little About text, including authors and credits.
Definition: gphoto2-camera.h:307
gp_message_codeset
const char * gp_message_codeset(const char *)
Set the current character codeset libgphoto2 is operating in.
Definition: gphoto2-abilities-list.c:84
_CameraFileInfo
File information structure.
Definition: gphoto2-filesys.h:141
CameraOperation
CameraOperation
Definition: gphoto2-abilities-list.h:61
camera_capture_preview
int camera_capture_preview(Camera *camera, CameraFile *file, GPContext *context)
Definition: template.c:155
GP_DEVICE_STILL_CAMERA
@ GP_DEVICE_STILL_CAMERA
Definition: gphoto2-abilities-list.h:53
GP_WIDGET_WINDOW
@ GP_WIDGET_WINDOW
Window widget This is the toplevel configuration widget. It should likely contain multiple GP_WIDGET_...
Definition: gphoto2-widget.h:55
gp_widget_new
int gp_widget_new(CameraWidgetType type, const char *label, CameraWidget **widget)
Create a new widget.
Definition: gphoto2-widget.c:93
gphoto2-list.h
GP_PORT_SERIAL
@ GP_PORT_SERIAL
Serial port.
Definition: gphoto2-port-info-list.h:36
GP_FILE_OPERATION_PREVIEW
@ GP_FILE_OPERATION_PREVIEW
Definition: gphoto2-abilities-list.h:77
GP_DRIVER_STATUS_TESTING
@ GP_DRIVER_STATUS_TESTING
Definition: gphoto2-abilities-list.h:43
gp_abilities_list_detect
int gp_abilities_list_detect(CameraAbilitiesList *list, GPPortInfoList *info_list, CameraList *l, GPContext *context)
Definition: gphoto2-abilities-list.c:400
get_file_func
int get_file_func(CameraFilesystem *fs, const char *folder, const char *filename, CameraFileType type, CameraFile *file, void *data, GPContext *context)
Definition: template.c:250
CameraText::text
char text[32 *1024]
Character string containing the translated text.
Definition: gphoto2-camera.h:69
CameraFilePath
A structure created by the capture operation.
Definition: gphoto2-camera.h:79
GP_OPERATION_NONE
@ GP_OPERATION_NONE
Definition: gphoto2-abilities-list.h:62
gphoto2-port-info-list.h
CameraAbilities::usb_class
int usb_class
USB device class.
Definition: gphoto2-abilities-list.h:136
_CameraFilesystemFuncs
Definition: gphoto2-filesys.h:348
CameraAbilities::usb_protocol
int usb_protocol
USB device protocol.
Definition: gphoto2-abilities-list.h:138
GP_DRIVER_STATUS_EXPERIMENTAL
@ GP_DRIVER_STATUS_EXPERIMENTAL
Definition: gphoto2-abilities-list.h:44
camera_id
int camera_id(CameraText *id)
Get a unique camera id.
Definition: template.c:453
_CameraList
Definition: gphoto2-list.c:47
camera_init
int camera_init(Camera *camera, GPContext *context)
Definition: template.c:526
CameraAbilities::speed
int speed[64]
Supported serial port speeds (terminated with a value of 0).
Definition: gphoto2-abilities-list.h:127
gphoto2-port-log.h
GphotoDeviceType
GphotoDeviceType
Definition: gphoto2-abilities-list.h:52
_CameraFilesystem
The internal camera filesystem structure.
Definition: gphoto2-filesys.c:242
_CameraFunctions::manual
CameraManualFunc manual
Give a brief manual about any specific items a user has to know, translated.
Definition: gphoto2-camera.h:306
CameraText
CameraText structure used in various functions.
Definition: gphoto2-camera.h:68
camera_config_get
int camera_config_get(Camera *camera, CameraWidget **window, GPContext *context)
Definition: template.c:116
set_info_func
int set_info_func(CameraFilesystem *fs, const char *folder, const char *file, CameraFileInfo info, void *data, GPContext *context)
Definition: template.c:359
GP_CAPTURE_IMAGE
@ GP_CAPTURE_IMAGE
Capture an image.
Definition: gphoto2-camera.h:91
CameraAbilities::usb_subclass
int usb_subclass
USB device subclass.
Definition: gphoto2-abilities-list.h:137
CameraCaptureType
CameraCaptureType
Type of the capture to do.
Definition: gphoto2-camera.h:90
_CameraFunctions::summary
CameraSummaryFunc summary
Give a summary about the current camera status, translated.
Definition: gphoto2-camera.h:305
_CameraFunctions::set_config
CameraSetConfigFunc set_config
Called after a configuration was changed.
Definition: gphoto2-camera.h:293
GP_FILE_OPERATION_NONE
@ GP_FILE_OPERATION_NONE
Definition: gphoto2-abilities-list.h:75
CameraAbilities::folder_operations
CameraFolderOperation folder_operations
Camera folder op funcs.
Definition: gphoto2-abilities-list.h:132
GP_FOLDER_OPERATION_REMOVE_DIR
@ GP_FOLDER_OPERATION_REMOVE_DIR
Definition: gphoto2-abilities-list.h:91
camera_about
int camera_about(Camera *camera, CameraText *about, GPContext *context)
Definition: template.c:218
CameraAbilities::port
GPPortType port
Supported port types.
Definition: gphoto2-abilities-list.h:125
CameraAbilities::file_operations
CameraFileOperation file_operations
Camera file op funcs.
Definition: gphoto2-abilities-list.h:131
gphoto2-context.h
Context callback operation functions.
gphoto2-library.h
Camery driver header.
GP_OPERATION_CAPTURE_VIDEO
@ GP_OPERATION_CAPTURE_VIDEO
Definition: gphoto2-abilities-list.h:64
gp_abilities_list_reset
int gp_abilities_list_reset(CameraAbilitiesList *list)
Reset the list.
Definition: gphoto2-abilities-list.c:541
GP_ERROR_NOT_SUPPORTED
#define GP_ERROR_NOT_SUPPORTED
Functionality not supported.
Definition: gphoto2-port-result.h:54
_GPContext
Definition: gphoto2-context.c:38
delete_all_func
int delete_all_func(CameraFilesystem *fs, const char *folder, void *data, GPContext *context)
Definition: template.c:316
_CameraStorageInformation
Storage information structue.
Definition: gphoto2-filesys.h:214
GPPortType
GPPortType
The gphoto port type.
Definition: gphoto2-port-info-list.h:34