2 * \brief Camery driver header.
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_LIBRARY_H__
26 #define __GPHOTO2_LIBRARY_H__
28 #include <gphoto2/gphoto2-abilities-list.h>
29 #include <gphoto2/gphoto2-camera.h>
33 #endif /* __cplusplus */
36 * \brief Returns a unique id for the camera driver.
38 * \param id a #CameraText
39 * \return a gphoto2 error code
42 typedef int (* CameraLibraryIdFunc) (CameraText *id);
45 * \brief Adds the abilities of the supported models to the supplied list.
47 * \param list a #CameraAbilitiesList
48 * \return a gphoto2 error code
51 typedef int (* CameraLibraryAbilitiesFunc) (CameraAbilitiesList *list);
54 * \brief Initializes the camera.
56 * \param camera a #Camera
57 * \param context a #GPContext
58 * \return a gphoto2 error code
60 * The camera driver will establish a first connection
61 * to the camera and configure the camera variable (i.e. using
62 * #gp_filesystem_set_list_funcs or #gp_port_get_settings).
65 typedef int (* CameraLibraryInitFunc) (Camera *camera, GPContext *context);
68 * If you want to write a camera library, you need to implement
69 * the following three functions. Everything else should be declared
72 int camera_id (CameraText *id);
73 int camera_abilities (CameraAbilitiesList *list);
74 int camera_init (Camera *camera, GPContext *context);
78 #endif /* __cplusplus */
80 #endif /* __GPHOTO2_LIBRARY_H__ */