1
/* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2
* vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
4
* gearman-interface: Interface Wrappers for Drizzle
5
* Copyright (C) 2008 Sun Microsystems, Inc.
7
* This program is free software; you can redistribute it and/or modify
8
* it under the terms of the GNU General Public License as published by
9
* the Free Software Foundation; either version 2 of the License, or
10
* (at your option) any later version.
12
* This program is distributed in the hope that it will be useful,
13
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
* GNU General Public License for more details.
17
* You should have received a copy of the GNU General Public License
18
* along with this program; if not, write to the Free Software
19
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
23
%rename(version) gearman_version;
24
%rename(bugreport) gearman_bugreport;
26
const char *gearman_version(void);
27
const char *gearman_bugreport(void);
29
%rename(Gearman) gearman;
36
/* Initialize a library instance structure. */
38
return gearman_create(NULL);
41
/* Free a library instance structure. */
46
/* Clone a library instance structure. */
48
return gearman_clone(NULL, $self);
51
/* Return an error string for last library error encountered. */
54
return gearman_error($self);
57
/* Value of errno in the case of a GEARMAN_ERRNO return value. */
60
return gearman_errno($self);
63
void setOptions(gearman_options_t options, uint32_t data)
65
gearman_set_options($self, options, data);
69
* Set logging callback for gearman instance.
70
* @param gearman Gearman instance structure previously initialized with
72
* @param log_fn Function to call when there is a logging message.
73
* @param log_fn_arg Argument to pass into the log callback function.
74
* @param verbose Verbosity level.
77
void gearman_set_log(gearman_st *gearman, gearman_log_fn log_fn,
78
void *log_fn_arg, gearman_verbose_t verbose);
82
* Set custom I/O event callbacks for a gearman structure.
85
void gearman_set_event_watch(gearman_st *gearman,
86
gearman_event_watch_fn *event_watch,
87
void *event_watch_arg);