2 * Copyright (c) 2022 Samsung Electronics Co., Ltd.
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.
26 target_uid_ = getuid();
29 Request::~Request() = default;
31 int Request::GetRequestType() const {
35 int Request::GetMoveType() const {
39 void Request::SetUpgrade(bool is_upgrade) {
40 is_upgrade_ = is_upgrade;
43 const std::string& Request::GetRequestInfo() const {
47 const std::string& Request::GetSessionId() const {
51 const std::string& Request::GetLicensePath() const {
55 const std::string& Request::GetOptionalData() const {
56 return optional_data_;
59 const std::string& Request::GetCallerPkgid() const {
63 void Request::SetUid(uid_t uid) {
67 void Request::SetRequestType(int type) {
71 void Request::SetSessionId(std::string id) {
75 uid_t Request::GetUid() const {
79 const std::string& Request::GetTepPath() const {
83 bool Request::IsUpgrade() const {
87 bool Request::IsTepMove() const {
91 bool Request::IsPreload() const {
95 bool Request::IsForceRemoval() const {
96 return force_removal_;
99 bool Request::IsPreloadRw() const {
100 return is_preload_rw_;
103 bool Request::IsNoRemoval() const {
107 bool Request::IsKeepRwData() const {
111 bool Request::IsPartialRw() const {
115 bool Request::IsDebugMode() const {
119 bool Request::IsSkipCheckReference() const {
120 return skip_check_reference_;
123 bool Request::IsSkipOptimization() const {
124 return skip_optimization_;
127 bool Request::IsRecoveryCleanup() const {
128 return recovery_cleanup_;
131 const std::vector<std::string>& Request::GetRequests() const {
135 } // namespace installer
136 } // namespace pkgmgr