|
1 /* -*- mode: C; c-file-style: "gnu" -*- */ |
|
2 /* dbus-gidl.h data structure describing an interface, to be generated from IDL |
|
3 * or something |
|
4 * |
|
5 * Copyright (C) 2003 Red Hat, Inc. |
|
6 * |
|
7 * Licensed under the Academic Free License version 2.1 |
|
8 * |
|
9 * This program is free software; you can redistribute it and/or modify |
|
10 * it under the terms of the GNU General Public License as published by |
|
11 * the Free Software Foundation; either version 2 of the License, or |
|
12 * (at your option) any later version. |
|
13 * |
|
14 * This program is distributed in the hope that it will be useful, |
|
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
17 * GNU General Public License for more details. |
|
18 * |
|
19 * You should have received a copy of the GNU General Public License |
|
20 * along with this program; if not, write to the Free Software |
|
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
22 * |
|
23 */ |
|
24 #ifndef DBUS_GLIB_IDL_H |
|
25 #define DBUS_GLIB_IDL_H |
|
26 |
|
27 #ifndef DOXYGEN_SHOULD_SKIP_THIS |
|
28 |
|
29 #include <dbus/dbus.h> |
|
30 #include <glib-object.h> |
|
31 |
|
32 G_BEGIN_DECLS |
|
33 |
|
34 typedef struct BaseInfo BaseInfo; |
|
35 typedef struct NodeInfo NodeInfo; |
|
36 typedef struct InterfaceInfo InterfaceInfo; |
|
37 typedef struct MethodInfo MethodInfo; |
|
38 typedef struct SignalInfo SignalInfo; |
|
39 typedef struct PropertyInfo PropertyInfo; |
|
40 typedef struct ArgInfo ArgInfo; |
|
41 |
|
42 typedef enum |
|
43 { |
|
44 ARG_INVALID = -1, |
|
45 ARG_IN, |
|
46 ARG_OUT |
|
47 } ArgDirection; |
|
48 |
|
49 typedef enum |
|
50 { |
|
51 PROPERTY_READ = 1 << 0, |
|
52 PROPERTY_WRITE = 1 << 1 |
|
53 } PropertyAccessFlags; |
|
54 |
|
55 typedef enum |
|
56 { |
|
57 INFO_TYPE_NODE, |
|
58 INFO_TYPE_INTERFACE, |
|
59 INFO_TYPE_METHOD, |
|
60 INFO_TYPE_SIGNAL, |
|
61 INFO_TYPE_ARG, |
|
62 INFO_TYPE_PROPERTY |
|
63 |
|
64 } InfoType; |
|
65 |
|
66 BaseInfo* base_info_ref (BaseInfo *info); |
|
67 void base_info_unref (BaseInfo *info); |
|
68 InfoType base_info_get_type (BaseInfo *info); |
|
69 const char* base_info_get_name (BaseInfo *info); |
|
70 void base_info_set_name (BaseInfo *info, |
|
71 const char *name); |
|
72 GType base_info_get_gtype (void); |
|
73 #define BASE_INFO_TYPE (base_info_get_gtype ()) |
|
74 |
|
75 |
|
76 NodeInfo* node_info_new (const char *name); |
|
77 NodeInfo* node_info_ref (NodeInfo *info); |
|
78 void node_info_unref (NodeInfo *info); |
|
79 const char* node_info_get_name (NodeInfo *info); |
|
80 GSList* node_info_get_interfaces (NodeInfo *info); |
|
81 GSList* node_info_get_nodes (NodeInfo *info); |
|
82 void node_info_add_interface (NodeInfo *info, |
|
83 InterfaceInfo *interface); |
|
84 void node_info_add_node (NodeInfo *info, |
|
85 NodeInfo *child); |
|
86 void node_info_replace_node (NodeInfo *info, |
|
87 NodeInfo *old_child, |
|
88 NodeInfo *new_child); |
|
89 InterfaceInfo* interface_info_new (const char *name); |
|
90 InterfaceInfo* interface_info_ref (InterfaceInfo *info); |
|
91 void interface_info_unref (InterfaceInfo *info); |
|
92 const char* interface_info_get_name (InterfaceInfo *info); |
|
93 GSList* interface_info_get_annotations(InterfaceInfo *info); |
|
94 const char* interface_info_get_annotation (InterfaceInfo*info, |
|
95 const char *annotation); |
|
96 GSList* interface_info_get_methods (InterfaceInfo *info); |
|
97 GSList* interface_info_get_signals (InterfaceInfo *info); |
|
98 GSList* interface_info_get_properties (InterfaceInfo *info); |
|
99 void interface_info_add_annotation (InterfaceInfo *info, |
|
100 const char *name, |
|
101 const char *value); |
|
102 void interface_info_add_method (InterfaceInfo *info, |
|
103 MethodInfo *method); |
|
104 void interface_info_add_signal (InterfaceInfo *info, |
|
105 SignalInfo *signal); |
|
106 void interface_info_add_property (InterfaceInfo *info, |
|
107 PropertyInfo *property); |
|
108 MethodInfo* method_info_new (const char *name); |
|
109 MethodInfo* method_info_ref (MethodInfo *info); |
|
110 void method_info_unref (MethodInfo *info); |
|
111 const char* method_info_get_name (MethodInfo *info); |
|
112 GSList* method_info_get_annotations (MethodInfo *info); |
|
113 const char* method_info_get_annotation (MethodInfo *info, |
|
114 const char *annotation); |
|
115 void method_info_add_annotation (MethodInfo *info, |
|
116 const char *name, |
|
117 const char *value); |
|
118 GSList* method_info_get_args (MethodInfo *info); |
|
119 void method_info_add_arg (MethodInfo *info, |
|
120 ArgInfo *arg); |
|
121 int method_info_get_n_args (MethodInfo *info); |
|
122 SignalInfo* signal_info_new (const char *name); |
|
123 SignalInfo* signal_info_ref (SignalInfo *info); |
|
124 void signal_info_unref (SignalInfo *info); |
|
125 const char* signal_info_get_name (SignalInfo *info); |
|
126 GSList* signal_info_get_args (SignalInfo *info); |
|
127 void signal_info_add_arg (SignalInfo *info, |
|
128 ArgInfo *arg); |
|
129 int signal_info_get_n_args (SignalInfo *info); |
|
130 PropertyInfo* property_info_new (const char *name, |
|
131 const char *type, |
|
132 PropertyAccessFlags access); |
|
133 PropertyInfo* property_info_ref (PropertyInfo *info); |
|
134 void property_info_unref (PropertyInfo *info); |
|
135 const char* property_info_get_name (PropertyInfo *info); |
|
136 const char* property_info_get_type (PropertyInfo *info); |
|
137 PropertyAccessFlags property_info_get_access (PropertyInfo *info); |
|
138 ArgInfo* arg_info_new (const char *name, |
|
139 ArgDirection direction, |
|
140 const char *type); |
|
141 ArgInfo* arg_info_ref (ArgInfo *info); |
|
142 void arg_info_unref (ArgInfo *info); |
|
143 const char* arg_info_get_name (ArgInfo *info); |
|
144 const char* arg_info_get_type (ArgInfo *info); |
|
145 ArgDirection arg_info_get_direction (ArgInfo *info); |
|
146 GSList* arg_info_get_annotations (ArgInfo *info); |
|
147 const char* arg_info_get_annotation (ArgInfo *info, |
|
148 const char *annotation); |
|
149 void arg_info_add_annotation (ArgInfo *info, |
|
150 const char *name, |
|
151 const char *value); |
|
152 |
|
153 |
|
154 G_END_DECLS |
|
155 |
|
156 #endif /* DBUS_GLIB_IDL_H */ |
|
157 |
|
158 #endif /* DOXYGEN_SHOULD_SKIP_THIS */ |