Go to the documentation of this file.
32 #include <dbus/dbus.h>
48 debug_log(
"requested introspection data");
50 std::ostringstream xml;
52 xml << DBUS_INTROSPECT_1_0_XML_DOCTYPE_DECL_NODE;
56 xml <<
"<node name=\"" << path <<
"\">";
58 InterfaceAdaptorTable::const_iterator iti;
62 debug_log(
"introspecting interface %s", iti->first.c_str());
67 xml <<
"\n\t<interface name=\"" << intro->
name <<
"\">";
73 if (p->read) access +=
"read";
74 if (p->write) access +=
"write";
76 xml <<
"\n\t\t<property name=\"" << p->name <<
"\""
77 <<
" type=\"" << p->type <<
"\""
78 <<
" access=\"" << access <<
"\"/>";
83 xml <<
"\n\t\t<method name=\"" << m->name <<
"\">";
87 xml <<
"\n\t\t\t<arg direction=\"" << (a->in ?
"in" :
"out") <<
"\""
88 <<
" type=\"" << a->type <<
"\"";
90 if (a->name) xml <<
" name=\"" << a->name <<
"\"";
95 xml <<
"\n\t\t</method>";
100 xml <<
"\n\t\t<signal name=\"" << m->name <<
"\">";
104 xml <<
"<arg type=\"" << a->type <<
"\"";
106 if (a->name) xml <<
" name=\"" << a->name <<
"\"";
110 xml <<
"\n\t\t</signal>";
113 xml <<
"\n\t</interface>";
118 ObjectPathList::const_iterator oni;
120 for (oni = nodes.begin(); oni != nodes.end(); ++oni)
122 xml <<
"\n\t<node name=\"" << (*oni) <<
"\"/>";
151 {
"data",
"s",
false },
156 {
"Introspect", Introspect_args },
170 Introspectable_methods,
171 Introspectable_signals,
172 Introspectable_properties
174 return &Introspectable_interface;
185 call.
member(
"Introspect");
const char * get_string()
IntrospectedInterface * introspect() const
bool append_string(const char *chars)
const IntrospectedArgument * args
const IntrospectedProperty * properties
const IntrospectedMethod * signals
virtual const ObjectAdaptor * object() const =0
static const char * introspectable_name
static ObjectPathList child_nodes_from_prefix(const std::string &prefix)
Message invoke_method(const CallMessage &)
const IntrospectedMethod * methods
MessageIter reader() const
const char * member() const
Message Introspect(const CallMessage &)
DXXAPI LogFunction debug_log
#define register_method(interface, method, callback)
InterfaceAdaptorTable _interfaces
std::list< std::string > ObjectPathList
const DBus::Path & path() const