From 7cabddaa4237b7e0ce1c6b9781d115b9831e77f2 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Sat, 29 Apr 2006 12:44:31 +0000 Subject: * qt/qdbusinterface.h: Rename QDBusRef to QDBusInterfacePtr and disable the copy operators. (r533772, r534746) * qt/qdbuserror.h: Remove the automatic cast to bool. (r533929) * qt/qdbusabstractinterface.cpp: * qt/qdbusabstractinterface.h: Change the default call mode to not use the event loop. Add convenience call() methods that take a CallMode parameter. (r534042) * qt/qdbusconnection.h: Change the default call mode to not use the event loop. (r534042) * qt/qdbusinterface.cpp: * qt/qdbusinterface.h: Add a method to tell us if the interface is valid (since we don't return a null pointer anymore) (r534099) * qt/qdbusinterface_p.h: Don't crash if metaObject is 0 (r534101) * qt/qdbusinternalfilters.cpp: Decouple the introspection function in two so taht we get the chance to introspect without having a QDBusMessage (r534102) * qt/qdbusbus.h: * qt/qdbusconnection.cpp: * qt/qdbusconnection_p.h: * qt/qdbusintegrator.cpp: Keep a list of our own names to avoid a round-trip to the server when attempting to introspect one of our own objects. Also make sure the filter functions match the empty interface as well. (r534108) Don't keep the connection names. Instead, trust the unique connection name (r534111) Remove event loop usage (r534112) --- qt/qdbusabstractinterface.h | 84 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 84 insertions(+) (limited to 'qt/qdbusabstractinterface.h') diff --git a/qt/qdbusabstractinterface.h b/qt/qdbusabstractinterface.h index ae80b0a3..23f928a2 100644 --- a/qt/qdbusabstractinterface.h +++ b/qt/qdbusabstractinterface.h @@ -69,6 +69,11 @@ public: { return callWithArgs(m); } + + inline QDBusMessage call(CallMode mode, const QString &m) + { + return callWithArgs(m, QList(), mode); + } #ifndef Q_QDOC private: @@ -152,6 +157,85 @@ public: << qvfv(t7) << qvfv(t8); return callWithArgs(m, args); } + + template + inline QDBusMessage call(CallMode mode, const QString &m, const T1 &t1) + { + QList args; + args << qvfv(t1); + return callWithArgs(m, args, mode); + } + + template + inline QDBusMessage call(CallMode mode, const QString &m, const T1 &t1, const T2 &t2) + { + QList args; + args << qvfv(t1) << qvfv(t2); + return callWithArgs(m, args, mode); + } + + template + inline QDBusMessage call(CallMode mode, const QString &m, const T1 &t1, const T2 &t2, + const T3 &t3) + { + QList args; + args << qvfv(t1) << qvfv(t2) << qvfv(t3); + return callWithArgs(m, args, mode); + } + + template + inline QDBusMessage call(CallMode mode, const QString &m, const T1 &t1, const T2 &t2, + const T3 &t3, const T4 &t4) + { + QList args; + args << qvfv(t1) << qvfv(t2) << qvfv(t3) + << qvfv(t4); + return callWithArgs(m, args, mode); + } + + template + inline QDBusMessage call(CallMode mode, const QString &m, const T1 &t1, const T2 &t2, + const T3 &t3, const T4 &t4, const T5 &t5) + { + QList args; + args << qvfv(t1) << qvfv(t2) << qvfv(t3) + << qvfv(t4) << qvfv(t5); + return callWithArgs(m, args, mode); + } + + template + inline QDBusMessage call(CallMode mode, const QString &m, const T1 &t1, const T2 &t2, + const T3 &t3, const T4 &t4, const T5 &t5, const T6 &t6) + { + QList args; + args << qvfv(t1) << qvfv(t2) << qvfv(t3) + << qvfv(t4) << qvfv(t5) << qvfv(t6); + return callWithArgs(m, args, mode); + } + + template + inline QDBusMessage call(CallMode mode, const QString &m, const T1 &t1, const T2 &t2, + const T3 &t3, const T4 &t4, const T5 &t5, const T6 &t6, const T7 &t7) + { + QList args; + args << qvfv(t1) << qvfv(t2) << qvfv(t3) + << qvfv(t4) << qvfv(t5) << qvfv(t6) + << qvfv(t7); + return callWithArgs(m, args, mode); + } + + template + inline QDBusMessage call(CallMode mode, const QString &m, const T1 &t1, const T2 &t2, + const T3 &t3, const T4 &t4, const T5 &t5, const T6 &t6, const T7 &t7, + const T8 &t8) + { + QList args; + args << qvfv(t1) << qvfv(t2) << qvfv(t3) + << qvfv(t4) << qvfv(t5) << qvfv(t6) + << qvfv(t7) << qvfv(t8); + return callWithArgs(m, args, mode); + } #endif protected: -- cgit