[asterisk-scf-commits] asterisk-scf/integration/routing.git branch "master" updated.
Commits to the Asterisk SCF project code repositories
asterisk-scf-commits at lists.digium.com
Wed Aug 18 20:12:47 CDT 2010
branch "master" has been updated
via d19dcc898d7fe4e5e96d667c1940e2bf98a46053 (commit)
from 616aa72b5df5d6bec48801bc4dd3caddaa3678c7 (commit)
Summary of changes:
slice | 2 +-
src/BasicRoutingServiceApp.cpp | 12 +++++++++---
2 files changed, 10 insertions(+), 4 deletions(-)
- Log -----------------------------------------------------------------
commit d19dcc898d7fe4e5e96d667c1940e2bf98a46053
Author: Ken Hunt <ken.hunt at digium.com>
Date: Wed Aug 18 20:09:40 2010 -0500
Resynch the slice submodule.
Actually allocate the ComponentServiceImpl and add it to the adapter.
That would HANDY.
diff --git a/slice b/slice
index 8d1cbe2..e88ddfb 160000
--- a/slice
+++ b/slice
@@ -1 +1 @@
-Subproject commit 8d1cbe2bfb3ed106496a64b76e5871da1f77151b
+Subproject commit e88ddfb27c75ef7e4315a598c9c2749052cc0f5b
diff --git a/src/BasicRoutingServiceApp.cpp b/src/BasicRoutingServiceApp.cpp
index 014f48c..f2158f9 100644
--- a/src/BasicRoutingServiceApp.cpp
+++ b/src/BasicRoutingServiceApp.cpp
@@ -85,8 +85,10 @@ public:
BasicRoutingServiceApp() : mDone(false) {}
~BasicRoutingServiceApp()
{
+ // Smart pointers do your thing.
mLocatorRegistry = 0;
mAdminInteface = 0;
+ mComponentService = 0;
}
public: // Overrides of Ice::Application
@@ -103,11 +105,13 @@ private:
std::string mAppName;
Ice::ObjectAdapterPtr mAdapter;
ServiceLocatorManagementPrx mServiceLocatorManagement;
+
Discovery::V1::ServiceManagementPrx mRegistryLocatorManagement;
Discovery::V1::ServiceManagementPrx mAdminManagement;
Discovery::V1::ServiceManagementPrx mComponentServiceManagement;
LocatorRegistryPtr mLocatorRegistry;
RoutingServiceAdminPtr mAdminInteface;
+ ComponentServicePtr mComponentService;
};
static const string RegistryLocatorObjectId("RoutingServiceRegistryLocator");
@@ -118,7 +122,7 @@ static const string ComponentServiceId("BasicRoutingService");
* This class provides implementation for the ComponentService interface.
* Every Asterisk SCF component is expected to expose the ComponentService interface.
*/
-class ComponentServiceImpl : ComponentService
+class ComponentServiceImpl : public ComponentService
{
public:
ComponentServiceImpl(BasicRoutingServiceApp &app) : mApp(app) {}
@@ -249,10 +253,13 @@ void BasicRoutingServiceApp::initialize(const std::string appName)
mLocatorRegistry = mDataModelInstance.mEndpointRegistry;
mAdapter->add(mLocatorRegistry, communicator()->stringToIdentity(RegistryLocatorObjectId));
- // Create and configure the Admin interface.
+ // Create and publish the Admin interface support.
mAdminInteface = new RoutingAdmin();
mAdapter->add(mAdminInteface, communicator()->stringToIdentity(RoutingAdminObjectId));
+ mComponentService = new ComponentServiceImpl(*this);
+ mAdapter->add(mComponentService, communicator()->stringToIdentity(ComponentServiceId));
+
mAdapter->activate();
}
@@ -290,7 +297,6 @@ int BasicRoutingServiceApp::run(int argc, char* argv[])
}; // end Hydra
static BasicRoutingServiceApp app;
-
// Application entry point.
int main(int argc, char* argv[])
{
-----------------------------------------------------------------------
--
asterisk-scf/integration/routing.git
More information about the asterisk-scf-commits
mailing list