summaryrefslogtreecommitdiff
path: root/service/apiImpl.h
blob: 93aaf9e0ef7c59c91f0842b2de17373bf81e2564 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#ifndef MIRRORSEARCH_APIIMPL_H
#define MIRRORSEARCH_APIIMPL_H

#include <abstractDatabaseClient.h>
#include <api.h>
#include <logger.h>

namespace MirrorSearch {
	class SearchImpl : public Search, public IceTray::AbstractDatabaseClient {
	public:
		SearchImpl(const DB::ConnectionPoolPtr &);

		virtual SearchServices getServices(const ::Ice::Current & = ::Ice::Current()) override;
		virtual SearchHits getMatches(const ::std::string, const ::Ice::Current & = ::Ice::Current()) override;
		virtual ::IceUtil::Optional<::std::string> feelingLucky(
				const ::std::string, const ::Ice::Current & = ::Ice::Current()) override;

	private:
		void callService(const ::std::string & fn, const SearchServicePtr & s, SearchHits & sh) const;

		LOG::LoggerPtr log;
	};
}

#endif