From afb5ebabf55c5c806e221ad15fca2fa0d5ef6d2b Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Tue, 6 Mar 2018 08:30:08 +0000 Subject: Initial commit, WIP --- service/main.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 service/main.cpp (limited to 'service/main.cpp') diff --git a/service/main.cpp b/service/main.cpp new file mode 100644 index 0000000..97bc89e --- /dev/null +++ b/service/main.cpp @@ -0,0 +1,18 @@ +#include +#include +#include +#include "apiImpl.h" + +namespace MirrorSearch { + class Api : public IceTray::Service { + public: + 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); +} + -- cgit v1.2.3