#include "apiImpl.h" #include #include #include #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(std::make_shared(dbpool), Ice::stringToIdentity("Search")); } }; NAMEDFACTORY("default", MirrorSearch::Api, IceTray::ServiceFactory); }