2 * Copyright (c) 2021 - 2022 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 #ifndef SERVER_CREATE_CACHE_REQUEST_HH_
18 #define SERVER_CREATE_CACHE_REQUEST_HH_
20 #include <sys/types.h>
22 #include "pkg_request.hh"
23 #include "request_type.hh"
25 namespace pkgmgr_server {
28 #define EXPORT_API __attribute__((visibility("default")))
31 class EXPORT_API CreateCacheRequest : public PkgRequest {
36 virtual void OnCreateCacheDone(bool success) = 0;
39 CreateCacheRequest(uid_t uid, IEvent* listener)
40 : uid_(uid), listener_(listener) {}
41 const unsigned char* GetData() override;
42 int GetSize() override;
43 pid_t GetSenderPID() override;
44 pid_t GetSenderTID() override;
45 uid_t GetSenderUID() override;
46 pkgmgr_common::ReqType GetRequestType() override;
47 bool SendData(const tizen_base::Parcel& parcel) override;
48 bool GetPrivilegeChecked() override;
55 } // namespace pkgmgr_server
57 #endif // SERVER_CREATE_CACHE_REQUEST_HH_