introspect_internal.h

Go to the documentation of this file.
00001 /*
00002  EasyDbus Library: DBUS Binding Library
00003  Copyright (C) 2007  Daniele Rondina aka Ge@@ru, geaaru@gmail.com 
00004 
00005  This program is free software; you can redistribute it and/or
00006  modify it under the terms of the GNU General Public License
00007  as published by the Free Software Foundation; either version 2
00008  of the License, or (at your option) any later version.
00009 
00010  This program is distributed in the hope that it will be useful,
00011  but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013  GNU General Public License for more details.
00014 
00015  You should have received a copy of the GNU General Public License
00016  along with this program; if not, write to the Free Software
00017  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
00018 
00019  Filename:  introspect_internal.h
00020  
00021  Description:  
00022  
00023  Version:  1.0
00024  Created:  09/12/07 12:50:10 CEST
00025  Revision:  
00026         0 - created
00027  
00028  Author:   Daniele Rondina aka ge@@ru (geaaru@gmail.com) 
00029  License:  GPL 2.0
00030 */
00031 
00032 #ifndef         EASYDBUS_INTROSPECT_INTERNAL_H
00033 #define EASYDBUS_INTROSPECT_INTERNAL_H
00034 
00035 #include <easydbus/introspect.h>
00036 
00038 #define EASYDBUS_INTROSPECT_MSG DBUS_INTROSPECT_1_0_XML_DOCTYPE_DECL_NODE
00040 #define EASYDBUS_INTROSPECT_MSG_COMMENT         "<!-- Created with EasyDbus Library by Ge@@ru -->\n"
00041 #define EASYDBUS_INTROSPECT_INTERFACE "org.freedesktop.DBus.Introspectable"
00043 #define EASYDBUS_INTROSPECT_METHOD      "Introspect"
00045 #define EASYDBUS_INTROSPECT_XML_INTERFACE_DATA \
00046         "  <interface name=\"org.freedesktop.DBus.Introspectable\">\n" \
00047         "   <method name=\"Introspect\">\n" \
00048    "     <arg name=\"data\" type=\"s\" direction=\"out\" />\n" \
00049         "   </method>\n" \
00050         "  </interface>\n"
00051 
00053 #define  EASYDBUS_INTROSPECT_NODE_TAG_O      "<node>\n"
00055 #define  EASYDBUS_INTROSPECT_NODE_TAG_O_L    7
00057 #define  EASYDBUS_INTROSPECT_NODE_TAG_C      "</node>\n"
00059 #define  EASYDBUS_INTROSPECT_NODE_TAG_C_L    8
00061 #define  EASYDBUS_INTROSPECT_NODE_TAG_INIT   " <node name=\""
00063 #define  EASYDBUS_INTROSPECT_NODE_TAG_INIT_L 13
00065 #define  EASYDBUS_INTROSPECT_NODE_TAG_INIT2  "<node name=\""
00067 #define  EASYDBUS_INTROSPECT_NODE_TAG_INIT2_L 12
00069 #define  EASYDBUS_INTROSPECT_NODE_TAG_INIT_C "\">\n"
00071 #define  EASYDBUS_INTROSPECT_NODE_TAG_INIT_C_L 3
00073 #define  EASYDBUS_INTROSPECT_TAG_END         "\"/>\n"
00075 #define  EASYDBUS_INTROSPECT_TAG_END_L       4
00077 #define  EASYDBUS_INTROSPECT_INTERFACE_TAG_O          "  <interface name=\""
00079 #define  EASYDBUS_INTROSPECT_INTERFACE_TAG_O_L        19
00081 #define  EASYDBUS_INTROSPECT_INTERFACE_TAG_C          "  </interface>\n"
00083 #define  EASYDBUS_INTROSPECT_INTERFACE_TAG_C_L        15 
00085 #define  EASYDBUS_INTROSPECT_METHOD_TAG_O             "   <method name=\""
00087 #define  EASYDBUS_INTROSPECT_METHOD_TAG_O_L           17
00089 #define  EASYDBUS_INTROSPECT_METHOD_TAG_C             "   </method>\n"
00091 #define  EASYDBUS_INTROSPECT_METHOD_TAG_C_L           13
00093 #define  EASYDBUS_INTROSPECT_SIGNAL_TAG_O             "   <signal name=\""
00095 #define  EASYDBUS_INTROSPECT_SIGNAL_TAG_O_L           17
00097 #define  EASYDBUS_INTROSPECT_SIGNAL_TAG_C             "   </signal>\n"
00099 #define  EASYDBUS_INTROSPECT_SIGNAL_TAG_C_L           13
00101 #define  EASYDBUS_INTROSPECT_ARG_SPACE                "\" "
00103 #define  EASYDBUS_INTROSPECT_ARG_SPACE_L              2
00105 #define  EASYDBUS_INTROSPECT_ARG_NAME_TAG_O           "    <arg name=\""
00107 #define  EASYDBUS_INTROSPECT_ARG_NAME_TAG_O_L         15
00109 #define  EASYDBUS_INTROSPECT_ARG_TYPE_TAG_O           "type=\""
00111 #define  EASYDBUS_INTROSPECT_ARG_TYPE_TAG_O_L         6
00113 #define  EASYDBUS_INTROSPECT_ARG_DIRECTION_O          "direction=\""
00115 #define  EASYDBUS_INTROSPECT_ARG_DIRECTION_O_L        11
00117 #define  EASYDBUS_INTROSPECT_DIRECTION_IN             "in"
00119 #define  EASYDBUS_INTROSPECT_DIRECTION_IN_L           2
00121 #define  EASYDBUS_INTROSPECT_DIRECTION_OUT            "out"
00123 #define  EASYDBUS_INTROSPECT_DIRECTION_OUT_L          3
00124 
00129 #define  EASYDBUS_INTROSPECT_MEMCOPY(buf, offset, s, s_l) \
00130 { \
00131    memcpy (&buf[offset], s, s_l); \
00132    offset += s_l; \
00133 }
00134 
00137 typedef struct introspect_objs_tree introspect_objs_tree;
00138 
00144 struct introspect_objs_tree {
00146    char *leaf_name;
00148    struct EasyDbus_object_box *obj;
00150    unsigned int n_leafs;
00152    introspect_objs_tree **leafs;
00153 };
00154 
00155 int 
00156 easydbus_add_new_field_to_list
00157    (struct easydbus_introspect_arg_info *,
00158     struct easydbus_introspect_arg_info **) 
00159     EASYDBUS_INTERNAL_F_ATTR;
00160 
00161 introspect_objs_tree *
00162 easydbus_introspect_obj_tree_create (char *, 
00163                                      struct EasyDbus_object_box *)
00164                                      EASYDBUS_INTERNAL_F_ATTR;
00165 
00166 int
00167 easydbus_introspect_set_interface_buffer (EasyDbus_obj_interface *,
00168                                           char *, int *)
00169                                           EASYDBUS_INTERNAL_F_ATTR;
00170 
00171 int
00172 easydbus_introspect_set_object_buffer (struct EasyDbus_object_box *,
00173                                        char *, int *)
00174                                        EASYDBUS_INTERNAL_F_ATTR;
00175 
00176 void 
00177 easydbus_introspect_obj_tree_free (introspect_objs_tree *)
00178                                    EASYDBUS_INTERNAL_F_ATTR;
00179 
00180 
00181 introspect_objs_tree *
00182 easydbus_introspect_objs_tree_build (struct EasyDbus_object_box *)
00183                                      EASYDBUS_INTERNAL_F_ATTR;
00184 
00185 int
00186 easydbus_introspect_objs_tree_add_leafs (introspect_objs_tree **,
00187                                          char **, unsigned int,
00188                                          struct EasyDbus_object_box *)
00189                                          EASYDBUS_INTERNAL_F_ATTR;
00190 
00191 int 
00192 easydbus_introspect_objs_tree_destroy (introspect_objs_tree *) 
00193                                        EASYDBUS_INTERNAL_F_ATTR;
00194 
00195 inline int
00196 easydbus_introspect_get_ntoken (char *, int)
00197                                 EASYDBUS_INTERNAL_F_ATTR;
00198 
00199 
00200 inline introspect_objs_tree *         
00201 easydbus_introspect_obj_tree_hastoken (introspect_objs_tree *,
00202                                        char *)
00203                                        EASYDBUS_INTERNAL_F_ATTR;
00204 
00205 char *
00206 easydbus_introspect_create_reply_string (char *,
00207                                          introspect_objs_tree *,
00208                                          struct EasyDbus_object_box *)
00209                                          EASYDBUS_INTERNAL_F_ATTR;
00210 
00211 int 
00212 easydbus_introspect_set_reply_buffer (char *, char *,
00213                                       introspect_objs_tree *,
00214                                       struct EasyDbus_object_box *,
00215                                       unsigned int)
00216                                       EASYDBUS_INTERNAL_F_ATTR;
00217 
00218 int
00219 easydbus_introspect_get_obj_string_length (struct EasyDbus_object_box *) 
00220                                            EASYDBUS_INTERNAL_F_ATTR;
00221 
00222 int 
00223 easydbus_introspect_get_interface_string_length (EasyDbus_obj_interface *);
00224                                                  EASYDBUS_INTERNAL_F_ATTR;
00225 
00226 int
00227 easydbus_introspect_get_reply_length (char *,
00228                                       introspect_objs_tree *,
00229                                       struct EasyDbus_object_box *,
00230                                       unsigned int *)
00231                                       EASYDBUS_INTERNAL_F_ATTR;
00232 
00233 char *
00234 easydbus_create_arg_signature (struct easydbus_signature_elem_stack *)
00235                                EASYDBUS_INTERNAL_F_ATTR;
00236 
00237 inline char *
00238 easydbus_create_arg_signature (struct easydbus_signature_elem_stack *)
00239                                EASYDBUS_INTERNAL_F_ATTR;
00240 
00241 inline void 
00242 easydbus_free_introspect_info_arg (struct easydbus_introspect_arg_info *)
00243                                    EASYDBUS_INTERNAL_F_ATTR;
00244 
00245 DBusHandlerResult 
00246 easydbus_introspect_filter_func (DBusConnection *,
00247                                  DBusMessage *,
00248                                  void *)
00249                                  EASYDBUS_INTERNAL_F_ATTR;
00250 
00251 #endif
00252 // vim: ts=3 shiftwidth=3 expandtab

Generated on Thu Apr 10 10:00:18 2008 for EasyDbus-0.2 by  doxygen 1.5.4