diff --git a/include/dbus-c++/interface.h b/include/dbus-c++/interface.h index 7a5297b..0c5c2ac 100644 --- a/include/dbus-c++/interface.h +++ b/include/dbus-c++/interface.h @@ -166,8 +166,8 @@ public: InterfaceProxy(const std::string &name); Message invoke_method(const CallMessage &); - - bool invoke_method_noreply(const CallMessage &call); + + bool invoke_method_noreply(const CallMessage &call); bool dispatch_signal(const SignalMessage &); diff --git a/tools/xml2cpp.cpp b/tools/xml2cpp.cpp index 69f4efa..dcde076 100644 --- a/tools/xml2cpp.cpp +++ b/tools/xml2cpp.cpp @@ -49,6 +49,7 @@ static const char *header = "\n\ static const char *dbus_includes = "\n\ #include \n\ +#include \n\n\ \n\ "; @@ -538,18 +539,17 @@ void generate_proxy(Xml::Document &doc, const char *filename) cerr << "Function: " << method.get("name") << ":" << endl; cerr << "Option 'org.freedesktop.DBus.Method.NoReply' not allowed for methods with 'out' variables!" << endl << "-> Option ignored!" << endl; - body << tab << tab << "::DBus::Message ret = invoke_method"; + body << tab << tab << "::DBus::Message ret = invoke_method (call);" << endl; } else { - body << tab << tab << "::DBus::Message ret = invoke_method_noreply"; + body << tab << tab << "assert (invoke_method_noreply (call));" << endl; // will only assert in case of no memory } } else { - body << tab << tab << "::DBus::Message ret = invoke_method"; + body << tab << tab << "::DBus::Message ret = invoke_method (call);" << endl; } - body << "(call);" << endl; if (args_out.size() > 0) {