2003-09-01 Havoc Pennington <hp@pobox.com>
[platform/upstream/dbus.git] / glib / dbus-gidl.h
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 1.2
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 #include <dbus/dbus.h>
28 #include <glib.h>
29
30 G_BEGIN_DECLS
31
32 typedef struct InterfaceInfo InterfaceInfo;
33 typedef struct MethodInfo    MethodInfo;
34 typedef struct SignalInfo    SignalInfo;
35 typedef struct ArgInfo       ArgInfo;
36
37 typedef enum
38 {
39   ARG_IN,
40   ARG_OUT
41 } ArgDirection;
42
43 InterfaceInfo* interface_info_new         (const char    *name);
44 void           interface_info_ref         (InterfaceInfo *info);
45 void           interface_info_unref       (InterfaceInfo *info);
46 GSList*        interface_info_get_methods (InterfaceInfo *info);
47 GSList*        interface_info_get_signals (InterfaceInfo *info);
48 void           interface_info_add_method  (InterfaceInfo *info,
49                                            MethodInfo    *method);
50 void           interface_info_add_signal  (InterfaceInfo *info,
51                                            SignalInfo    *signal);
52
53 MethodInfo*    method_info_new            (const char    *name);
54 void           method_info_ref            (MethodInfo    *info);
55 void           method_info_unref          (MethodInfo    *info);
56
57 const char*    method_info_get_name       (MethodInfo    *info);
58 GSList*        method_info_get_args       (MethodInfo    *info);
59 void           method_info_add_arg        (MethodInfo    *info,
60                                            ArgInfo       *arg);
61
62 SignalInfo*    signal_info_new            (const char    *name);
63 void           signal_info_ref            (SignalInfo    *info);
64 void           signal_info_unref          (SignalInfo    *info);
65
66 const char*    signal_info_get_name       (SignalInfo    *info);
67 GSList*        signal_info_get_args       (SignalInfo    *info);
68 void           signal_info_add_arg        (SignalInfo    *info,
69                                            ArgInfo       *arg);
70
71 ArgInfo*       arg_info_new               (const char    *name,
72                                            ArgDirection   direction,
73                                            int            type);
74 void           arg_info_ref               (ArgInfo       *info);
75 void           arg_info_unref             (ArgInfo       *info);
76 const char*    arg_info_get_name          (ArgInfo       *info);
77 int            arg_info_get_type          (ArgInfo       *info);
78 ArgDirection   arg_info_get_direction     (ArgInfo       *info);
79
80 G_END_DECLS
81
82 #endif /* DBUS_GLIB_IDL_H */