libgphoto2 (libgphoto2): libgphoto2/gphoto2-abilities-list.h Source File

Main Page | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

# gphoto2-abilities-list.h

Go to the documentation of this file.

    00001
    00025 #ifndef __GPHOTO2_ABILITIES_LIST_H__
    00026 #define __GPHOTO2_ABILITIES_LIST_H__
    00027
    00028 #include <gphoto2-context.h>
    00029 #include <gphoto2-list.h>
    00030 #include <gphoto2-port-info-list.h>
    00031
    00032 #ifdef __cplusplus
    00033 extern "C" {
    00034 #endif /* __cplusplus */
    00035
    00036 typedef enum {
    00037         GP_DRIVER_STATUS_PRODUCTION,
    00038         GP_DRIVER_STATUS_TESTING,
    00039         GP_DRIVER_STATUS_EXPERIMENTAL,
    00040         GP_DRIVER_STATUS_DEPRECATED
    00041 } CameraDriverStatus;
    00042
    00043 typedef enum {
    00044         GP_OPERATION_NONE               = 0,
    00045         GP_OPERATION_CAPTURE_IMAGE      = 1 << 0,
    00046         GP_OPERATION_CAPTURE_VIDEO      = 1 << 1,
    00047         GP_OPERATION_CAPTURE_AUDIO      = 1 << 2,
    00048         GP_OPERATION_CAPTURE_PREVIEW    = 1 << 3,
    00049         GP_OPERATION_CONFIG             = 1 << 4
    00050 } CameraOperation;
    00051
    00052 typedef enum {
    00053         GP_FILE_OPERATION_NONE          = 0,
    00054         GP_FILE_OPERATION_DELETE        = 1 << 1,
    00055         GP_FILE_OPERATION_PREVIEW       = 1 << 3,
    00056         GP_FILE_OPERATION_RAW           = 1 << 4,
    00057         GP_FILE_OPERATION_AUDIO         = 1 << 5,
    00058         GP_FILE_OPERATION_EXIF          = 1 << 6
    00059 } CameraFileOperation;
    00060
    00061 typedef enum {
    00062         GP_FOLDER_OPERATION_NONE        = 0,
    00063         GP_FOLDER_OPERATION_DELETE_ALL  = 1 << 0,
    00064         GP_FOLDER_OPERATION_PUT_FILE    = 1 << 1,
    00065         GP_FOLDER_OPERATION_MAKE_DIR    = 1 << 2,
    00066         GP_FOLDER_OPERATION_REMOVE_DIR  = 1 << 3
    00067 } CameraFolderOperation;
    00068
    00069
    00076 typedef struct {
    00077         char model [128];
    00078         CameraDriverStatus status;
    00081         GPPortType port;
    00083         int speed [64];
    00084
    00085         /* Supported operations */
    00086         CameraOperation       operations;
    00087         CameraFileOperation   file_operations;
    00088         CameraFolderOperation folder_operations;
    00090         int usb_vendor;
    00091         int usb_product;
    00092         int usb_class;
    00093         int usb_subclass;
    00094         int usb_protocol;
    00096         /* For core use */
    00097         char library [1024];
    00098         char id [1024];
    00100         /* Reserved space to use in the future w/out changing the
    00101          * struct size */
    00102         int reserved1;
    00103         int reserved2;
    00104         int reserved3;
    00105         int reserved4;
    00106         int reserved5;
    00107         int reserved6;
    00108         int reserved7;
    00109         int reserved8;
    00110 } CameraAbilities;
    00111
    00112
    00118 typedef struct _CameraAbilitiesList CameraAbilitiesList;
    00119
    00120
    00121 int gp_abilities_list_new    (CameraAbilitiesList **list);
    00122 int gp_abilities_list_free   (CameraAbilitiesList *list);
    00123
    00124 int gp_abilities_list_load   (CameraAbilitiesList *list, GPContext *context);
    00125 int gp_abilities_list_reset  (CameraAbilitiesList *list);
    00126
    00127 int gp_abilities_list_detect (CameraAbilitiesList *list,
    00128                               GPPortInfoList *info_list, CameraList *l,
    00129                               GPContext *context);
    00130
    00131 int gp_abilities_list_append (CameraAbilitiesList *list,
    00132                               CameraAbilities abilities);
    00133
    00134 int gp_abilities_list_count  (CameraAbilitiesList *list);
    00135
    00136 int gp_abilities_list_lookup_model (CameraAbilitiesList *list,
    00137                                     const char *model);
    00138
    00139 int gp_abilities_list_get_abilities (CameraAbilitiesList *list, int index,
    00140                                      CameraAbilities *abilities);
    00141
    00142 const char *gp_message_codeset (const char *);
    00143
    00144 #ifdef __cplusplus
    00145 }
    00146 #endif /* __cplusplus */
    00147
    00148 #endif /* __GPHOTO2_ABILITIES_LIST_H__ */