#include <shared_mutex>
#include <vector>
+#include "utils/logging.hh"
+
#include "pkgmgrinfo_debug.h"
#include "pkgmgrinfo_internal.h"
}
int CertGetDBHandler::Execute() {
- std::shared_lock<std::shared_timed_mutex> s(lock_);
+ std::shared_lock<std::shared_mutex> s(lock_);
SetOpType(pkgmgr_common::DBOperationType::OPERATION_TYPE_READ);
SetDBType(pkgmgr_common::DBType::DB_TYPE_FILE_CERTDB);
if (!Connect()) {
- _LOGE("Failed to connect database");
+ LOG(ERROR) << "Failed to connect database";
return PMINFO_R_ERROR;
}
return ret;
handle_ = reinterpret_cast<pkgmgr_certinfo_x*>(handle);
- sqlite3* conn = GetConnection().front().first;
+ const auto& db = GetConnection().front().first;
- return certinfo_internal_get(conn, pkgid_.c_str(), uid_, handle_);
+ return internal::CertInfoGet(db, pkgid_, uid_, handle_);
}
} // namespace database