Fix static analysis issues
[platform/core/appfw/pkgmgr-info.git] / src / server / create_cache_request.cc
index 2ad143a..f0b02ce 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2021 Samsung Electronics Co., Ltd All Rights Reserved
+ * Copyright (c) 2021 - 2022 Samsung Electronics Co., Ltd All Rights Reserved
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -25,7 +25,7 @@ const unsigned char* CreateCacheRequest::GetData() {
   return nullptr;
 }
 
-int CreateCacheRequest::GetSize() {
+size_t CreateCacheRequest::GetSize() {
   return 0;
 }
 
@@ -33,6 +33,10 @@ pid_t CreateCacheRequest::GetSenderPID() {
   return getpid();
 }
 
+pid_t CreateCacheRequest::GetSenderTID() {
+  return gettid();
+}
+
 uid_t CreateCacheRequest::GetSenderUID() {
   return uid_;
 }
@@ -41,7 +45,12 @@ pkgmgr_common::ReqType CreateCacheRequest::GetRequestType() {
   return pkgmgr_common::ReqType::CREATE_CACHE;
 }
 
-bool CreateCacheRequest::SendData(unsigned char* data, int size) {
+bool CreateCacheRequest::SendData(const tizen_base::Parcel& parcel) {
+  bool ret;
+  const_cast<tizen_base::Parcel&>(parcel).ReadBool(&ret);
+  if (listener_ != nullptr)
+    listener_->OnCreateCacheDone(ret);
+
   return true;
 }