|
@@ -0,0 +1,117 @@
|
|
|
+%compare-lengths
|
|
|
+%compare-strncmp
|
|
|
+%define lookup-function-name string2error_code
|
|
|
+%ignore-case
|
|
|
+%language=ANSI-C
|
|
|
+%readonly-tables
|
|
|
+
|
|
|
+%{
|
|
|
+/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
|
|
|
+ *
|
|
|
+ * Gearmand client and server library.
|
|
|
+ *
|
|
|
+ * Copyright (C) 2013 Data Differential, http://datadifferential.com/
|
|
|
+ * All rights reserved.
|
|
|
+ *
|
|
|
+ * Redistribution and use in source and binary forms, with or without
|
|
|
+ * modification, are permitted provided that the following conditions are
|
|
|
+ * met:
|
|
|
+ *
|
|
|
+ * * Redistributions of source code must retain the above copyright
|
|
|
+ * notice, this list of conditions and the following disclaimer.
|
|
|
+ *
|
|
|
+ * * Redistributions in binary form must reproduce the above
|
|
|
+ * copyright notice, this list of conditions and the following disclaimer
|
|
|
+ * in the documentation and/or other materials provided with the
|
|
|
+ * distribution.
|
|
|
+ *
|
|
|
+ * * The names of its contributors may not be used to endorse or
|
|
|
+ * promote products derived from this software without specific prior
|
|
|
+ * written permission.
|
|
|
+ *
|
|
|
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
|
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
|
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
|
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
|
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
|
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
|
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
|
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
|
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
|
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
|
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
+ *
|
|
|
+ */
|
|
|
+
|
|
|
+#pragma once
|
|
|
+
|
|
|
+#include <cstring>
|
|
|
+#include "libgearman-1.0/return.h"
|
|
|
+
|
|
|
+namespace org {
|
|
|
+namespace gearman {
|
|
|
+
|
|
|
+%}
|
|
|
+
|
|
|
+struct error_code_st
|
|
|
+{
|
|
|
+ const char* name;
|
|
|
+ const gearman_return_t code;
|
|
|
+};
|
|
|
+%%
|
|
|
+GEARMAN_SUCCESS, GEARMAN_SUCCESS
|
|
|
+GEARMAN_ARGUMENT_TOO_LARGE, GEARMAN_ARGUMENT_TOO_LARGE
|
|
|
+GEARMAN_COULD_NOT_CONNECT, GEARMAN_COULD_NOT_CONNECT
|
|
|
+GEARMAN_DATA_TOO_LARGE, GEARMAN_DATA_TOO_LARGE
|
|
|
+GEARMAN_ECHO_DATA_CORRUPTION, GEARMAN_ECHO_DATA_CORRUPTION
|
|
|
+GEARMAN_ERRNO, GEARMAN_ERRNO
|
|
|
+GEARMAN_EVENT, GEARMAN_EVENT
|
|
|
+GEARMAN_FLUSH_DATA, GEARMAN_FLUSH_DATA
|
|
|
+GEARMAN_GETADDRINFO, GEARMAN_GETADDRINFO
|
|
|
+GEARMAN_IGNORE_PACKET, GEARMAN_IGNORE_PACKET
|
|
|
+GEARMAN_INVALID_ARGUMENT, GEARMAN_INVALID_ARGUMENT
|
|
|
+GEARMAN_INVALID_COMMAND, GEARMAN_INVALID_COMMAND
|
|
|
+GEARMAN_INVALID_FUNCTION_NAME, GEARMAN_INVALID_FUNCTION_NAME
|
|
|
+GEARMAN_INVALID_MAGIC, GEARMAN_INVALID_MAGIC
|
|
|
+GEARMAN_INVALID_PACKET, GEARMAN_INVALID_PACKET
|
|
|
+GEARMAN_INVALID_WORKER_FUNCTION, GEARMAN_INVALID_WORKER_FUNCTION
|
|
|
+GEARMAN_IN_PROGRESS, GEARMAN_IN_PROGRESS
|
|
|
+GEARMAN_IO_WAIT, GEARMAN_IO_WAIT
|
|
|
+GEARMAN_JOB_EXISTS, GEARMAN_JOB_EXISTS
|
|
|
+GEARMAN_JOB_QUEUE_FULL, GEARMAN_JOB_QUEUE_FULL
|
|
|
+GEARMAN_LOST_CONNECTION, GEARMAN_LOST_CONNECTION
|
|
|
+GEARMAN_MEMORY_ALLOCATION_FAILURE, GEARMAN_MEMORY_ALLOCATION_FAILURE
|
|
|
+GEARMAN_NEED_WORKLOAD_FN, GEARMAN_NEED_WORKLOAD_FN
|
|
|
+GEARMAN_NOT_CONNECTED, GEARMAN_NOT_CONNECTED
|
|
|
+GEARMAN_NOT_FLUSHING, GEARMAN_NOT_FLUSHING
|
|
|
+GEARMAN_NO_ACTIVE_FDS, GEARMAN_NO_ACTIVE_FDS
|
|
|
+GEARMAN_NO_JOBS, GEARMAN_NO_JOBS
|
|
|
+GEARMAN_NO_REGISTERED_FUNCTION, GEARMAN_NO_REGISTERED_FUNCTION
|
|
|
+GEARMAN_NO_REGISTERED_FUNCTIONS, GEARMAN_NO_REGISTERED_FUNCTIONS
|
|
|
+GEARMAN_NO_SERVERS, GEARMAN_NO_SERVERS
|
|
|
+GEARMAN_PAUSE, GEARMAN_PAUSE
|
|
|
+GEARMAN_PIPE_EOF, GEARMAN_PIPE_EOF
|
|
|
+GEARMAN_PTHREAD, GEARMAN_PTHREAD
|
|
|
+GEARMAN_QUEUE_ERROR, GEARMAN_QUEUE_ERROR
|
|
|
+GEARMAN_RECV_IN_PROGRESS, GEARMAN_RECV_IN_PROGRESS
|
|
|
+GEARMAN_SEND_BUFFER_TOO_SMALL, GEARMAN_SEND_BUFFER_TOO_SMALL
|
|
|
+GEARMAN_SEND_IN_PROGRESS, GEARMAN_SEND_IN_PROGRESS
|
|
|
+GEARMAN_SERVER_ERROR, GEARMAN_SERVER_ERROR
|
|
|
+GEARMAN_SHUTDOWN, GEARMAN_SHUTDOWN
|
|
|
+GEARMAN_SHUTDOWN_GRACEFUL, GEARMAN_SHUTDOWN_GRACEFUL
|
|
|
+GEARMAN_TIMEOUT, GEARMAN_TIMEOUT
|
|
|
+GEARMAN_TOO_MANY_ARGS, GEARMAN_TOO_MANY_ARGS
|
|
|
+GEARMAN_UNEXPECTED_PACKET, GEARMAN_UNEXPECTED_PACKET
|
|
|
+GEARMAN_UNKNOWN_OPTION, GEARMAN_UNKNOWN_OPTION
|
|
|
+GEARMAN_UNKNOWN_STATE, GEARMAN_UNKNOWN_STATE
|
|
|
+GEARMAN_WORK_DATA, GEARMAN_WORK_DATA
|
|
|
+GEARMAN_WORK_ERROR, GEARMAN_WORK_ERROR
|
|
|
+GEARMAN_WORK_EXCEPTION, GEARMAN_WORK_EXCEPTION
|
|
|
+GEARMAN_WORK_FAIL, GEARMAN_WORK_FAIL
|
|
|
+GEARMAN_WORK_STATUS, GEARMAN_WORK_STATUS
|
|
|
+GEARMAN_WORK_WARNING, GEARMAN_WORK_WARNING
|
|
|
+GEARMAN_INVALID_SERVER_OPTION, GEARMAN_INVALID_SERVER_OPTION
|
|
|
+%%
|
|
|
+
|
|
|
+} // namespace gearman
|
|
|
+} // namespace org
|