[Reform] Apply Coding Style
[platform/core/appfw/pkgmgr-info.git] / src / server / query_request_handler.hh
1 // Copyright (c) 2021 Samsung Electronics Co., Ltd All Rights Reserved
2 // Use of this source code is governed by an apache-2.0 license that can be
3 // found in the LICENSE file.
4
5 #ifndef SERVER_QUERY_REQUEST_HANDLER_HH_
6 #define SERVER_QUERY_REQUEST_HANDLER_HH_
7
8 #include "abstract_request_handler.hh"
9 #include "../common/parcel/result_parcelable.hh"
10
11
12 #include <string>
13
14 namespace pkgmgr_server {
15 namespace request_handler {
16
17 #ifndef EXPORT_API
18 #define EXPORT_API __attribute__((visibility("default")))
19 #endif
20
21 class EXPORT_API QueryRequestHandler : public AbstractRequestHandler {
22  public:
23   bool HandleRequest(unsigned char* data, int size, std::string locale) override;
24
25   std::vector<uint8_t> GetResult() override;
26
27 private:
28  std::shared_ptr<pkgmgr_common::parcel::ResultParcelable> result_;
29
30 };
31
32 }  // namespace request_handler
33 }  // namespace pkgmgr_server
34
35 #endif  // SERVER_QUERY_REQUEST_HANDLER_HH_