[asterisk-scf-commits] asterisk-scf/release/servicediscovery.git branch "master" updated.

Commits to the Asterisk SCF project code repositories asterisk-scf-commits at lists.digium.com
Tue Jan 24 11:49:18 CST 2012


branch "master" has been updated
       via  781b2b7edd18b0f8e0c88e6fe5f53d1ff840210e (commit)
      from  1b5d9634d1e151d22da4e647d1faff4c39d85f61 (commit)

Summary of changes:
 src/ServiceManagement.cpp |   18 ++++++++++++++++++
 src/ServiceManagement.h   |    2 ++
 2 files changed, 20 insertions(+), 0 deletions(-)


- Log -----------------------------------------------------------------
commit 781b2b7edd18b0f8e0c88e6fe5f53d1ff840210e
Author: Brent Eagles <beagles at digium.com>
Date:   Tue Jan 24 14:18:27 2012 -0330

    Add an accessor to ServiceManagement object to query the registered
    locator param objects.

diff --git a/src/ServiceManagement.cpp b/src/ServiceManagement.cpp
index 9db70e6..fac2e48 100644
--- a/src/ServiceManagement.cpp
+++ b/src/ServiceManagement.cpp
@@ -75,6 +75,11 @@ public:
 
     bool isSupported(const AsteriskSCF::Core::Discovery::V1::ServiceLocatorParamsPtr&, const IsSupportedCallbackPtr&);
 
+    ServiceLocatorParamsPtr getParams()
+    {
+        return mStateItem->params;
+    }
+
 private:
     /**
      * Parameters state replication item.
@@ -426,6 +431,19 @@ ServiceStatus ServiceManagementImpl::getStatus() const
     }
 }
 
+ServiceLocatorParamsSeq ServiceManagementImpl::getLocatorParams(const Ice::Current&)
+{
+    
+    boost::shared_lock<boost::shared_mutex> lock(mImpl->mLock);
+    ServiceLocatorParamsSeq result;
+    for (std::vector<boost::shared_ptr<ServiceLocatorParamsSpec> >::const_iterator iter = mImpl->mSupportedLocatorParams.begin();
+         iter != mImpl->mSupportedLocatorParams.end(); ++iter)
+    {
+        result.push_back(ServiceLocatorParamsPtr::dynamicCast((*iter)->getParams()->ice_clone()));
+    }
+    return result;
+}
+
 /**
  * Implementation of the unregister method as defined in service_locator.ice
  */
diff --git a/src/ServiceManagement.h b/src/ServiceManagement.h
index 66fd43f..a1966d7 100644
--- a/src/ServiceManagement.h
+++ b/src/ServiceManagement.h
@@ -45,6 +45,8 @@ public:
     void unregister(const Ice::Current& = Ice::Current());
     AsteriskSCF::Core::Discovery::V1::ServiceStatus getStatus(const Ice::Current&) const { return getStatus(); }
 
+    AsteriskSCF::Core::Discovery::V1::ServiceLocatorParamsSeq getLocatorParams(const Ice::Current&);
+
     Ice::ObjectPrx getService();
     AsteriskSCF::Core::Discovery::V1::ServiceManagementPrx getServiceManagementPrx();
     void isSupported(

-----------------------------------------------------------------------


-- 
asterisk-scf/release/servicediscovery.git



More information about the asterisk-scf-commits mailing list