diff options
author | Jürgen Gehring <juergen.gehring@bmw.de> | 2015-07-29 00:04:02 -0700 |
---|---|---|
committer | Jürgen Gehring <juergen.gehring@bmw.de> | 2015-07-29 00:04:02 -0700 |
commit | db96446ece67ba1f495811e29838e8c7bc7984ff (patch) | |
tree | ad49d3368287caf7d201057989db4bd19e37fd0c /include/CommonAPI/DBus/DBusConnection.hpp | |
parent | 49d0b428ca19852d49965f35328a314f22d88807 (diff) | |
download | genivi-common-api-dbus-runtime-db96446ece67ba1f495811e29838e8c7bc7984ff.tar.gz |
CommonAPI-D-Bus 3.1.33.1.3
Diffstat (limited to 'include/CommonAPI/DBus/DBusConnection.hpp')
-rw-r--r-- | include/CommonAPI/DBus/DBusConnection.hpp | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/include/CommonAPI/DBus/DBusConnection.hpp b/include/CommonAPI/DBus/DBusConnection.hpp index cce6296..97cb069 100644 --- a/include/CommonAPI/DBus/DBusConnection.hpp +++ b/include/CommonAPI/DBus/DBusConnection.hpp @@ -33,7 +33,7 @@ public: virtual ~DBusConnectionStatusEvent() {} protected: - virtual void onListenerAdded(const Listener& listener); + virtual void onListenerAdded(const Listener& listener, const Subscription subscription); // TODO: change to std::weak_ptr<DBusConnection> connection_; DBusConnection* dbusConnection_; @@ -130,6 +130,8 @@ public: COMMONAPI_EXPORT bool isDispatchReady(); COMMONAPI_EXPORT bool singleDispatch(); + COMMONAPI_EXPORT virtual bool hasDispatchThread(); + typedef std::tuple<std::string, std::string, std::string> DBusSignalMatchRuleTuple; typedef std::pair<uint32_t, std::string> DBusSignalMatchRuleMapping; typedef std::unordered_map<DBusSignalMatchRuleTuple, DBusSignalMatchRuleMapping> DBusSignalMatchRulesMap; @@ -164,6 +166,8 @@ public: COMMONAPI_EXPORT void initLibdbusObjectPathHandlerAfterConnect(); ::DBusHandlerResult onLibdbusObjectPathMessage(::DBusMessage* libdbusMessage); + COMMONAPI_EXPORT static DBusMessage convertToDBusMessage(::DBusPendingCall* _libdbusPendingCall, + CallStatus& _callStatus); COMMONAPI_EXPORT static void onLibdbusPendingCallNotifyThunk(::DBusPendingCall* libdbusPendingCall, void* userData); COMMONAPI_EXPORT static void onLibdbusDataCleanup(void* userData); @@ -242,12 +246,17 @@ public: > > timeoutMap_; - typedef std::pair<DBusMessageReplyAsyncHandler *, DBusMessage> MainloopTimeout_t; + typedef std::tuple< + DBusMessageReplyAsyncHandler *, + DBusMessage, + CommonAPI::CallStatus, + ::DBusPendingCall* + > MainloopTimeout_t; mutable std::list<MainloopTimeout_t> mainloopTimeouts_; mutable std::mutex enforceTimeoutMutex_; mutable std::condition_variable enforceTimeoutCondition_; - + mutable std::shared_ptr<std::thread> enforcerThread_; mutable std::mutex enforcerThreadMutex_; bool enforcerThreadCancelled_; |