Remove generated files
[framework/connectivity/libgphoto2.git] / gphoto2 / gphoto2-abilities-list.h
1 /** \file gphoto2-abilities-list.h
2  * \brief List of supported camera models including their abilities.
3  *
4  * \author Copyright 2000 Scott Fritzinger
5  *
6  * \par
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.
11  *
12  * \par
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. 
17  *
18  * \par
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.
23  */
24
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
38 /**
39  * Current implementation status of the camera driver.
40  */
41 typedef enum {
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. */
46 } CameraDriverStatus;
47
48 /**
49  * Type of the device represented. Currently we have Still Cameras
50  * and MTP Audio Players.
51  */
52 typedef enum {
53         GP_DEVICE_STILL_CAMERA          = 0,     /**< Traditional still camera */
54         GP_DEVICE_AUDIO_PLAYER          = 1 << 0 /**< Audio player */
55 } GphotoDeviceType;
56
57 /**
58  * A bitmask of remote control related operations of the device.
59  * Some drivers might support additional dynamic capabilities (like the PTP driver).
60  */
61 typedef enum {
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. */
68 } CameraOperation;
69
70 /**
71  * A bitmask of image related operations of the device.
72  */
73 typedef enum {
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;
81
82 /**
83  * A bitmask of filesystem related operations of the device.
84  */
85 typedef enum {
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;
92
93 #ifdef _GPHOTO2_INTERNAL_CODE
94
95   /* enum CameraOperation */
96   extern const StringFlagItem gpi_camera_operation_map[];
97
98   /* enum CameraFileOperation */
99   extern const StringFlagItem gpi_file_operation_map[];
100
101   /* enum CameraFolderOperation */
102   extern const StringFlagItem gpi_folder_operation_map[];
103
104   /* enum GphotoDeviceType */
105   extern const StringFlagItem gpi_gphoto_device_type_map[];
106
107   /* enum CameraDriverStatus */
108   extern const StringFlagItem gpi_camera_driver_status_map[];
109
110 #endif /* _GPHOTO2_INTERNAL_CODE */
111
112
113 /** 
114  * \brief Describes the properties of a specific camera.
115  *
116  * The internals of this structures are used extensively by the
117  * camlibs, but the status regarding use by frontends is questionable.
118  */
119 typedef struct {
120         char model [128];                       /**< \brief name of camera model */
121         CameraDriverStatus status;              /**< \brief driver quality */
122
123         /** \brief Supported port types. */
124         GPPortType port;
125         /** \brief Supported serial port speeds (terminated with a value of 0). */
126         int speed [64];
127
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 */
132
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 */
138
139         /* For core use */
140         char library [1024];    /**< \brief (Internal) library filename */
141         char id [1024];         /**< \brief (Internal) camera ID name */
142
143         GphotoDeviceType        device_type;    /**< \brief Device type. */
144         /** Reserved space to use in the future w/out changing the 
145          * struct size */
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 */
153 } CameraAbilities;
154
155
156 /**
157  * \brief List of supported camera models including their abilities
158  *
159  * The internals of this list are hidden - use the access functions.
160  */
161 typedef struct _CameraAbilitiesList CameraAbilitiesList;
162
163
164 int gp_abilities_list_new    (CameraAbilitiesList **list);
165 int gp_abilities_list_free   (CameraAbilitiesList *list);
166
167 int gp_abilities_list_load   (CameraAbilitiesList *list, GPContext *context);
168 int gp_abilities_list_reset  (CameraAbilitiesList *list);
169
170 int gp_abilities_list_detect (CameraAbilitiesList *list,
171                               GPPortInfoList *info_list, CameraList *l,
172                               GPContext *context);
173
174 int gp_abilities_list_append (CameraAbilitiesList *list,
175                               CameraAbilities abilities);
176
177 int gp_abilities_list_count  (CameraAbilitiesList *list);
178
179 int gp_abilities_list_lookup_model (CameraAbilitiesList *list,
180                                     const char *model);
181
182 int gp_abilities_list_get_abilities (CameraAbilitiesList *list, int index,
183                                      CameraAbilities *abilities);
184
185 const char *gp_message_codeset (const char *);
186
187
188 /**
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.
192  *
193  * \internal Internal use only.
194  */
195 #ifdef _GPHOTO2_INTERNAL_CODE
196 #define CAMLIBDIR_ENV "CAMLIBS"
197 #endif /* _GPHOTO2_INTERNAL_CODE */
198
199
200 #ifdef __cplusplus
201 }
202 #endif /* __cplusplus */
203
204 #endif /* __GPHOTO2_ABILITIES_LIST_H__ */