error_code.gperf 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. %compare-lengths
  2. %compare-strncmp
  3. %define lookup-function-name string2error_code
  4. %ignore-case
  5. %language=ANSI-C
  6. %readonly-tables
  7. %{
  8. /* vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
  9. *
  10. * Gearmand client and server library.
  11. *
  12. * Copyright (C) 2013 Data Differential, http://datadifferential.com/
  13. * All rights reserved.
  14. *
  15. * Redistribution and use in source and binary forms, with or without
  16. * modification, are permitted provided that the following conditions are
  17. * met:
  18. *
  19. * * Redistributions of source code must retain the above copyright
  20. * notice, this list of conditions and the following disclaimer.
  21. *
  22. * * Redistributions in binary form must reproduce the above
  23. * copyright notice, this list of conditions and the following disclaimer
  24. * in the documentation and/or other materials provided with the
  25. * distribution.
  26. *
  27. * * The names of its contributors may not be used to endorse or
  28. * promote products derived from this software without specific prior
  29. * written permission.
  30. *
  31. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  32. * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  33. * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  34. * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
  35. * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  36. * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  37. * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  38. * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  39. * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  40. * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  41. * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  42. *
  43. */
  44. #pragma once
  45. #include <cstring>
  46. #include "libgearman-1.0/return.h"
  47. namespace org {
  48. namespace gearman {
  49. %}
  50. struct error_code_st
  51. {
  52. const char* name;
  53. const gearman_return_t code;
  54. };
  55. %%
  56. GEARMAN_SUCCESS, GEARMAN_SUCCESS
  57. GEARMAN_ARGUMENT_TOO_LARGE, GEARMAN_ARGUMENT_TOO_LARGE
  58. GEARMAN_COULD_NOT_CONNECT, GEARMAN_COULD_NOT_CONNECT
  59. GEARMAN_DATA_TOO_LARGE, GEARMAN_DATA_TOO_LARGE
  60. GEARMAN_ECHO_DATA_CORRUPTION, GEARMAN_ECHO_DATA_CORRUPTION
  61. GEARMAN_ERRNO, GEARMAN_ERRNO
  62. GEARMAN_EVENT, GEARMAN_EVENT
  63. GEARMAN_FLUSH_DATA, GEARMAN_FLUSH_DATA
  64. GEARMAN_GETADDRINFO, GEARMAN_GETADDRINFO
  65. GEARMAN_IGNORE_PACKET, GEARMAN_IGNORE_PACKET
  66. GEARMAN_INVALID_ARGUMENT, GEARMAN_INVALID_ARGUMENT
  67. GEARMAN_INVALID_COMMAND, GEARMAN_INVALID_COMMAND
  68. GEARMAN_INVALID_FUNCTION_NAME, GEARMAN_INVALID_FUNCTION_NAME
  69. GEARMAN_INVALID_MAGIC, GEARMAN_INVALID_MAGIC
  70. GEARMAN_INVALID_PACKET, GEARMAN_INVALID_PACKET
  71. GEARMAN_INVALID_WORKER_FUNCTION, GEARMAN_INVALID_WORKER_FUNCTION
  72. GEARMAN_IN_PROGRESS, GEARMAN_IN_PROGRESS
  73. GEARMAN_IO_WAIT, GEARMAN_IO_WAIT
  74. GEARMAN_JOB_EXISTS, GEARMAN_JOB_EXISTS
  75. GEARMAN_JOB_QUEUE_FULL, GEARMAN_JOB_QUEUE_FULL
  76. GEARMAN_LOST_CONNECTION, GEARMAN_LOST_CONNECTION
  77. GEARMAN_MEMORY_ALLOCATION_FAILURE, GEARMAN_MEMORY_ALLOCATION_FAILURE
  78. GEARMAN_NEED_WORKLOAD_FN, GEARMAN_NEED_WORKLOAD_FN
  79. GEARMAN_NOT_CONNECTED, GEARMAN_NOT_CONNECTED
  80. GEARMAN_NOT_FLUSHING, GEARMAN_NOT_FLUSHING
  81. GEARMAN_NO_ACTIVE_FDS, GEARMAN_NO_ACTIVE_FDS
  82. GEARMAN_NO_JOBS, GEARMAN_NO_JOBS
  83. GEARMAN_NO_REGISTERED_FUNCTION, GEARMAN_NO_REGISTERED_FUNCTION
  84. GEARMAN_NO_REGISTERED_FUNCTIONS, GEARMAN_NO_REGISTERED_FUNCTIONS
  85. GEARMAN_NO_SERVERS, GEARMAN_NO_SERVERS
  86. GEARMAN_PAUSE, GEARMAN_PAUSE
  87. GEARMAN_PIPE_EOF, GEARMAN_PIPE_EOF
  88. GEARMAN_PTHREAD, GEARMAN_PTHREAD
  89. GEARMAN_QUEUE_ERROR, GEARMAN_QUEUE_ERROR
  90. GEARMAN_RECV_IN_PROGRESS, GEARMAN_RECV_IN_PROGRESS
  91. GEARMAN_SEND_BUFFER_TOO_SMALL, GEARMAN_SEND_BUFFER_TOO_SMALL
  92. GEARMAN_SEND_IN_PROGRESS, GEARMAN_SEND_IN_PROGRESS
  93. GEARMAN_SERVER_ERROR, GEARMAN_SERVER_ERROR
  94. GEARMAN_SHUTDOWN, GEARMAN_SHUTDOWN
  95. GEARMAN_SHUTDOWN_GRACEFUL, GEARMAN_SHUTDOWN_GRACEFUL
  96. GEARMAN_TIMEOUT, GEARMAN_TIMEOUT
  97. GEARMAN_TOO_MANY_ARGS, GEARMAN_TOO_MANY_ARGS
  98. GEARMAN_UNEXPECTED_PACKET, GEARMAN_UNEXPECTED_PACKET
  99. GEARMAN_UNKNOWN_OPTION, GEARMAN_UNKNOWN_OPTION
  100. GEARMAN_UNKNOWN_STATE, GEARMAN_UNKNOWN_STATE
  101. GEARMAN_WORK_DATA, GEARMAN_WORK_DATA
  102. GEARMAN_WORK_ERROR, GEARMAN_WORK_ERROR
  103. GEARMAN_WORK_EXCEPTION, GEARMAN_WORK_EXCEPTION
  104. GEARMAN_WORK_FAIL, GEARMAN_WORK_FAIL
  105. GEARMAN_WORK_STATUS, GEARMAN_WORK_STATUS
  106. GEARMAN_WORK_WARNING, GEARMAN_WORK_WARNING
  107. GEARMAN_INVALID_SERVER_OPTION, GEARMAN_INVALID_SERVER_OPTION
  108. %%
  109. } // namespace gearman
  110. } // namespace org