Unity Scopes API
Object.h
1 /*
2  * Copyright (C) 2014 Canonical Ltd
3  *
4  * This program is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU Lesser General Public License version 3 as
6  * published by the Free Software Foundation.
7  *
8  * This program is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU Lesser General Public License for more details.
12  *
13  * You should have received a copy of the GNU Lesser General Public License
14  * along with this program. If not, see <http://www.gnu.org/licenses/>.
15  *
16  * Authored by: Michi Henning <michi.henning@canonical.com>
17  */
18 
19 #pragma once
20 
21 #include <unity/scopes/ObjectProxyFwd.h>
22 #include <unity/util/NonCopyable.h>
23 
24 namespace unity
25 {
26 
27 namespace scopes
28 {
29 
34 class Object
35 {
36 public:
38  NONCOPYABLE(Object);
39 
40  virtual ~Object();
42 
47  virtual std::string endpoint() = 0;
48 
53  virtual std::string identity() = 0;
54 
59  virtual std::string target_category() = 0;
60 
67  virtual int64_t timeout() = 0; // Timeout in milliseconds, -1 == no timeout
68 
75  virtual std::string to_string() = 0;
76 
77 protected:
79  Object();
81 };
82 
83 } // namespace scopes
84 
85 } // namespace unity
virtual std::string identity()=0
Returns the identity of the target object of this proxy.
virtual std::string endpoint()=0
Returns the endpoint this proxy connects to.
Top-level namespace for all things Unity-related.
Definition: Version.h:49
virtual std::string target_category()=0
Returns the category of the target object of this proxy.
The root base class for all proxies.
Definition: Object.h:34
virtual std::string to_string()=0
Converts a proxy into its string representation.
virtual int64_t timeout()=0
Returns the timeout in milliseconds if this proxy is a twoway proxy.