#include "pkginfo_client.hh"
+#include <parcel.hh>
+#include <vconf.h>
+
+#include <string>
+
#include "parcelable_factory.hh"
#include "get_appinfo_request_handler.hh"
#include "get_cert_request_handler.hh"
#include "set_cert_request_handler.hh"
#include "set_pkginfo_request_handler.hh"
-#include <parcel.hh>
-
-#include <vconf.h>
-
#include "pkgmgrinfo_debug.h"
-#include <string>
namespace pkgmgr_client {
+/*
+ * Copyright (c) 2021 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.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
#include <unistd.h>
#include <sys/types.h>
#include <sys/signalfd.h>
#include <signal.h>
#include <gio/gio.h>
-#include <unistd.h>
#include <glib-unix.h>
#include <systemd/sd-daemon.h>
request_type_ = pkgmgr_common::REQ_TYPE_NONE;
return false;
}
- ret = socket_->ReceiveData((void*)data_, data_size_);
+ ret = socket_->ReceiveData(reinterpret_cast<void*>(data_), data_size_);
if (ret < 0) {
LOGE("Failed to ReceiveData");
delete[] data_;
if (static_cast<int>(cond) & (G_IO_ERR | G_IO_HUP)) {
auto it = runner->sid_map_.find(fd);
if (it != runner->sid_map_.end()) {
- LOGW("Socket disconnect. fd(%d) condition(%d)", fd, static_cast<int>(cond));
+ LOGW("Socket disconnect. fd(%d) condition(%d)",
+ fd, static_cast<int>(cond));
g_source_remove(it->second);
runner->sid_map_.erase(it);
}
}
void WorkerThread::Run() {
- std::unique_ptr<request_handler::AbstractRequestHandler> handler[pkgmgr_common::ReqType::MAX];
+ std::unique_ptr<request_handler::AbstractRequestHandler>
+ handler[pkgmgr_common::ReqType::MAX];
handler[pkgmgr_common::ReqType::GET_PKG_INFO].reset(
new request_handler::GetPkginfoRequestHandler());
handler[pkgmgr_common::ReqType::GET_APP_INFO].reset(
continue;
}
pkgmgr_common::ReqType type = req->GetRequestType();
- LOGD("Request type(%d), pid(%d)", static_cast<int>(type), req->GetSenderPID());
+ LOGD("Request type(%d), pid(%d)",
+ static_cast<int>(type), req->GetSenderPID());
if (type <= pkgmgr_common::ReqType::REQ_TYPE_NONE
|| type >= pkgmgr_common::ReqType::MAX) {
LOGE("Request type is invalid (%d)", static_cast<int>(type));