diff options
Diffstat (limited to 'cpp/include/qpid/management')
-rw-r--r-- | cpp/include/qpid/management/Manageable.h | 6 | ||||
-rw-r--r-- | cpp/include/qpid/management/ManagementObject.h | 15 |
2 files changed, 17 insertions, 4 deletions
diff --git a/cpp/include/qpid/management/Manageable.h b/cpp/include/qpid/management/Manageable.h index 1e5cd8bc42..ede5c29e43 100644 --- a/cpp/include/qpid/management/Manageable.h +++ b/cpp/include/qpid/management/Manageable.h @@ -55,7 +55,11 @@ class QPID_COMMON_EXTERN Manageable // // This accessor function returns a pointer to the management object. // - virtual ManagementObject* GetManagementObject(void) const = 0; +#ifdef _IN_QPID_BROKER + virtual ManagementObject::shared_ptr GetManagementObject() const = 0; +#else + virtual ManagementObject* GetManagementObject() const = 0; +#endif // Every "Manageable" object must implement ManagementMethod. This // function is called when a remote management client invokes a method diff --git a/cpp/include/qpid/management/ManagementObject.h b/cpp/include/qpid/management/ManagementObject.h index 16bf21038c..93fbec7bc7 100644 --- a/cpp/include/qpid/management/ManagementObject.h +++ b/cpp/include/qpid/management/ManagementObject.h @@ -25,10 +25,13 @@ #include "qpid/management/Mutex.h" #include "qpid/types/Variant.h" - #include <map> #include <vector> +#ifdef _IN_QPID_BROKER +#include <boost/shared_ptr.hpp> +#endif + namespace qpid { namespace management { @@ -155,6 +158,10 @@ protected: QPID_COMMON_EXTERN uint32_t writeTimestampsSize() const; public: +#ifdef _IN_QPID_BROKER + typedef boost::shared_ptr<ManagementObject> shared_ptr; +#endif + QPID_COMMON_EXTERN static const uint8_t MD5_LEN = 16; QPID_COMMON_EXTERN static int maxThreads; //typedef void (*writeSchemaCall_t) (qpid::framing::Buffer&); @@ -227,8 +234,10 @@ protected: //QPID_COMMON_EXTERN void mapDecode(const types::Variant::Map& map); }; -typedef std::map<ObjectId, ManagementObject*> ManagementObjectMap; -typedef std::vector<ManagementObject*> ManagementObjectVector; +#ifdef _IN_QPID_BROKER +typedef std::map<ObjectId, ManagementObject::shared_ptr> ManagementObjectMap; +typedef std::vector<ManagementObject::shared_ptr> ManagementObjectVector; +#endif }} |