From 459f48df9d6b62a0f72be50c8ce082c1317c736e Mon Sep 17 00:00:00 2001 From: Kenneth Anthony Giusti Date: Thu, 8 Jul 2010 20:29:52 +0000 Subject: QMF: add api to get agent id, and new object id constructor that uses agent id. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@961919 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/include/qpid/agent/ManagementAgent.h | 10 ++++++++++ cpp/include/qpid/management/ManagementObject.h | 4 ++++ 2 files changed, 14 insertions(+) (limited to 'cpp/include/qpid') diff --git a/cpp/include/qpid/agent/ManagementAgent.h b/cpp/include/qpid/agent/ManagementAgent.h index aa0a974c35..e2451244c1 100644 --- a/cpp/include/qpid/agent/ManagementAgent.h +++ b/cpp/include/qpid/agent/ManagementAgent.h @@ -75,6 +75,16 @@ class ManagementAgent const std::string& product, const std::string& instance="") = 0; + // Retrieve the name of the agent as assigned by setName() + // + virtual void getName(std::string& vendor, + std::string& product, + std::string& instance) = 0; + + // Obtain the fully qualified name of the agent + // + virtual const std::string& getAddress() = 0; + // Connect to a management broker // // brokerHost - Hostname or IP address (dotted-quad) of broker. diff --git a/cpp/include/qpid/management/ManagementObject.h b/cpp/include/qpid/management/ManagementObject.h index 6bbd7ec407..59a7f00603 100644 --- a/cpp/include/qpid/management/ManagementObject.h +++ b/cpp/include/qpid/management/ManagementObject.h @@ -65,6 +65,10 @@ public: QPID_COMMON_EXTERN ObjectId(AgentAttachment* _agent, uint8_t flags, uint16_t seq); QPID_COMMON_EXTERN ObjectId(std::istream&); QPID_COMMON_EXTERN ObjectId(const std::string&); + QPID_COMMON_EXTERN ObjectId(const std::string& agentAddress, const std::string& key, + uint64_t epoch=0) : agent(0), first(0), second(0), + agentEpoch(epoch), v2Key(key), agentName(agentAddress) {} + // Deprecated: QPID_COMMON_EXTERN ObjectId(uint8_t flags, uint16_t seq, uint32_t broker, uint64_t object); QPID_COMMON_EXTERN bool operator==(const ObjectId &other) const; -- cgit v1.2.1