3 * \author Copyright 2001 Lutz Müller <lutz@users.sf.net>
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version.
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with this library; if not, write to the
20 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
21 * Boston, MA 02111-1307, USA.
25 #include <gphoto2/gphoto2-library.h>
28 * \brief Get a unique camera id
29 * \param id a #CameraText that receives the id string
31 * This function should write a unique id into id and return #GP_OK. That is,
32 * choose a unique id, use strncpy in order to copy it into the id, and
33 * return #GP_OK. The driver name should suffice.
35 * \returns a gphoto2 error code
38 camera_id (CameraText *id)
40 strcpy (id->text, "sample driver");
45 * \brief Get a list of abilities of all supported cameras
46 * \param list a #CameraAbilitiesList
48 * This function should use #gp_abilities_list_append as many times as the
49 * number of models the camera driver supports. That is, fill out (in a loop)
50 * the #CameraAbilities for each model and append each of those to the
51 * supplied list using gp_abilities_list_append(). Then, return #GP_OK.
53 * \returns a gphoto2 error code
56 camera_abilities (CameraAbilitiesList *list)
58 /* Dummy implementation */
63 * \brief Initialize the camera
64 * \param camera a #Camera
66 * This is the most interesting function in your library. Here, you tell
67 * gphoto2 what operations your camera supports and you try to connect
68 * to the camera. That is, access camera->functions directly and set them
69 * to your implementation (if you have any). Then, tell the #CameraFilesystem
70 * (available in #camera->fs) how to retrieve lists
71 * (gp_filesystem_set_list_funcs()), how to retrieve or set file information
72 * (gp_filesystem_set_info_funcs()), how to get or delete files
73 * (gp_filesystem_set_file_funcs()), or how to put files or delete all files
74 * in a folder (#gp_filesystem_set_folder_funcs). After that, configure
75 * the port (#camera->port) which is already opened by gphoto2. You just have
76 * to call gp_port_settings_get(), adjust the settings, call
77 * gp_port_settings_set(), and try to write to and read from the port.
78 * If the camera responds, return #GP_OK. If not, return some
79 * meaningful error code.
81 * \returns a gphoto2 error code
84 camera_init (Camera *camera)
86 /* Dummy implementation */