endpoint.hpp (458a9c100019778114a58efc1ec29ce6e7375b2c) | endpoint.hpp (377e76abd1f1deb498e8495c61fb160675584eec) |
---|---|
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 --- 11 unchanged lines hidden (view full) --- 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) | 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 --- 11 unchanged lines hidden (view full) --- 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) {} | 28 : process_name_(process_name), 29 path_(path), 30 interface_(interface), 31 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 | 32 33 const string& get_path() const { return path_; } 34 35 const string& get_interface() const { return interface_; } 36 37 const string& get_process_name() const { return process_name_; } 38 39 const string& get_member() const { return member_; } 40 |
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_); | 41 const bool operator==(const endpoint& other) const { 42 return (process_name_ == other.process_name_ && path_ == other.path_ && 43 interface_ == other.interface_ && member_ == other.member_); |
44 } 45}; 46 | 44 } 45}; 46 |
47inline std::ostream& operator<<(std::ostream& os, const dbus::endpoint& e) { 48 os << "path=\"" << e.get_path() << "\" interface=\"" << e.get_interface() 49 << "\" process_name=\"" << e.get_process_name() << "\""; 50 return os; 51} 52 |
|
47} // namespace dbus 48 49#endif // DBUS_ENDPOINT_HPP | 53} // namespace dbus 54 55#endif // DBUS_ENDPOINT_HPP |