gphoto2-result.h 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. /** \file
  2. *
  3. * \author Copyright 2000 Scott Fritzinger
  4. *
  5. * \note
  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.
  10. *
  11. * \note
  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.
  16. *
  17. * \note
  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., 51 Franklin Street, Fifth Floor,
  21. * Boston, MA 02110-1301 USA
  22. */
  23. #ifndef __GPHOTO2_RESULT_H__
  24. #define __GPHOTO2_RESULT_H__
  25. /* Additional error codes are defined here */
  26. #include <gphoto2/gphoto2-port-result.h>
  27. #ifdef __cplusplus
  28. extern "C" {
  29. #endif /* __cplusplus */
  30. /**
  31. * \brief Corrupted data received
  32. *
  33. * Data is corrupt. This error is reported by camera drivers if corrupted
  34. * data has been received that can not be automatically handled. Normally,
  35. * drivers will do everything possible to automatically recover from this
  36. * error.
  37. **/
  38. #define GP_ERROR_CORRUPTED_DATA -102 /* Corrupted data */
  39. /**
  40. * \brief File already exists
  41. *
  42. * An operation failed because a file existed. This error is reported for
  43. * example when the user tries to create a file that already exists.
  44. **/
  45. #define GP_ERROR_FILE_EXISTS -103
  46. /**
  47. * \brief Specified camera model was not found
  48. *
  49. * The specified model could not be found. This error is reported when
  50. * the user specified a model that does not seem to be supported by
  51. * any driver.
  52. **/
  53. #define GP_ERROR_MODEL_NOT_FOUND -105
  54. /**
  55. * \brief Specified directory was not found
  56. *
  57. * The specified directory could not be found. This error is reported when
  58. * the user specified a directory that is non-existent.
  59. **/
  60. #define GP_ERROR_DIRECTORY_NOT_FOUND -107
  61. /**
  62. * \brief Specified file was not found
  63. *
  64. * The specified file could not be found. This error is reported when
  65. * the user wants to access a file that is non-existent.
  66. **/
  67. #define GP_ERROR_FILE_NOT_FOUND -108
  68. /**
  69. * \brief Specified directory already exists
  70. *
  71. * The specified directory already exists. This error is reported for example
  72. * when the user wants to create a directory that already exists.
  73. **/
  74. #define GP_ERROR_DIRECTORY_EXISTS -109
  75. /**
  76. * \brief The camera is already busy
  77. *
  78. * Camera I/O or a command is in progress.
  79. **/
  80. #define GP_ERROR_CAMERA_BUSY -110
  81. /**
  82. * \brief Path is not absolute
  83. *
  84. * The specified path is not absolute. This error is reported when the user
  85. * specifies paths that are not absolute, i.e. paths like "path/to/directory".
  86. * As a rule of thumb, in gphoto2, there is nothing like relative paths.
  87. **/
  88. #define GP_ERROR_PATH_NOT_ABSOLUTE -111
  89. /**
  90. * \brief Cancellation successful.
  91. *
  92. * A cancellation requestion by the frontend via progress callback and
  93. * GP_CONTEXT_FEEDBACK_CANCEL was successful and the transfer has been aborted.
  94. */
  95. #define GP_ERROR_CANCEL -112
  96. /**
  97. * \brief Unspecified camera error
  98. *
  99. * The camera reported some kind of error. This can be either a
  100. * photographic error, such as failure to autofocus, underexposure, or
  101. * violating storage permission, anything else that stops the camera
  102. * from performing the operation.
  103. */
  104. #define GP_ERROR_CAMERA_ERROR -113
  105. /**
  106. * \brief Unspecified failure of the operating system
  107. *
  108. * There was some sort of OS error in communicating with the camera,
  109. * e.g. lack of permission for an operation.
  110. */
  111. #define GP_ERROR_OS_FAILURE -114
  112. /**
  113. * \brief Not enough space
  114. *
  115. * There was not enough free space when uploading a file.
  116. */
  117. #define GP_ERROR_NO_SPACE -115
  118. const char *gp_result_as_string (int result);
  119. #ifdef __cplusplus
  120. }
  121. #endif /* __cplusplus */
  122. #endif /* __GPHOTO2_RESULT_H__ */