command.gperf 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. %compare-lengths
  2. %compare-strncmp
  3. %define word-array-name gearman_command_string_st
  4. %define class-name String2gearman_command_t
  5. %global-table
  6. %ignore-case
  7. %language=C++
  8. %readonly-tables
  9. %includes
  10. %{
  11. /* vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
  12. *
  13. * Gearmand client and server library.
  14. *
  15. * Copyright (C) 2013 Data Differential, http://datadifferential.com/
  16. * All rights reserved.
  17. *
  18. * Redistribution and use in source and binary forms, with or without
  19. * modification, are permitted provided that the following conditions are
  20. * met:
  21. *
  22. * * Redistributions of source code must retain the above copyright
  23. * notice, this list of conditions and the following disclaimer.
  24. *
  25. * * Redistributions in binary form must reproduce the above
  26. * copyright notice, this list of conditions and the following disclaimer
  27. * in the documentation and/or other materials provided with the
  28. * distribution.
  29. *
  30. * * The names of its contributors may not be used to endorse or
  31. * promote products derived from this software without specific prior
  32. * written permission.
  33. *
  34. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  35. * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  36. * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  37. * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
  38. * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  39. * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  40. * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  41. * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  42. * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  43. * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  44. * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  45. *
  46. */
  47. #include "gear_config.h"
  48. #include <libgearman/common.h>
  49. #include <libgearman-1.0/visibility.h>
  50. #include <libgearman/command.h>
  51. #include "libgearman/assert.hpp"
  52. #include "libgearman/command.h"
  53. %}
  54. struct gearman_command_string_st
  55. {
  56. const char *name;
  57. const gearman_command_t code;
  58. };
  59. %%
  60. TEXT, GEARMAN_COMMAND_TEXT
  61. CAN_DO, GEARMAN_COMMAND_CAN_DO
  62. CANT_DO, GEARMAN_COMMAND_CANT_DO
  63. RESET_ABILITIES, GEARMAN_COMMAND_RESET_ABILITIES
  64. PRE_SLEEP, GEARMAN_COMMAND_PRE_SLEEP
  65. UNUSED, GEARMAN_COMMAND_UNUSED
  66. NOOP, GEARMAN_COMMAND_NOOP
  67. SUBMIT_JOB, GEARMAN_COMMAND_SUBMIT_JOB
  68. JOB_CREATED, GEARMAN_COMMAND_JOB_CREATED
  69. GRAB_JOB, GEARMAN_COMMAND_GRAB_JOB
  70. NO_JOB, GEARMAN_COMMAND_NO_JOB
  71. JOB_ASSIGN, GEARMAN_COMMAND_JOB_ASSIGN
  72. WORK_STATUS, GEARMAN_COMMAND_WORK_STATUS
  73. WORK_COMPLETE, GEARMAN_COMMAND_WORK_COMPLETE
  74. WORK_FAIL,GEARMAN_COMMAND_WORK_FAIL
  75. GET_STATUS,GEARMAN_COMMAND_GET_STATUS
  76. ECHO_REQ, GEARMAN_COMMAND_ECHO_REQ
  77. ECHO_RES, GEARMAN_COMMAND_ECHO_RES
  78. SUBMIT_JOB_BG, GEARMAN_COMMAND_SUBMIT_JOB_BG
  79. ERROR, GEARMAN_COMMAND_ERROR
  80. STATUS_RES, GEARMAN_COMMAND_STATUS_RES
  81. SUBMIT_JOB_HIGH, GEARMAN_COMMAND_SUBMIT_JOB_HIGH
  82. SET_CLIENT_ID, GEARMAN_COMMAND_SET_CLIENT_ID
  83. CAN_DO_TIMEOUT, GEARMAN_COMMAND_CAN_DO_TIMEOUT
  84. ALL_YOURS, GEARMAN_COMMAND_ALL_YOURS
  85. WORK_EXCEPTION, GEARMAN_COMMAND_WORK_EXCEPTION
  86. OPTION_REQ, GEARMAN_COMMAND_OPTION_REQ
  87. OPTION_RES, GEARMAN_COMMAND_OPTION_RES
  88. WORK_DATA, GEARMAN_COMMAND_WORK_DATA
  89. WORK_WARNING, GEARMAN_COMMAND_WORK_WARNING
  90. GRAB_JOB_UNIQ, GEARMAN_COMMAND_GRAB_JOB_UNIQ
  91. JOB_ASSIGN_UNIQ, GEARMAN_COMMAND_JOB_ASSIGN_UNIQ
  92. SUBMIT_JOB_HIGH_BG, GEARMAN_COMMAND_SUBMIT_JOB_HIGH_BG
  93. SUBMIT_JOB_LOW, GEARMAN_COMMAND_SUBMIT_JOB_LOW
  94. SUBMIT_JOB_LOW_BG, GEARMAN_COMMAND_SUBMIT_JOB_LOW_BG
  95. SUBMIT_JOB_SCHED, GEARMAN_COMMAND_SUBMIT_JOB_SCHED
  96. SUBMIT_JOB_EPOCH, GEARMAN_COMMAND_SUBMIT_JOB_EPOCH
  97. SUBMIT_REDUCE_JOB, GEARMAN_COMMAND_SUBMIT_REDUCE_JOB
  98. SUBMIT_REDUCE_JOB_BACKGROUND, GEARMAN_COMMAND_SUBMIT_REDUCE_JOB_BACKGROUND
  99. GRAB_JOB_ALL, GEARMAN_COMMAND_GRAB_JOB_ALL
  100. JOB_ASSIGN_ALL, GEARMAN_COMMAND_JOB_ASSIGN_ALL
  101. GET_STATUS_UNIQUE, GEARMAN_COMMAND_GET_STATUS_UNIQUE
  102. STATUS_RES_UNIQUE, GEARMAN_COMMAND_STATUS_RES_UNIQUE
  103. %%