1 // Copyright (c) 2023 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.
5 #include "remove_all_cache_request_handler.hh"
7 #include <sys/resource.h>
11 #include "remove_all_cache_db_handler.hh"
12 #include "utils/logging.hh"
14 namespace psd = pkgmgr_server::database;
16 namespace pkgmgr_server {
17 namespace request_handler {
19 bool RemoveAllCacheRequestHandler::HandleRequest(unsigned char* data, size_t size,
20 const std::string& locale) {
21 psd::RemoveAllCacheDBHandler db(GetUID(), GetPID());
24 success_ = (db.Execute() == PMINFO_R_OK);
28 tizen_base::Parcel RemoveAllCacheRequestHandler::ExtractResult() {
29 tizen_base::Parcel parcel;
30 parcel.WriteBool(success_);
34 } // namespace request_handler
35 } // namespace pkgmgr_server