summaryrefslogtreecommitdiffstats
path: root/glib/dbus-gidl.h
blob: 47b4f093dde4c4425e614f076f4e89029d69b34d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
/* -*- mode: C; c-file-style: "gnu" -*- */
/* dbus-gidl.h data structure describing an interface, to be generated from IDL
 *             or something
 *
 * Copyright (C) 2003  Red Hat, Inc.
 *
 * Licensed under the Academic Free License version 2.1
 * 
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 *
 */
#ifndef DBUS_GLIB_IDL_H
#define DBUS_GLIB_IDL_H

#ifndef DOXYGEN_SHOULD_SKIP_THIS

#include <dbus/dbus.h>
#include <glib-object.h>

G_BEGIN_DECLS

typedef struct BaseInfo      BaseInfo;
typedef struct NodeInfo      NodeInfo;
typedef struct InterfaceInfo InterfaceInfo;
typedef struct MethodInfo    MethodInfo;
typedef struct SignalInfo    SignalInfo;
typedef struct ArgInfo       ArgInfo;

typedef enum
{
  ARG_IN,
  ARG_OUT
} ArgDirection;

typedef enum
{
  INFO_TYPE_NODE,
  INFO_TYPE_INTERFACE,
  INFO_TYPE_METHOD,
  INFO_TYPE_SIGNAL,
  INFO_TYPE_ARG

} InfoType;

BaseInfo*      base_info_ref              (BaseInfo      *info);
void           base_info_unref            (BaseInfo      *info);
InfoType       base_info_get_type         (BaseInfo      *info);
const char*    base_info_get_name         (BaseInfo      *info);
void           base_info_set_name         (BaseInfo      *info,
                                           const char    *name);
GType          base_info_get_gtype        (void);
#define        BASE_INFO_TYPE             (base_info_get_gtype ())


NodeInfo*      node_info_new              (const char    *name);
NodeInfo*      node_info_ref              (NodeInfo      *info);
void           node_info_unref            (NodeInfo      *info);
const char*    node_info_get_name         (NodeInfo      *info);
GSList*        node_info_get_interfaces   (NodeInfo      *info);
GSList*        node_info_get_nodes        (NodeInfo      *info);
void           node_info_add_interface    (NodeInfo      *info,
                                           InterfaceInfo *interface);
void           node_info_add_node         (NodeInfo      *info,
                                           NodeInfo      *child);

InterfaceInfo* interface_info_new         (const char    *name);
InterfaceInfo* interface_info_ref         (InterfaceInfo *info);
void           interface_info_unref       (InterfaceInfo *info);
const char*    interface_info_get_name    (InterfaceInfo *info);
GSList*        interface_info_get_methods (InterfaceInfo *info);
GSList*        interface_info_get_signals (InterfaceInfo *info);
void           interface_info_add_method  (InterfaceInfo *info,
                                           MethodInfo    *method);
void           interface_info_add_signal  (InterfaceInfo *info,
                                           SignalInfo    *signal);

MethodInfo*    method_info_new            (const char    *name);
MethodInfo*    method_info_ref            (MethodInfo    *info);
void           method_info_unref          (MethodInfo    *info);

const char*    method_info_get_name       (MethodInfo    *info);
GSList*        method_info_get_args       (MethodInfo    *info);
void           method_info_add_arg        (MethodInfo    *info,
                                           ArgInfo       *arg);

SignalInfo*    signal_info_new            (const char    *name);
SignalInfo*    signal_info_ref            (SignalInfo    *info);
void           signal_info_unref          (SignalInfo    *info);

const char*    signal_info_get_name       (SignalInfo    *info);
GSList*        signal_info_get_args       (SignalInfo    *info);
void           signal_info_add_arg        (SignalInfo    *info,
                                           ArgInfo       *arg);

ArgInfo*       arg_info_new               (const char    *name,
                                           ArgDirection   direction,
                                           int            type);
ArgInfo*       arg_info_ref               (ArgInfo       *info);
void           arg_info_unref             (ArgInfo       *info);
const char*    arg_info_get_name          (ArgInfo       *info);
int            arg_info_get_type          (ArgInfo       *info);
ArgDirection   arg_info_get_direction     (ArgInfo       *info);

G_END_DECLS

#endif /* DBUS_GLIB_IDL_H */

#endif /* DOXYGEN_SHOULD_SKIP_THIS */