summaryrefslogtreecommitdiff
path: root/service/apiImpl.h
blob: 0ee7972200c5b781dd766765cd5ea4c24601c6de (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 <api.h>
#include <abstractDatabaseClient.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