diff options
Diffstat (limited to 'service/main.cpp')
-rw-r--r-- | service/main.cpp | 39 |
1 files changed, 20 insertions, 19 deletions
diff --git a/service/main.cpp b/service/main.cpp index c84b11b..b008e08 100644 --- a/service/main.cpp +++ b/service/main.cpp @@ -1,30 +1,31 @@ +#include "apiImpl.h" #include <Ice/Initialize.h> #include <Ice/ObjectAdapter.h> -#include <icetrayService.h> -#include "apiImpl.h" #include <curl/curl.h> +#include <icetrayService.h> #include <libxml/parser.h> 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<SearchImpl>(dbpool), Ice::stringToIdentity("Search")); - } + 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<SearchImpl>(dbpool), Ice::stringToIdentity("Search")); + } }; NAMEDFACTORY("default", MirrorSearch::Api, IceTray::ServiceFactory); } - |