// // Copyright (c) ZeroC, Inc. All rights reserved. // #include #include #include using namespace std; using namespace Ice; class ServiceI : public IceBox::Service { public: void start(const string&, const shared_ptr&, const StringSeq&) override; void stop() override; }; extern "C" { // // Factory function // ICE_DECLSPEC_EXPORT ::IceBox::Service* create(const shared_ptr&) { return new ServiceI; } } void ServiceI::start(const string& name, const shared_ptr& communicator, const StringSeq&) { auto properties = communicator->getProperties(); auto adapter = communicator->createObjectAdapter(name); adapter->add(make_shared(properties), stringToIdentity(properties->getProperty(name + ".Identity"))); adapter->activate(); } void ServiceI::stop() { }