~ubuntu-branches/debian/sid/lvm2/sid

« back to all changes in this revision

Viewing changes to libdaemon/client/config-util.h

  • Committer: Package Import Robot
  • Author(s): Bastian Blank
  • Date: 2013-03-03 12:33:47 UTC
  • mfrom: (1.1.15)
  • Revision ID: package-import@ubuntu.com-20130303123347-smfwei6dodkdth55
Tags: 2.02.98-1
New upstream version.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright (C) 2011-2012 Red Hat, Inc.
 
3
 *
 
4
 * This file is part of LVM2.
 
5
 *
 
6
 * This copyrighted material is made available to anyone wishing to use,
 
7
 * modify, copy, or redistribute it subject to the terms and conditions
 
8
 * of the GNU Lesser General Public License v.2.1.
 
9
 *
 
10
 * You should have received a copy of the GNU Lesser General Public License
 
11
 * along with this program; if not, write to the Free Software Foundation,
 
12
 * Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
13
 */
 
14
 
 
15
#ifndef _LVM_DAEMON_CONFIG_UTIL_H
 
16
#define _LVM_DAEMON_CONFIG_UTIL_H
 
17
 
 
18
#include "configure.h"
 
19
#include "libdevmapper.h"
 
20
 
 
21
#include <stdarg.h>
 
22
 
 
23
struct buffer {
 
24
        int allocated;
 
25
        int used;
 
26
        char *mem;
 
27
};
 
28
 
 
29
int buffer_append_vf(struct buffer *buf, va_list ap);
 
30
int buffer_append_f(struct buffer *buf, ...);
 
31
int buffer_append(struct buffer *buf, const char *string);
 
32
void buffer_init(struct buffer *buf);
 
33
void buffer_destroy(struct buffer *buf);
 
34
int buffer_realloc(struct buffer *buf, int required);
 
35
 
 
36
int buffer_line(const char *line, void *baton);
 
37
 
 
38
int set_flag(struct dm_config_tree *cft, struct dm_config_node *parent,
 
39
             const char *field, const char *flag, int want);
 
40
 
 
41
struct dm_config_node *make_config_node(struct dm_config_tree *cft,
 
42
                                        const char *key,
 
43
                                        struct dm_config_node *parent,
 
44
                                        struct dm_config_node *pre_sib);
 
45
 
 
46
struct dm_config_node *make_text_node(struct dm_config_tree *cft,
 
47
                                      const char *key,
 
48
                                      const char *value,
 
49
                                      struct dm_config_node *parent,
 
50
                                      struct dm_config_node *pre_sib);
 
51
 
 
52
struct dm_config_node *make_int_node(struct dm_config_tree *cft,
 
53
                                     const char *key,
 
54
                                     int64_t value,
 
55
                                     struct dm_config_node *parent,
 
56
                                     struct dm_config_node *pre_sib);
 
57
 
 
58
struct dm_config_node *config_make_nodes_v(struct dm_config_tree *cft,
 
59
                                           struct dm_config_node *parent,
 
60
                                           struct dm_config_node *pre_sib,
 
61
                                           va_list ap);
 
62
struct dm_config_node *config_make_nodes(struct dm_config_tree *cft,
 
63
                                         struct dm_config_node *parent,
 
64
                                         struct dm_config_node *pre_sib,
 
65
                                         ...);
 
66
 
 
67
#endif /* _LVM_DAEMON_SHARED_H */