1 /** \file gphoto2-abilities-list.h
2 * \brief List of supported camera models including their abilities.
4 * \author Copyright 2000 Scott Fritzinger
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version.
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
19 * You should have received a copy of the GNU Lesser General Public
20 * License along with this library; if not, write to the
21 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
22 * Boston, MA 02111-1307, USA.
25 #ifndef __GPHOTO2_ABILITIES_LIST_H__
26 #define __GPHOTO2_ABILITIES_LIST_H__
28 #include <gphoto2/gphoto2-context.h>
29 #include <gphoto2/gphoto2-list.h>
30 #include <gphoto2/gphoto2-port-info-list.h>
32 #include <gphoto2/gphoto2-port-log.h>
36 #endif /* __cplusplus */
39 * Current implementation status of the camera driver.
42 GP_DRIVER_STATUS_PRODUCTION, /**< Driver is production ready. */
43 GP_DRIVER_STATUS_TESTING, /**< Driver is beta quality. */
44 GP_DRIVER_STATUS_EXPERIMENTAL, /**< Driver is alpha quality and might even not work. */
45 GP_DRIVER_STATUS_DEPRECATED /**< Driver is no longer recommended to use and will be removed. */
49 * Type of the device represented. Currently we have Still Cameras
50 * and MTP Audio Players.
53 GP_DEVICE_STILL_CAMERA = 0, /**< Traditional still camera */
54 GP_DEVICE_AUDIO_PLAYER = 1 << 0 /**< Audio player */
58 * A bitmask of remote control related operations of the device.
59 * Some drivers might support additional dynamic capabilities (like the PTP driver).
62 GP_OPERATION_NONE = 0, /**< No remote control operation supported. */
63 GP_OPERATION_CAPTURE_IMAGE = 1 << 0, /**< Capturing images supported. */
64 GP_OPERATION_CAPTURE_VIDEO = 1 << 1, /**< Capturing videos supported. */
65 GP_OPERATION_CAPTURE_AUDIO = 1 << 2, /**< Capturing audio supported. */
66 GP_OPERATION_CAPTURE_PREVIEW = 1 << 3, /**< Capturing image previews supported. */
67 GP_OPERATION_CONFIG = 1 << 4 /**< Camera and Driver configuration supported. */
71 * A bitmask of image related operations of the device.
74 GP_FILE_OPERATION_NONE = 0, /**< No special file operations, just download. */
75 GP_FILE_OPERATION_DELETE = 1 << 1, /**< Deletion of files is possible. */
76 GP_FILE_OPERATION_PREVIEW = 1 << 3, /**< Previewing viewfinder content is possible. */
77 GP_FILE_OPERATION_RAW = 1 << 4, /**< Raw retrieval is possible (used by non-JPEG cameras) */
78 GP_FILE_OPERATION_AUDIO = 1 << 5, /**< Audio retrieval is possible. */
79 GP_FILE_OPERATION_EXIF = 1 << 6 /**< EXIF retrieval is possible. */
80 } CameraFileOperation;
83 * A bitmask of filesystem related operations of the device.
86 GP_FOLDER_OPERATION_NONE = 0, /**< No special filesystem operation. */
87 GP_FOLDER_OPERATION_DELETE_ALL = 1 << 0, /**< Deletion of all files on the device. */
88 GP_FOLDER_OPERATION_PUT_FILE = 1 << 1, /**< Upload of files to the device possible. */
89 GP_FOLDER_OPERATION_MAKE_DIR = 1 << 2, /**< Making directories on the device possible. */
90 GP_FOLDER_OPERATION_REMOVE_DIR = 1 << 3 /**< Removing directories from the device possible. */
91 } CameraFolderOperation;
93 #ifdef _GPHOTO2_INTERNAL_CODE
95 /* enum CameraOperation */
96 extern const StringFlagItem gpi_camera_operation_map[];
98 /* enum CameraFileOperation */
99 extern const StringFlagItem gpi_file_operation_map[];
101 /* enum CameraFolderOperation */
102 extern const StringFlagItem gpi_folder_operation_map[];
104 /* enum GphotoDeviceType */
105 extern const StringFlagItem gpi_gphoto_device_type_map[];
107 /* enum CameraDriverStatus */
108 extern const StringFlagItem gpi_camera_driver_status_map[];
110 #endif /* _GPHOTO2_INTERNAL_CODE */
114 * \brief Describes the properties of a specific camera.
116 * The internals of this structures are used extensively by the
117 * camlibs, but the status regarding use by frontends is questionable.
120 char model [128]; /**< \brief name of camera model */
121 CameraDriverStatus status; /**< \brief driver quality */
123 /** \brief Supported port types. */
125 /** \brief Supported serial port speeds (terminated with a value of 0). */
128 /* Supported operations */
129 CameraOperation operations; /**< \brief Camera operation funcs */
130 CameraFileOperation file_operations; /**< \brief Camera file op funcs */
131 CameraFolderOperation folder_operations;/**< \brief Camera folder op funcs */
133 int usb_vendor; /**< \brief USB Vendor D */
134 int usb_product; /**< \brief USB Product ID */
135 int usb_class; /**< \brief USB device class */
136 int usb_subclass; /**< \brief USB device subclass */
137 int usb_protocol; /**< \brief USB device protocol */
140 char library [1024]; /**< \brief (Internal) library filename */
141 char id [1024]; /**< \brief (Internal) camera ID name */
143 GphotoDeviceType device_type; /**< \brief Device type. */
144 /** Reserved space to use in the future w/out changing the
146 int reserved2; /**< reserved space \internal */
147 int reserved3; /**< reserved space \internal */
148 int reserved4; /**< reserved space \internal */
149 int reserved5; /**< reserved space \internal */
150 int reserved6; /**< reserved space \internal */
151 int reserved7; /**< reserved space \internal */
152 int reserved8; /**< reserved space \internal */
157 * \brief List of supported camera models including their abilities
159 * The internals of this list are hidden - use the access functions.
161 typedef struct _CameraAbilitiesList CameraAbilitiesList;
164 int gp_abilities_list_new (CameraAbilitiesList **list);
165 int gp_abilities_list_free (CameraAbilitiesList *list);
167 int gp_abilities_list_load (CameraAbilitiesList *list, GPContext *context);
168 int gp_abilities_list_reset (CameraAbilitiesList *list);
170 int gp_abilities_list_detect (CameraAbilitiesList *list,
171 GPPortInfoList *info_list, CameraList *l,
174 int gp_abilities_list_append (CameraAbilitiesList *list,
175 CameraAbilities abilities);
177 int gp_abilities_list_count (CameraAbilitiesList *list);
179 int gp_abilities_list_lookup_model (CameraAbilitiesList *list,
182 int gp_abilities_list_get_abilities (CameraAbilitiesList *list, int index,
183 CameraAbilities *abilities);
185 const char *gp_message_codeset (const char *);
189 * Name of the environment variable which may contain the path where
190 * to look for the camlibs. If this environment variable is not defined,
191 * use the compiled-in default constant.
193 * \internal Internal use only.
195 #ifdef _GPHOTO2_INTERNAL_CODE
196 #define CAMLIBDIR_ENV "CAMLIBS"
197 #endif /* _GPHOTO2_INTERNAL_CODE */
202 #endif /* __cplusplus */
204 #endif /* __GPHOTO2_ABILITIES_LIST_H__ */