You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

326 lines
11 KiB

  1. /* /////////////////////////////////////////////////////////////////////////
  2. * File: pantheios/init_codes.h
  3. *
  4. * Purpose: Back-/Front-end initialisation codes.
  5. *
  6. * Created: 27th September 2007
  7. * Updated: 27th December 2010
  8. *
  9. * Home: http://www.pantheios.org/
  10. *
  11. * Copyright (c) 2007-2010, Matthew Wilson and Synesis Software
  12. * All rights reserved.
  13. *
  14. * Redistribution and use in source and binary forms, with or without
  15. * modification, are permitted provided that the following conditions are
  16. * met:
  17. *
  18. * - Redistributions of source code must retain the above copyright notice,
  19. * this list of conditions and the following disclaimer.
  20. * - Redistributions in binary form must reproduce the above copyright
  21. * notice, this list of conditions and the following disclaimer in the
  22. * documentation and/or other materials provided with the distribution.
  23. * - Neither the name(s) of Matthew Wilson and Synesis Software nor the
  24. * names of any contributors may be used to endorse or promote products
  25. * derived from this software without specific prior written permission.
  26. *
  27. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
  28. * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
  29. * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
  30. * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
  31. * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
  32. * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
  33. * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
  34. * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
  35. * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
  36. * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  37. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  38. *
  39. * ////////////////////////////////////////////////////////////////////// */
  40. /** \file pantheios/init_codes.h
  41. *
  42. * [C, C++] Back-/Front-end initialisation codes.
  43. *
  44. * This file defines advisory status codes for back-end & front-end
  45. * initialisation.
  46. */
  47. #ifndef PANTHEIOS_INCL_PANTHEIOS_H_INIT_CODES
  48. #define PANTHEIOS_INCL_PANTHEIOS_H_INIT_CODES
  49. /* /////////////////////////////////////////////////////////////////////////
  50. * Version information
  51. */
  52. #ifndef PANTHEIOS_DOCUMENTATION_SKIP_SECTION
  53. # define PANTHEIOS_VER_PANTHEIOS_H_INIT_CODES_MAJOR 2
  54. # define PANTHEIOS_VER_PANTHEIOS_H_INIT_CODES_MINOR 5
  55. # define PANTHEIOS_VER_PANTHEIOS_H_INIT_CODES_REVISION 1
  56. # define PANTHEIOS_VER_PANTHEIOS_H_INIT_CODES_EDIT 17
  57. #endif /* !PANTHEIOS_DOCUMENTATION_SKIP_SECTION */
  58. /* /////////////////////////////////////////////////////////////////////////
  59. * Includes
  60. */
  61. #ifndef PANTHEIOS_INCL_PANTHEIOS_H_PANTHEIOS
  62. # include <pantheios/pantheios.h>
  63. #endif /* !PANTHEIOS_INCL_PANTHEIOS_H_PANTHEIOS */
  64. /* /////////////////////////////////////////////////////////////////////////
  65. * Documentation
  66. */
  67. /** \defgroup group__init_codes Pantheios Low-level Initialisation Codes
  68. *
  69. * Status codes for use by the implementors of the various sub-systems,
  70. * including \ref group__core_library "core",
  71. * \ref group__backend "back-ends",
  72. * \ref group__frontend "front-ends", and so on
  73. */
  74. /** \defgroup group__init_codes__core Pantheios Core Low-level Initialisation Codes
  75. *
  76. * \ingroup group__init_codes
  77. *
  78. * Status codes used in the implementation of the \ref group__core_library "core".
  79. */
  80. /** \defgroup group__init_codes__backend Pantheios Back-End Low-level Initialisation Codes
  81. *
  82. * \ingroup group__init_codes
  83. *
  84. * Status codes for use by the implementors of \ref group__backend "back-ends".
  85. */
  86. /** \defgroup group__init_codes__frontend Pantheios Front-End Low-level Initialisation Codes
  87. *
  88. * \ingroup group__init_codes
  89. *
  90. * Status codes for use by the implementors of \ref group__frontend "front-ends".
  91. */
  92. /* /////////////////////////////////////////////////////////////////////////
  93. * Status codes
  94. */
  95. /** \def PANTHEIOS_INIT_RC_SUCCESS
  96. *
  97. * Specifies that the operation completed successfully
  98. *
  99. * \ingroup group__init_codes
  100. */
  101. #define PANTHEIOS_INIT_RC_SUCCESS (0)
  102. /** \def PANTHEIOS_INIT_RC_OUT_OF_MEMORY
  103. *
  104. * Specifies that the operation failed due to memory exhaustion
  105. *
  106. * \ingroup group__init_codes
  107. */
  108. #define PANTHEIOS_INIT_RC_OUT_OF_MEMORY (-1)
  109. /** \def PANTHEIOS_INIT_RC_UNSPECIFIED_EXCEPTION
  110. *
  111. * Specifies that the operation failed because a general, standard-derived, exception was thrown
  112. *
  113. * \ingroup group__init_codes
  114. */
  115. #define PANTHEIOS_INIT_RC_UNSPECIFIED_EXCEPTION (-2)
  116. /** \def PANTHEIOS_INIT_RC_UNKNOWN_FAILURE
  117. *
  118. * Specifies that the operation failed because a bespoke, non-standard-derived, exception was thrown; this may indicate a design failure.
  119. *
  120. * \ingroup group__init_codes
  121. */
  122. #define PANTHEIOS_INIT_RC_UNKNOWN_FAILURE (-3)
  123. /** \def PANTHEIOS_INIT_RC_UNSPECIFIED_FAILURE
  124. *
  125. * Specifies that the operation failed in an unspecified manner. Callers may be able to retrieve more specific information from the platform-specific error mechanism (e.g. errno / GetLastError()).
  126. *
  127. * \ingroup group__init_codes
  128. */
  129. #define PANTHEIOS_INIT_RC_UNSPECIFIED_FAILURE (-4)
  130. /** \def PANTHEIOS_INIT_RC_NOT_IMPLEMENTED
  131. *
  132. * Specifies that the operation failed because it is not implemented
  133. *
  134. * \ingroup group__init_codes
  135. */
  136. #define PANTHEIOS_INIT_RC_NOT_IMPLEMENTED (-5)
  137. /** \def PANTHEIOS_INIT_RC_CANNOT_CREATE_TSS_INDEX
  138. *
  139. * Specifies that the operation failed because a Thread-Specific Storage key
  140. * could not be created.
  141. *
  142. * \ingroup group__init_codes
  143. */
  144. #define PANTHEIOS_INIT_RC_CANNOT_CREATE_TSS_INDEX (-6)
  145. /** \def PANTHEIOS_INIT_RC_CANNOT_CREATE_THREAD
  146. *
  147. * Specifies that the operation failed because a thread could not be
  148. * created.
  149. *
  150. * \ingroup group__init_codes
  151. */
  152. #define PANTHEIOS_INIT_RC_CANNOT_CREATE_THREAD (-7)
  153. /** \def PANTHEIOS_BE_INIT_RC_NO_BACKENDS_SPECIFIED
  154. *
  155. * Specifies that the operation failed because no backends were specified
  156. *
  157. * \ingroup group__init_codes__backend
  158. */
  159. #define PANTHEIOS_BE_INIT_RC_NO_BACKENDS_SPECIFIED (-10001)
  160. /** \def PANTHEIOS_BE_INIT_RC_ALL_BACKEND_INITS_FAILED
  161. *
  162. * Specifies that the operation failed because all backends failed to initialise
  163. *
  164. * \ingroup group__init_codes__backend
  165. */
  166. #define PANTHEIOS_BE_INIT_RC_ALL_BACKEND_INITS_FAILED (-10002)
  167. /** \def PANTHEIOS_BE_INIT_RC_INVALID_PROCESSID
  168. *
  169. * Specifies that the operation failed due to specification of an invalid process identifier
  170. *
  171. * \ingroup group__init_codes__backend
  172. */
  173. #define PANTHEIOS_BE_INIT_RC_INVALID_PROCESSID (-10003)
  174. /** \def PANTHEIOS_BE_INIT_RC_API_MUTEX_INIT_FAILED
  175. *
  176. * Specifies that the operation failed because mutex initialisation failed
  177. *
  178. * \ingroup group__init_codes__backend
  179. */
  180. #define PANTHEIOS_BE_INIT_RC_API_MUTEX_INIT_FAILED (-10004)
  181. /** \def PANTHEIOS_BE_INIT_RC_INTENDED_FAILURE
  182. *
  183. * Specifies that the operation failed deliberately, according to its design
  184. *
  185. * \ingroup group__init_codes__backend
  186. */
  187. #define PANTHEIOS_BE_INIT_RC_INTENDED_FAILURE (-10005)
  188. /** \def PANTHEIOS_BE_INIT_RC_INIT_PARAM_REQUIRED
  189. *
  190. * Specifies that the operation failed because a required parameter was not supplied
  191. *
  192. * \ingroup group__init_codes__backend
  193. */
  194. #define PANTHEIOS_BE_INIT_RC_INIT_PARAM_REQUIRED (-10006)
  195. /** \def PANTHEIOS_BE_INIT_RC_INVALID_ARGUMENT
  196. *
  197. * Specifies that the operation failed due to an invalid argument being specified
  198. *
  199. * \ingroup group__init_codes__backend
  200. */
  201. #define PANTHEIOS_BE_INIT_RC_INVALID_ARGUMENT (-10007)
  202. /** \def PANTHEIOS_BE_INIT_RC_ARGUMENT_TOO_LONG
  203. *
  204. * Specifies that the operation failed due to an argument being too long
  205. *
  206. * \ingroup group__init_codes__backend
  207. */
  208. #define PANTHEIOS_BE_INIT_RC_ARGUMENT_TOO_LONG (-10008)
  209. /** \def PANTHEIOS_BE_INIT_RC_ARGUMENT_OUT_OF_RANGE
  210. *
  211. * Specifies that the operation failed due to an argument being out of range
  212. *
  213. * \ingroup group__init_codes__backend
  214. */
  215. #define PANTHEIOS_BE_INIT_RC_ARGUMENT_OUT_OF_RANGE (-10009)
  216. /** \def PANTHEIOS_BE_INIT_RC_INIT_CONFIG_REQUIRED
  217. *
  218. * Specifies that the operation failed because required initialisation configuration information was missing or not supplied
  219. *
  220. * \ingroup group__init_codes__backend
  221. */
  222. #define PANTHEIOS_BE_INIT_RC_INIT_CONFIG_REQUIRED (-10010)
  223. /** \def PANTHEIOS_BE_INIT_RC_PERMISSION_DENIED
  224. *
  225. * Specifies that the operation failed because permission to access a required resource (such as a file) was denied
  226. *
  227. * \ingroup group__init_codes__backend
  228. */
  229. #define PANTHEIOS_BE_INIT_RC_PERMISSION_DENIED (-10011)
  230. /** \def PANTHEIOS_BE_INIT_RC_RESOURCE_BUSY
  231. *
  232. * Specifies that the operation failed because a required resource (such as a file) was already in use
  233. *
  234. * \ingroup group__init_codes__backend
  235. */
  236. #define PANTHEIOS_BE_INIT_RC_RESOURCE_BUSY (-10012)
  237. /** \def PANTHEIOS_BE_INIT_RC_FUTURE_VERSION_REQUESTED
  238. *
  239. * Specifies that the operation failed because a version was requested of a later version of Pantheios than was used to create the back-end
  240. *
  241. * \ingroup group__init_codes__backend
  242. */
  243. #define PANTHEIOS_BE_INIT_RC_FUTURE_VERSION_REQUESTED (-10013)
  244. /** \def PANTHEIOS_BE_INIT_RC_OLD_VERSION_NOT_SUPPORTED
  245. *
  246. * Specifies that the operation failed because a version was requested of a previous version of Pantheios that is no longer supported by the back-end
  247. *
  248. * \ingroup group__init_codes__backend
  249. */
  250. #define PANTHEIOS_BE_INIT_RC_OLD_VERSION_NOT_SUPPORTED (-10014)
  251. /** \def PANTHEIOS_BE_LOGENTRY_FAILED
  252. *
  253. * Specifies that the underlying call to <code>pantheios_be_logEntry()</code> failed; the back-end may have used bail-out logging to record the problem.
  254. *
  255. * \ingroup group__init_codes__backend
  256. */
  257. #define PANTHEIOS_BE_LOGENTRY_FAILED (-10015)
  258. /** \def PANTHEIOS_FE_INIT_RC_INTENDED_FAILURE
  259. *
  260. * Specifies that the operation failed deliberately, according to its design
  261. *
  262. * \ingroup group__init_codes__frontend
  263. */
  264. #define PANTHEIOS_FE_INIT_RC_INTENDED_FAILURE (-20001)
  265. /** \def PANTHEIOS_FE_INIT_RC_SYSTEM_NOT_CONFIGURED
  266. *
  267. * Specifies that the operation failed because the system is not correctly configured
  268. *
  269. * \ingroup group__init_codes__frontend
  270. */
  271. #define PANTHEIOS_FE_INIT_RC_SYSTEM_NOT_CONFIGURED (-20002)
  272. /** \def PANTHEIOS_FE_INIT_RC_INIT_CONFIG_REQUIRED
  273. *
  274. * Specifies that the operation failed because required initialisation configuration information was missing or not supplied
  275. *
  276. * \ingroup group__init_codes__frontend
  277. */
  278. #define PANTHEIOS_FE_INIT_RC_INIT_CONFIG_REQUIRED (-20003)
  279. /* ////////////////////////////////////////////////////////////////////// */
  280. #endif /* !PANTHEIOS_INCL_PANTHEIOS_H_INIT_CODES */
  281. /* ///////////////////////////// end of file //////////////////////////// */