summaryrefslogtreecommitdiffstats
path: root/src/rpc-server/trex_rpc_server_api.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/rpc-server/trex_rpc_server_api.h')
-rw-r--r--src/rpc-server/trex_rpc_server_api.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/rpc-server/trex_rpc_server_api.h b/src/rpc-server/trex_rpc_server_api.h
index ab1bc454..b4313670 100644
--- a/src/rpc-server/trex_rpc_server_api.h
+++ b/src/rpc-server/trex_rpc_server_api.h
@@ -163,10 +163,34 @@ public:
return s_server_uptime;
}
+
+ /**
+ * query for ownership
+ *
+ */
+ static const std::string &get_owner() {
+ return s_owner;
+ }
+
+ /**
+ * take ownership of the server array
+ * this is static
+ * ownership is total
+ *
+ */
+ static void set_owner(const std::string &owner) {
+ s_owner = owner;
+ }
+
+ static void clear_owner() {
+ s_owner = "none";
+ }
+
private:
std::vector<TrexRpcServerInterface *> m_servers;
bool m_verbose;
static const std::string s_server_uptime;
+ static std::string s_owner;
};
#endif /* __TREX_RPC_SERVER_API_H__ */