1 // Copyright (c) Benjamin Kietzman (github.com/bkietz) 2 // 3 // Distributed under the Boost Software License, Version 1.0. (See accompanying 4 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 6 #ifndef DBUS_ENDPOINT_HPP 7 #define DBUS_ENDPOINT_HPP 8 9 #include <dbus/dbus.h> 10 #include <dbus/element.hpp> 11 #include <dbus/message.hpp> 12 13 namespace dbus { 14 15 class endpoint { 16 string process_name_; 17 string path_; 18 string interface_; 19 string member_; 20 21 public: 22 endpoint(const string& process_name, const string& path, 23 const string& interface) 24 : process_name_(process_name), path_(path), interface_(interface) {} 25 26 endpoint(const string& process_name, const string& path, 27 const string& interface, const string& member) 28 : process_name_(process_name), path_(path), 29 interface_(interface), member_(member) {} 30 31 const string& get_path() const { return path_; } 32 33 const string& get_interface() const { return interface_; } 34 35 const string& get_process_name() const { return process_name_; } 36 37 const string& get_member() const { return member_; } 38 39 const bool operator == (const endpoint &other) const { 40 return (process_name_ == other.process_name_ && 41 path_ == other.path_ && 42 interface_ == other.interface_ && 43 member_ == other.member_); 44 } 45 }; 46 47 } // namespace dbus 48 49 #endif // DBUS_ENDPOINT_HPP 50