error_code.gperf 3.9 KB

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