%compare-lengths
%compare-strncmp
%define class-name String2gearman_return_t
%ignore-case
%language=C++
%readonly-tables
%includes
%enum

%{ 
/*  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 "libgearman-1.0/return.h"

%}

struct error_code_st
{ 
  const char* name;
  const gearman_return_t code;
};
%%
SUCCESS, GEARMAN_SUCCESS
ARGUMENT_TOO_LARGE, GEARMAN_ARGUMENT_TOO_LARGE
COULD_NOT_CONNECT, GEARMAN_COULD_NOT_CONNECT
DATA_TOO_LARGE, GEARMAN_DATA_TOO_LARGE
ECHO_DATA_CORRUPTION, GEARMAN_ECHO_DATA_CORRUPTION
ERRNO, GEARMAN_ERRNO
EVENT, GEARMAN_EVENT
FLUSH_DATA, GEARMAN_FLUSH_DATA
GETADDRINFO, GEARMAN_GETADDRINFO
IGNORE_PACKET, GEARMAN_IGNORE_PACKET
INVALID_ARGUMENT, GEARMAN_INVALID_ARGUMENT
INVALID_COMMAND, GEARMAN_INVALID_COMMAND
INVALID_FUNCTION_NAME, GEARMAN_INVALID_FUNCTION_NAME
INVALID_MAGIC, GEARMAN_INVALID_MAGIC
INVALID_PACKET, GEARMAN_INVALID_PACKET
INVALID_WORKER_FUNCTION, GEARMAN_INVALID_WORKER_FUNCTION
IN_PROGRESS, GEARMAN_IN_PROGRESS
IO_WAIT, GEARMAN_IO_WAIT
JOB_EXISTS, GEARMAN_JOB_EXISTS
JOB_QUEUE_FULL, GEARMAN_JOB_QUEUE_FULL
LOST_CONNECTION, GEARMAN_LOST_CONNECTION
MEMORY_ALLOCATION_FAILURE, GEARMAN_MEMORY_ALLOCATION_FAILURE
NEED_WORKLOAD_FN, GEARMAN_NEED_WORKLOAD_FN
NOT_CONNECTED, GEARMAN_NOT_CONNECTED
NOT_FLUSHING, GEARMAN_NOT_FLUSHING
NO_ACTIVE_FDS, GEARMAN_NO_ACTIVE_FDS
NO_JOBS, GEARMAN_NO_JOBS
NO_REGISTERED_FUNCTION, GEARMAN_NO_REGISTERED_FUNCTION
NO_REGISTERED_FUNCTIONS, GEARMAN_NO_REGISTERED_FUNCTIONS
NO_SERVERS, GEARMAN_NO_SERVERS
PAUSE, GEARMAN_PAUSE
PIPE_EOF, GEARMAN_PIPE_EOF
PTHREAD, GEARMAN_PTHREAD
QUEUE_ERROR, GEARMAN_QUEUE_ERROR
RECV_IN_PROGRESS, GEARMAN_RECV_IN_PROGRESS
SEND_BUFFER_TOO_SMALL, GEARMAN_SEND_BUFFER_TOO_SMALL
SEND_IN_PROGRESS, GEARMAN_SEND_IN_PROGRESS
SERVER_ERROR, GEARMAN_SERVER_ERROR
SHUTDOWN, GEARMAN_SHUTDOWN
SHUTDOWN_GRACEFUL, GEARMAN_SHUTDOWN_GRACEFUL
TIMEOUT, GEARMAN_TIMEOUT
TOO_MANY_ARGS, GEARMAN_TOO_MANY_ARGS
UNEXPECTED_PACKET, GEARMAN_UNEXPECTED_PACKET
UNKNOWN_OPTION, GEARMAN_UNKNOWN_OPTION
UNKNOWN_STATE, GEARMAN_UNKNOWN_STATE
WORK_DATA, GEARMAN_WORK_DATA
WORK_ERROR, GEARMAN_WORK_ERROR
WORK_EXCEPTION, GEARMAN_WORK_EXCEPTION
WORK_FAIL, GEARMAN_WORK_FAIL
WORK_STATUS, GEARMAN_WORK_STATUS
WORK_WARNING, GEARMAN_WORK_WARNING
INVALID_SERVER_OPTION, GEARMAN_INVALID_SERVER_OPTION
JOB_NOT_FOUND, GEARMAN_JOB_NOT_FOUND
%%
