00001 /* Gearman server and library 00002 * Copyright (C) 2008 Brian Aker, Eric Day 00003 * All rights reserved. 00004 * 00005 * Use and distribution licensed under the BSD license. See 00006 * the COPYING file in the parent directory for full text. 00007 */ 00008 00014 #ifndef __GEARMAN_H__ 00015 #define __GEARMAN_H__ 00016 00017 #include <inttypes.h> 00018 #ifndef __cplusplus 00019 # include <stdbool.h> 00020 #endif 00021 #include <sys/types.h> 00022 #include <netinet/in.h> 00023 #include <sys/socket.h> 00024 #include <netdb.h> 00025 #include <arpa/inet.h> 00026 #include <poll.h> 00027 #include <sys/uio.h> 00028 #include <stdarg.h> 00029 #include <stdlib.h> 00030 00031 #include <libgearman/visibility.h> 00032 #include <libgearman/configure.h> 00033 #include <libgearman/constants.h> 00034 #include <libgearman/strerror.h> 00035 00036 // Everything above this line must be in the order specified. 00037 #include <libgearman/core.h> 00038 #include <libgearman/task.h> 00039 #include <libgearman/job.h> 00040 00041 #include <libgearman/worker.h> 00042 #include <libgearman/client.h> 00043 00044 #ifdef __cplusplus 00045 extern "C" { 00046 #endif 00047 00068 GEARMAN_API 00069 const char *gearman_version(void); 00070 00076 GEARMAN_API 00077 const char *gearman_bugreport(void); 00078 00085 GEARMAN_API 00086 const char *gearman_verbose_name(gearman_verbose_t verbose); 00087 00096 GEARMAN_API 00097 gearman_return_t gearman_parse_servers(const char *servers, 00098 gearman_parse_server_fn *callback, 00099 void *context); 00100 00109 #define gearman_timeout(__object) ((__object)->gearman.timeout) 00110 00119 #define gearman_set_timeout(__object, __value) ((__object)->gearman.timeout)=(__value); 00120 00123 #ifdef __cplusplus 00124 } 00125 #endif 00126 00127 #endif /* __GEARMAN_H__ */