~jamesodhunt/ubuntu/raring/upstart/1.6

« back to all changes in this revision

Viewing changes to nih-dbus-tool/node.h

  • Committer: Scott James Remnant
  • Date: 2010-02-04 23:39:59 UTC
  • mfrom: (1182.1.45 upstart)
  • mto: This revision was merged to the branch mainline in revision 1250.
  • Revision ID: scott@netsplit.com-20100204233959-7kajqjnaoh7208ob
Tags: upstream-0.6.5
Import upstream version 0.6.5

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* nih-dbus-tool
2
 
 *
3
 
 * Copyright © 2009 Scott James Remnant <scott@netsplit.com>.
4
 
 * Copyright © 2009 Canonical Ltd.
5
 
 *
6
 
 * This program is free software; you can redistribute it and/or modify
7
 
 * it under the terms of the GNU General Public License version 2, as
8
 
 * published by the Free Software Foundation.
9
 
 *
10
 
 * This program is distributed in the hope that it will be useful,
11
 
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
 
 * GNU General Public License for more details.
14
 
 *
15
 
 * You should have received a copy of the GNU General Public License along
16
 
 * with this program; if not, write to the Free Software Foundation, Inc.,
17
 
 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18
 
 */
19
 
 
20
 
#ifndef NIH_DBUS_TOOL_NODE_H
21
 
#define NIH_DBUS_TOOL_NODE_H
22
 
 
23
 
#include <expat.h>
24
 
 
25
 
#include <nih/macros.h>
26
 
#include <nih/list.h>
27
 
 
28
 
#include "interface.h"
29
 
 
30
 
 
31
 
/**
32
 
 * Node:
33
 
 * @path: D-Bus path of node,
34
 
 * @interfaces: interfaces the node implements.
35
 
 *
36
 
 * A node is the top-level tag in D-Bus introspection data and represents
37
 
 * a specific D-Bus object with the path given in @path.
38
 
 **/
39
 
typedef struct node {
40
 
        char *  path;
41
 
        NihList interfaces;
42
 
} Node;
43
 
 
44
 
 
45
 
NIH_BEGIN_EXTERN
46
 
 
47
 
int        node_path_valid       (const char *name);
48
 
 
49
 
Node *     node_new              (const void *parent, const char *path)
50
 
        __attribute__ ((warn_unused_result, malloc));
51
 
 
52
 
int        node_start_tag        (XML_Parser xmlp, const char *tag,
53
 
                                  char * const *attr)
54
 
        __attribute__ ((warn_unused_result));
55
 
int        node_end_tag          (XML_Parser xmlp, const char *tag)
56
 
        __attribute__ ((warn_unused_result));
57
 
 
58
 
Interface *node_lookup_interface (Node *node, const char *symbol);
59
 
 
60
 
char *     node_interfaces_array (const void *parent, const char *prefix,
61
 
                                  Node *node, int object, NihList *prototypes)
62
 
        __attribute__ ((warn_unused_result, malloc));
63
 
 
64
 
char *     node_object_functions (const void *parent, const char *prefix,
65
 
                                  Node *node,
66
 
                                  NihList *prototypes, NihList *handlers,
67
 
                                  NihList *structs, NihList *externs)
68
 
        __attribute__ ((warn_unused_result, malloc));
69
 
char *     node_proxy_functions  (const void *parent, const char *prefix,
70
 
                                  Node *node,
71
 
                                  NihList *prototypes, NihList *structs,
72
 
                                  NihList *typedefs, NihList *externs)
73
 
        __attribute__ ((warn_unused_result, malloc));
74
 
 
75
 
NIH_END_EXTERN
76
 
 
77
 
#endif /* NIH_DBUS_TOOL_NODE_H */