summaryrefslogtreecommitdiff
path: root/include/CommonAPI/DBus/DBusAddressTranslator.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'include/CommonAPI/DBus/DBusAddressTranslator.hpp')
-rw-r--r--include/CommonAPI/DBus/DBusAddressTranslator.hpp19
1 files changed, 16 insertions, 3 deletions
diff --git a/include/CommonAPI/DBus/DBusAddressTranslator.hpp b/include/CommonAPI/DBus/DBusAddressTranslator.hpp
index 7f11197..bbe1d75 100644
--- a/include/CommonAPI/DBus/DBusAddressTranslator.hpp
+++ b/include/CommonAPI/DBus/DBusAddressTranslator.hpp
@@ -3,6 +3,10 @@
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#if !defined (COMMONAPI_INTERNAL_COMPILATION)
+#error "Only <CommonAPI/CommonAPI.hpp> can be included directly, this file may disappear or change contents."
+#endif
+
#ifndef COMMONAPI_DBUS_ADDRESSTRANSLATOR_HPP_
#define COMMONAPI_DBUS_ADDRESSTRANSLATOR_HPP_
@@ -10,6 +14,7 @@
#include <memory>
#include <mutex>
+#include <CommonAPI/Types.hpp>
#include <CommonAPI/Address.hpp>
#include <CommonAPI/DBus/DBusAddress.hpp>
#include <CommonAPI/DBus/DBusTypes.hpp>
@@ -32,9 +37,15 @@ public:
COMMONAPI_EXPORT bool translate(const DBusAddress &_key, CommonAPI::Address &_value);
COMMONAPI_EXPORT void insert(const std::string &_address,
- const std::string &_service, const std::string &_path, const std::string &_interface);
+ const std::string &_service, const std::string &_path, const std::string &_interface, const bool _objPathStartWithDigits = false);
+
+ COMMONAPI_EXPORT DBusType_t getDBusBusType(const ConnectionId_t &_connectionId) const ;
- COMMONAPI_EXPORT DBusType_t getDBusBusType() const;
+ /**
+ * @brief Returns whether or not org.freedesktop.DBus.Peer interface is used in a (valid) name mapping.
+ * @return true in case any (valid) mapping of org.freedesktop.DBus.Peer is present, otherwise false
+ */
+ COMMONAPI_EXPORT bool isOrgFreedesktopDBusPeerMapped() const;
private:
COMMONAPI_EXPORT bool readConfiguration();
@@ -53,7 +64,9 @@ private:
std::mutex mutex_;
- DBusType_t dBusBusType_;
+ std::map<ConnectionId_t, DBusType_t> dbusTypes_;
+
+ bool orgFreedesktopDBusPeerMapped_;
};
} // namespace DBus