blob: 97bc89e7ddd35d903d1b963e0732c8842664369f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
#include <Ice/Communicator.h>
#include <Ice/ObjectAdapter.h>
#include <icetrayService.h>
#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);
}
|