1 /** \file gphoto2-port-result.h
3 * Copyright © 2001 Lutz Müller <lutz@users.sf.net>
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the
17 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 * Boston, MA 02111-1307, USA.
21 #ifndef __GPHOTO2_PORT_RESULT_H__
22 #define __GPHOTO2_PORT_RESULT_H__
24 /* Return values. gphoto2-port should only return values from 0 to -99 */
26 * \brief Everything is OK
28 * Note that this is also the value 0, and every error is negative (lower).
32 * \brief Generic Error
36 * \brief Bad parameters passed
38 #define GP_ERROR_BAD_PARAMETERS -2
40 * \brief Out of memory
42 #define GP_ERROR_NO_MEMORY -3
44 * \brief Error in the camera driver
46 #define GP_ERROR_LIBRARY -4
48 * \brief Unknown libgphoto2 port passed
50 #define GP_ERROR_UNKNOWN_PORT -5
52 * \brief Functionality not supported
54 #define GP_ERROR_NOT_SUPPORTED -6
56 * \brief Generic I/O error
58 #define GP_ERROR_IO -7
60 * \brief Buffer overflow of internal structure
62 #define GP_ERROR_FIXED_LIMIT_EXCEEDED -8
64 * \brief Operation timed out
66 #define GP_ERROR_TIMEOUT -10
69 * \brief Serial ports not supported
71 #define GP_ERROR_IO_SUPPORTED_SERIAL -20
73 * \brief USB ports not supported
75 #define GP_ERROR_IO_SUPPORTED_USB -21
78 * \brief Error initialising I/O
80 #define GP_ERROR_IO_INIT -31
82 * \brief I/O during read
84 #define GP_ERROR_IO_READ -34
86 * \brief I/O during write
88 #define GP_ERROR_IO_WRITE -35
90 * \brief I/O during update of settings
92 #define GP_ERROR_IO_UPDATE -37
95 * \brief Specified serial speed not possible.
97 #define GP_ERROR_IO_SERIAL_SPEED -41
100 * \brief Error during USB Clear HALT
102 #define GP_ERROR_IO_USB_CLEAR_HALT -51
104 * \brief Error when trying to find USB device
106 #define GP_ERROR_IO_USB_FIND -52
108 * \brief Error when trying to claim the USB device
110 #define GP_ERROR_IO_USB_CLAIM -53
113 * \brief Error when trying to lock the device
115 #define GP_ERROR_IO_LOCK -60
118 * \brief Unspecified error when talking to HAL
120 #define GP_ERROR_HAL -70
122 const char *gp_port_result_as_string (int result);
124 #endif /* __GPHOTO2_PORT_RESULT_H__ */