Logo Search packages:      
Sourcecode: libgphoto2 version File versions  Download package

gphoto2-abilities-list.h

Go to the documentation of this file.
/** \file gphoto2-abilities-list.h
 * \brief List of supported camera models including their abilities.
 *
 * \author Copyright  2000 Scott Fritzinger
 *
 * \par
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * \par
 * This library is distributed in the hope that it will be useful, 
 * but WITHOUT ANY WARRANTY; without even the implied warranty of 
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details. 
 *
 * \par
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the
 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 * Boston, MA 02111-1307, USA.
 */

#ifndef __GPHOTO2_ABILITIES_LIST_H__
#define __GPHOTO2_ABILITIES_LIST_H__

#include <gphoto2-context.h>
#include <gphoto2-list.h>
#include <gphoto2-port-info-list.h>

#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */

typedef enum {
        GP_DRIVER_STATUS_PRODUCTION,
        GP_DRIVER_STATUS_TESTING,
      GP_DRIVER_STATUS_EXPERIMENTAL,
      GP_DRIVER_STATUS_DEPRECATED
} CameraDriverStatus;

typedef enum {
        GP_OPERATION_NONE               = 0,
        GP_OPERATION_CAPTURE_IMAGE      = 1 << 0,
        GP_OPERATION_CAPTURE_VIDEO      = 1 << 1,
        GP_OPERATION_CAPTURE_AUDIO      = 1 << 2,
        GP_OPERATION_CAPTURE_PREVIEW    = 1 << 3,
        GP_OPERATION_CONFIG             = 1 << 4
} CameraOperation;

typedef enum {
        GP_FILE_OPERATION_NONE          = 0,
        GP_FILE_OPERATION_DELETE        = 1 << 1,
        GP_FILE_OPERATION_PREVIEW       = 1 << 3,
        GP_FILE_OPERATION_RAW           = 1 << 4,
        GP_FILE_OPERATION_AUDIO         = 1 << 5,
        GP_FILE_OPERATION_EXIF          = 1 << 6
} CameraFileOperation;

typedef enum {
        GP_FOLDER_OPERATION_NONE        = 0, 
        GP_FOLDER_OPERATION_DELETE_ALL  = 1 << 0,
        GP_FOLDER_OPERATION_PUT_FILE    = 1 << 1,
        GP_FOLDER_OPERATION_MAKE_DIR    = 1 << 2,
        GP_FOLDER_OPERATION_REMOVE_DIR  = 1 << 3
} CameraFolderOperation;


/** 
 * \brief Describes the properties of a specific camera.
 *
 * The internals of this structures are used extensively by the
 * camlibs, but the status regarding use by frontends is questionable.
 */
00076 typedef struct {
00077         char model [128];                 /**< name of camera model */
00078         CameraDriverStatus status;        /**< driver quality */

      /** Supported port. */
00081       GPPortType port;
      /** Supported port speeds (terminated with a value of 0). */
00083         int speed [64];

        /* Supported operations */
00086         CameraOperation       operations; /**< camera operation funcs */
00087         CameraFileOperation   file_operations;  /**< camera file op funcs */
00088         CameraFolderOperation folder_operations;/**< camera folder op funcs */

00090       int usb_vendor;         /**< USB Vendor D */
00091       int usb_product;  /**< USB Product ID */
00092       int usb_class;          /**< USB device class */
00093       int usb_subclass; /**< USB device subclass */
00094       int usb_protocol; /**< USB device protocol */

        /* For core use */
00097         char library [1024];  /**< \internal */
00098         char id [1024];       /**< \internal */

      /* Reserved space to use in the future w/out changing the 
       * struct size */
00102       int reserved1;          /**< reserved space \internal */
00103         int reserved2;        /**< reserved space \internal */
00104         int reserved3;        /**< reserved space \internal */
00105         int reserved4;        /**< reserved space \internal */
00106         int reserved5;        /**< reserved space \internal */
00107         int reserved6;        /**< reserved space \internal */
00108         int reserved7;        /**< reserved space \internal */
00109         int reserved8;        /**< reserved space \internal */
} CameraAbilities;


/**
 * \brief List of supported camera models including their abilities
 *
 * The internals of this list are hidden - use the access functions.
 */
00118 typedef struct _CameraAbilitiesList CameraAbilitiesList;


int gp_abilities_list_new    (CameraAbilitiesList **list);
int gp_abilities_list_free   (CameraAbilitiesList *list);

int gp_abilities_list_load   (CameraAbilitiesList *list, GPContext *context);
int gp_abilities_list_reset  (CameraAbilitiesList *list);

int gp_abilities_list_detect (CameraAbilitiesList *list,
                        GPPortInfoList *info_list, CameraList *l,
                        GPContext *context);

int gp_abilities_list_append (CameraAbilitiesList *list,
                        CameraAbilities abilities);

int gp_abilities_list_count  (CameraAbilitiesList *list);

int gp_abilities_list_lookup_model (CameraAbilitiesList *list,
                            const char *model);

int gp_abilities_list_get_abilities (CameraAbilitiesList *list, int index,
                             CameraAbilities *abilities);

const char *gp_message_codeset (const char *);

#ifdef __cplusplus
}
#endif /* __cplusplus */

#endif /* __GPHOTO2_ABILITIES_LIST_H__ */

Generated by  Doxygen 1.6.0   Back to index