dbus-gidl.h

00001 /* -*- mode: C; c-file-style: "gnu" -*- */
00002 /* dbus-gidl.h data structure describing an interface, to be generated from IDL
00003  *             or something
00004  *
00005  * Copyright (C) 2003  Red Hat, Inc.
00006  *
00007  * Licensed under the Academic Free License version 2.1
00008  * 
00009  * This program is free software; you can redistribute it and/or modify
00010  * it under the terms of the GNU General Public License as published by
00011  * the Free Software Foundation; either version 2 of the License, or
00012  * (at your option) any later version.
00013  *
00014  * This program is distributed in the hope that it will be useful,
00015  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00016  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00017  * GNU General Public License for more details.
00018  * 
00019  * You should have received a copy of the GNU General Public License
00020  * along with this program; if not, write to the Free Software
00021  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00022  *
00023  */
00024 #ifndef DBUS_GLIB_IDL_H
00025 #define DBUS_GLIB_IDL_H
00026 
00027 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00028 
00029 #include <dbus/dbus.h>
00030 #include <glib-object.h>
00031 
00032 G_BEGIN_DECLS
00033 
00034 typedef struct BaseInfo      BaseInfo;
00035 typedef struct NodeInfo      NodeInfo;
00036 typedef struct InterfaceInfo InterfaceInfo;
00037 typedef struct MethodInfo    MethodInfo;
00038 typedef struct SignalInfo    SignalInfo;
00039 typedef struct PropertyInfo  PropertyInfo;
00040 typedef struct ArgInfo       ArgInfo;
00041 
00042 typedef enum
00043 {
00044   ARG_INVALID = -1,
00045   ARG_IN,
00046   ARG_OUT
00047 } ArgDirection;
00048 
00049 typedef enum
00050 {
00051   PROPERTY_READ  = 1 << 0,
00052   PROPERTY_WRITE = 1 << 1
00053 } PropertyAccessFlags;
00054 
00055 typedef enum
00056 {
00057   INFO_TYPE_NODE,
00058   INFO_TYPE_INTERFACE,
00059   INFO_TYPE_METHOD,
00060   INFO_TYPE_SIGNAL,
00061   INFO_TYPE_ARG,
00062   INFO_TYPE_PROPERTY
00063 
00064 } InfoType;
00065 
00066 BaseInfo*      base_info_ref              (BaseInfo      *info);
00067 void           base_info_unref            (BaseInfo      *info);
00068 InfoType       base_info_get_type         (BaseInfo      *info);
00069 const char*    base_info_get_name         (BaseInfo      *info);
00070 void           base_info_set_name         (BaseInfo      *info,
00071                                            const char    *name);
00072 GType          base_info_get_gtype        (void);
00073 #define        BASE_INFO_TYPE             (base_info_get_gtype ())
00074 
00075 
00076 NodeInfo*           node_info_new                 (const char          *name);
00077 NodeInfo*           node_info_ref                 (NodeInfo            *info);
00078 void                node_info_unref               (NodeInfo            *info);
00079 const char*         node_info_get_name            (NodeInfo            *info);
00080 GSList*             node_info_get_interfaces      (NodeInfo            *info);
00081 GSList*             node_info_get_nodes           (NodeInfo            *info);
00082 void                node_info_add_interface       (NodeInfo            *info,
00083                                                    InterfaceInfo       *interface);
00084 void                node_info_add_node            (NodeInfo            *info,
00085                                                    NodeInfo            *child);
00086 void                node_info_replace_node        (NodeInfo            *info,
00087                                                    NodeInfo            *old_child,
00088                                                    NodeInfo            *new_child);
00089 InterfaceInfo*      interface_info_new            (const char          *name);
00090 InterfaceInfo*      interface_info_ref            (InterfaceInfo       *info);
00091 void                interface_info_unref          (InterfaceInfo       *info);
00092 const char*         interface_info_get_name       (InterfaceInfo       *info);
00093 GSList*             interface_info_get_annotations(InterfaceInfo       *info);
00094 const char*         interface_info_get_annotation (InterfaceInfo*info,
00095                                                    const char         *annotation);
00096 GSList*             interface_info_get_methods    (InterfaceInfo       *info);
00097 GSList*             interface_info_get_signals    (InterfaceInfo       *info);
00098 GSList*             interface_info_get_properties (InterfaceInfo       *info);
00099 void                interface_info_add_annotation (InterfaceInfo      *info,
00100                                                    const char         *name,
00101                                                    const char         *value);
00102 void                interface_info_add_method     (InterfaceInfo       *info,
00103                                                    MethodInfo          *method);
00104 void                interface_info_add_signal     (InterfaceInfo       *info,
00105                                                    SignalInfo          *signal);
00106 void                interface_info_add_property   (InterfaceInfo       *info,
00107                                                    PropertyInfo        *property);
00108 MethodInfo*         method_info_new               (const char          *name); 
00109 MethodInfo*         method_info_ref               (MethodInfo          *info);
00110 void                method_info_unref             (MethodInfo          *info);
00111 const char*         method_info_get_name          (MethodInfo          *info);
00112 GSList*             method_info_get_annotations   (MethodInfo          *info);
00113 const char*         method_info_get_annotation    (MethodInfo          *info,
00114                                                    const char          *annotation);
00115 void                method_info_add_annotation    (MethodInfo          *info,
00116                                                    const char          *name,
00117                                                    const char          *value);
00118 GSList*             method_info_get_args          (MethodInfo          *info);
00119 void                method_info_add_arg           (MethodInfo          *info,
00120                                                    ArgInfo             *arg);
00121 int                 method_info_get_n_args        (MethodInfo          *info);
00122 SignalInfo*         signal_info_new               (const char          *name);
00123 SignalInfo*         signal_info_ref               (SignalInfo          *info);
00124 void                signal_info_unref             (SignalInfo          *info);
00125 const char*         signal_info_get_name          (SignalInfo          *info);
00126 GSList*             signal_info_get_args          (SignalInfo          *info);
00127 void                signal_info_add_arg           (SignalInfo          *info,
00128                                                    ArgInfo             *arg);
00129 int                 signal_info_get_n_args        (SignalInfo          *info);
00130 PropertyInfo*       property_info_new             (const char          *name,
00131                                                    const char          *type,
00132                                                    PropertyAccessFlags  access);
00133 PropertyInfo*       property_info_ref             (PropertyInfo        *info);
00134 void                property_info_unref           (PropertyInfo        *info);
00135 const char*         property_info_get_name        (PropertyInfo        *info);
00136 const char*         property_info_get_type        (PropertyInfo        *info);
00137 PropertyAccessFlags property_info_get_access      (PropertyInfo        *info);
00138 ArgInfo*            arg_info_new                  (const char          *name,
00139                                                    ArgDirection         direction,
00140                                                    const char          *type);
00141 ArgInfo*            arg_info_ref                  (ArgInfo             *info);
00142 void                arg_info_unref                (ArgInfo             *info);
00143 const char*         arg_info_get_name             (ArgInfo             *info);
00144 const char*         arg_info_get_type             (ArgInfo             *info);
00145 ArgDirection        arg_info_get_direction        (ArgInfo             *info);
00146 GSList*             arg_info_get_annotations      (ArgInfo             *info);
00147 const char*         arg_info_get_annotation       (ArgInfo             *info,
00148                                                    const char          *annotation);
00149 void                arg_info_add_annotation       (ArgInfo             *info,
00150                                                    const char          *name,
00151                                                    const char          *value);
00152 
00153 
00154 G_END_DECLS
00155 
00156 #endif /* DBUS_GLIB_IDL_H */
00157 
00158 #endif /* DOXYGEN_SHOULD_SKIP_THIS */

Generated on Wed Oct 3 10:04:23 2007 for D-BUSGLibBindings by  doxygen 1.5.1