~j-pureftpd/gearmand/tokyo

« back to all changes in this revision

Viewing changes to libgearman/conf.h

  • Committer: Frank Denis
  • Date: 2009-06-22 14:50:52 UTC
  • mfrom: (50.1.1 gearmand)
  • Revision ID: j@jedi.devteam.orbus.fr-20090622145052-s40f87uem2zrmvdz
Sync with trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* Module configuration library
 
1
/* Gearman server and library
2
2
 * Copyright (C) 2009 Eric Day
3
3
 * All rights reserved.
4
4
 *
8
8
 
9
9
/**
10
10
 * @file
11
 
 * @brief modconf core declarations
 
11
 * @brief Gearman conf declarations
12
12
 */
13
13
 
14
 
#ifndef __MODCONF_H__
15
 
#define __MODCONF_H__
16
 
 
17
 
#include <inttypes.h>
18
 
#ifndef __cplusplus
19
 
#  include <stdbool.h>
20
 
#endif
21
 
#include <sys/types.h>
22
 
 
23
 
#include <libgearman/modconf_constants.h>
24
 
#include <libgearman/modconf_structs.h>
25
 
#include <libgearman/modconf_module.h>
 
14
#ifndef __GEARMAN_CONF_H__
 
15
#define __GEARMAN_CONF_H__
26
16
 
27
17
#ifdef __cplusplus
28
18
extern "C" {
29
19
#endif
30
20
 
31
21
/**
32
 
 * @addtogroup modconf modconf Core Interface
 
22
 * @addtogroup gearman conf Gearman Conf Interface
33
23
 * @{
34
24
 */
35
25
 
36
26
/**
37
 
 * Return modconf version.
38
 
 */
39
 
const char *gmodconf_version(void);
40
 
 
41
 
/**
42
 
 * Return modconf bug report URL.
43
 
 */
44
 
const char *gmodconf_bugreport(void);
45
 
 
46
 
/**
47
 
 * Initialize a modconf structure.
48
 
 */
49
 
modconf_st *gmodconf_create(modconf_st *modconf);
50
 
 
51
 
/**
52
 
 * Free a modconf structure.
53
 
 */
54
 
void gmodconf_free(modconf_st *modconf);
 
27
 * Initialize a gearman conf structure.
 
28
 */
 
29
gearman_conf_st *gearman_conf_create(gearman_conf_st *conf);
 
30
 
 
31
/**
 
32
 * Free a gearman conf structure.
 
33
 */
 
34
void gearman_conf_free(gearman_conf_st *conf);
55
35
 
56
36
/**
57
37
 * Return an return code for the last library error encountered.
58
38
 */
59
 
modconf_return_t gmodconf_return(modconf_st *modconf);
 
39
gearman_return_t gearman_conf_return(gearman_conf_st *conf);
60
40
 
61
41
/**
62
42
 * Return an error string for last library error encountered.
63
43
 */
64
 
const char *gmodconf_error(modconf_st *modconf);
65
 
 
66
 
/**
67
 
 * Value of errno in the case of a MODCONF_ERRNO return value.
68
 
 */
69
 
int gmodconf_errno(modconf_st *modconf);
70
 
 
71
 
/**
72
 
 * Set options for a modconf structure.
73
 
 */
74
 
void gmodconf_set_options(modconf_st *modconf, modconf_options_t options,
75
 
                          uint32_t data);
 
44
const char *gearman_conf_error(gearman_conf_st *conf);
 
45
 
 
46
/**
 
47
 * Value of errno in the case of a GEARMAN_ERRNO return value.
 
48
 */
 
49
int gearman_conf_errno(gearman_conf_st *conf);
 
50
 
 
51
/**
 
52
 * Set options for a gearman conf structure.
 
53
 */
 
54
void gearman_conf_set_options(gearman_conf_st *conf,
 
55
                              gearman_conf_options_t options, uint32_t data);
76
56
 
77
57
/**
78
58
 * Parse command line arguments.
79
59
 */
80
 
modconf_return_t gmodconf_parse_args(modconf_st *modconf, int argc,
81
 
                                     char *argv[]);
82
 
 
83
 
/**
84
 
 * Parse configuration file.
85
 
 */
86
 
modconf_return_t gmodconf_parse_file(modconf_st *modconf, const char *file);
 
60
gearman_return_t gearman_conf_parse_args(gearman_conf_st *conf, int argc,
 
61
                                         char *argv[]);
87
62
 
88
63
/**
89
64
 * Print usage information to stdout.
90
65
 */
91
 
void gmodconf_usage(modconf_st *modconf);
 
66
void gearman_conf_usage(gearman_conf_st *conf);
92
67
 
93
68
/** @} */
94
69
 
96
71
}
97
72
#endif
98
73
 
99
 
#endif /* __MODCONF_H__ */
 
74
#endif /* __GEARMAN_CONF_H__ */