#include #include #include #include "apiImpl.h" #include #include namespace MirrorSearch { class Api : public IceTray::Service { public: Api() { xmlInitParser(); curl_global_init(0); } ~Api() { xmlCleanupParser(); curl_global_cleanup(); } void addObjects(const std::string &, const Ice::CommunicatorPtr & ic, const Ice::StringSeq &, const Ice::ObjectAdapterPtr & adp) override { auto dbpool = getConnectionPool(ic, "postgresql", "MirrorSearch"); adp->add(new SearchImpl(dbpool), ic->stringToIdentity("Search")); } }; NAMEDFACTORY("default", MirrorSearch::Api, IceTray::ServiceFactory); }