PrivacyGuardDb::PgAddPrivacyAccessLog(const int userId, const std::string packageId, const std::string privacyId, const time_t date)
{
if(userId < 0 || date <= 0) {
- PG_LOGE("Invalid parameter: userId: [%d], date: [%d]", userId, date);
+ PG_LOGE("Invalid parameter: userId: [%d]", userId);
return PRIV_GUARD_ERROR_INVALID_PARAMETER;
}
if (m_bInitialized == false) {
initialize();
}
- TryCatchResLogReturn(m_bInitialized == true, m_dbMutex.unlock(), PRIV_GUARD_ERROR_NOT_INITIALIZED, "Failed to initialize", res);
+ TryCatchLogReturn(m_bInitialized == true, m_dbMutex.unlock(), PRIV_GUARD_ERROR_NOT_INITIALIZED, "Failed to initialize");
// open db
if(m_bDBOpen == false) {
if (m_bInitialized == false) {
initialize();
}
- TryCatchResLogReturn(m_bInitialized == true, m_dbMutex.unlock(), PRIV_GUARD_ERROR_NOT_INITIALIZED, "Failed to initialize", res);
+ TryCatchLogReturn(m_bInitialized == true, m_dbMutex.unlock(), PRIV_GUARD_ERROR_NOT_INITIALIZED, "Failed to initialize");
// open db
if(m_bDBOpen == false) {
if (m_bInitialized == false) {
initialize();
}
- TryCatchResLogReturn(m_bInitialized == true, m_dbMutex.unlock(), PRIV_GUARD_ERROR_NOT_INITIALIZED, "Failed to initialize", res);
+ TryCatchLogReturn(m_bInitialized == true, m_dbMutex.unlock(), PRIV_GUARD_ERROR_NOT_INITIALIZED, "Failed to initialize");
// open db
if(m_bDBOpen == false) {
if (m_bInitialized == false) {
initialize();
}
- TryCatchResLogReturn(m_bInitialized == true, m_dbMutex.unlock(), PRIV_GUARD_ERROR_NOT_INITIALIZED, "Failed to initialize", res);
+ TryCatchLogReturn(m_bInitialized == true, m_dbMutex.unlock(), PRIV_GUARD_ERROR_NOT_INITIALIZED, "Failed to initialize");
// open db
if(m_bDBOpen == false) {
if (m_bInitialized == false) {
initialize();
}
- TryCatchResLogReturn(m_bInitialized == true, m_dbMutex.unlock(), PRIV_GUARD_ERROR_NOT_INITIALIZED, "Failed to initialize", res);
+ TryCatchLogReturn(m_bInitialized == true, m_dbMutex.unlock(), PRIV_GUARD_ERROR_NOT_INITIALIZED, "Failed to initialize");
// open db
if(m_bDBOpen == false) {
if (m_bInitialized == false) {
initialize();
}
- TryCatchResLogReturn(m_bInitialized == true, m_dbMutex.unlock(), PRIV_GUARD_ERROR_NOT_INITIALIZED, "Failed to initialize", res);
+ TryCatchLogReturn(m_bInitialized == true, m_dbMutex.unlock(), PRIV_GUARD_ERROR_NOT_INITIALIZED, "Failed to initialize");
// open db
if(m_bDBOpen == false) {
if (m_bInitialized == false) {
initialize();
}
- TryCatchResLogReturn(m_bInitialized == true, m_dbMutex.unlock(), PRIV_GUARD_ERROR_NOT_INITIALIZED, "Failed to initialize", res);
+ TryCatchLogReturn(m_bInitialized == true, m_dbMutex.unlock(), PRIV_GUARD_ERROR_NOT_INITIALIZED, "Failed to initialize");
// open db
if(m_bDBOpen == false) {
if (m_bInitialized == false) {
initialize();
}
- TryCatchResLogReturn(m_bInitialized == true, m_dbMutex.unlock(), PRIV_GUARD_ERROR_NOT_INITIALIZED, "Failed to initialize", res);
+ TryCatchLogReturn(m_bInitialized == true, m_dbMutex.unlock(), PRIV_GUARD_ERROR_NOT_INITIALIZED, "Failed to initialize");
// open db
if(m_bDBOpen == false) {
if (m_bInitialized == false) {
initialize();
}
- TryCatchResLogReturn(m_bInitialized == true, m_dbMutex.unlock(), PRIV_GUARD_ERROR_NOT_INITIALIZED, "Failed to initialize", res);
+ TryCatchLogReturn(m_bInitialized == true, m_dbMutex.unlock(), PRIV_GUARD_ERROR_NOT_INITIALIZED, "Failed to initialize");
// open db
if(m_bDBOpen == false) {
if (m_bInitialized == false) {
initialize();
}
- TryCatchResLogReturn(m_bInitialized == true, m_dbMutex.unlock(), PRIV_GUARD_ERROR_NOT_INITIALIZED, "Failed to initialize", res);
+ TryCatchLogReturn(m_bInitialized == true, m_dbMutex.unlock(), PRIV_GUARD_ERROR_NOT_INITIALIZED, "Failed to initialize");
// open db
if(m_bDBOpen == false) {
if (m_bInitialized == false) {
initialize();
}
- TryCatchResLogReturn(m_bInitialized == true, m_dbMutex.unlock(), PRIV_GUARD_ERROR_NOT_INITIALIZED, "Failed to initialize", res);
+ TryCatchLogReturn(m_bInitialized == true, m_dbMutex.unlock(), PRIV_GUARD_ERROR_NOT_INITIALIZED, "Failed to initialize");
// open db
if(m_bDBOpen == false) {
if (m_bInitialized == false) {
initialize();
}
- TryCatchResLogReturn(m_bInitialized == true, m_dbMutex.unlock(), PRIV_GUARD_ERROR_NOT_INITIALIZED, "Failed to initialize", res);
+ TryCatchLogReturn(m_bInitialized == true, m_dbMutex.unlock(), PRIV_GUARD_ERROR_NOT_INITIALIZED, "Failed to initialize");
// open db
if(m_bDBOpen == false) {
if (m_bInitialized == false) {
initialize();
}
- TryCatchResLogReturn(m_bInitialized == true, m_dbMutex.unlock(), PRIV_GUARD_ERROR_NOT_INITIALIZED, "Failed to initialize", res);
+ TryCatchLogReturn(m_bInitialized == true, m_dbMutex.unlock(), PRIV_GUARD_ERROR_NOT_INITIALIZED, "Failed to initialize");
// open db
if(m_bDBOpen == false) {
if (m_bInitialized == false) {
initialize();
}
- TryCatchResLogReturn(m_bInitialized == true, m_dbMutex.unlock(), PRIV_GUARD_ERROR_NOT_INITIALIZED, "Failed to initialize", res);
+ TryCatchLogReturn(m_bInitialized == true, m_dbMutex.unlock(), PRIV_GUARD_ERROR_NOT_INITIALIZED, "Failed to initialize");
// open db
if(m_bDBOpen == false) {
if (m_bInitialized == false) {
initialize();
}
- TryCatchResLogReturn(m_bInitialized == true, m_dbMutex.unlock(), PRIV_GUARD_ERROR_NOT_INITIALIZED, "Failed to initialize", res);
+ TryCatchLogReturn(m_bInitialized == true, m_dbMutex.unlock(), PRIV_GUARD_ERROR_NOT_INITIALIZED, "Failed to initialize");
// open db
if(m_bDBOpen == false) {
if (m_bInitialized == false) {
initialize();
}
- TryCatchResLogReturn(m_bInitialized == true, m_dbMutex.unlock(), PRIV_GUARD_ERROR_NOT_INITIALIZED, "Failed to initialize", res);
+ TryCatchLogReturn(m_bInitialized == true, m_dbMutex.unlock(), PRIV_GUARD_ERROR_NOT_INITIALIZED, "Failed to initialize");
// open db
if(m_bDBOpen == false) {
// get start~end date (for 7 days)
end_date = time(NULL);
localtime_r(&end_date, &date);
- PG_LOGD("current (end) time [%d]: %4d/%2d/%2d %2d:%2d", end_date, date.tm_year + 1900, date.tm_mon + 1, date.tm_mday, date.tm_hour, date.tm_min);
+ PG_LOGD("current (end) time [%ld]: %4d/%2d/%2d %2d:%2d", end_date, date.tm_year + 1900, date.tm_mon + 1, date.tm_mday, date.tm_hour, date.tm_min);
date.tm_hour = 0;
date.tm_min = 0;
date.tm_sec = 0;
today_midnight = mktime(&date);
start_date = today_midnight - (UNIX_TIME_ONE_DAY * (PRIVACY_GUARD_DAYS - 1));
localtime_r(&start_date, &date);
- PG_LOGD("start time [%d]: %4d/%2d/%2d %2d:%2d", start_date, date.tm_year + 1900, date.tm_mon + 1, date.tm_mday, date.tm_hour, date.tm_min);
+ PG_LOGD("start time [%ld]: %4d/%2d/%2d %2d:%2d", start_date, date.tm_year + 1900, date.tm_mon + 1, date.tm_mday, date.tm_hour, date.tm_min);
// [CYNARA] Flush Entries
res = cynara_monitor_entries_flush(p_cynara_monitor);
if (m_bInitialized == false) {
initialize();
}
- TryCatchResLogReturn(m_bInitialized == true, m_dbMutex.unlock(), PRIV_GUARD_ERROR_NOT_INITIALIZED, "Failed to initialize", res);
+ TryCatchLogReturn(m_bInitialized == true, m_dbMutex.unlock(), PRIV_GUARD_ERROR_NOT_INITIALIZED, "Failed to initialize");
// open db
if(m_bDBOpen == false) {
p_data.count = count;
time_t time = sqlite3_column_int(infoStmt, 1);
- PG_LOGD("## time[%d]", time);
+ PG_LOGD("## time[%ld]", time);
p_data.time = time;
packageInfoList.push_back(p_data);
if (m_bInitialized == false) {
initialize();
}
- TryCatchResLogReturn(m_bInitialized == true, m_dbMutex.unlock(), PRIV_GUARD_ERROR_NOT_INITIALIZED, "Failed to initialize", res);
+ TryCatchLogReturn(m_bInitialized == true, m_dbMutex.unlock(), PRIV_GUARD_ERROR_NOT_INITIALIZED, "Failed to initialize");
// open db
if(m_bDBOpen == false) {
if (m_bInitialized == false) {
initialize();
}
- TryCatchResLogReturn(m_bInitialized == true, m_dbMutex.unlock(), PRIV_GUARD_ERROR_NOT_INITIALIZED, "Failed to initialize", res);
+ TryCatchLogReturn(m_bInitialized == true, m_dbMutex.unlock(), PRIV_GUARD_ERROR_NOT_INITIALIZED, "Failed to initialize");
// open db
if(m_bDBOpen == false) {
if (m_bInitialized == false) {
initialize();
}
- TryCatchResLogReturn(m_bInitialized == true, m_dbMutex.unlock(), PRIV_GUARD_ERROR_NOT_INITIALIZED, "Failed to initialize", res);
+ TryCatchLogReturn(m_bInitialized == true, m_dbMutex.unlock(), PRIV_GUARD_ERROR_NOT_INITIALIZED, "Failed to initialize");
// open db
if(m_bDBOpen == false) {
if (m_bInitialized == false) {
initialize();
}
- TryCatchResLogReturn(m_bInitialized == true, m_dbMutex.unlock(), PRIV_GUARD_ERROR_NOT_INITIALIZED, "Failed to initialize", res);
+ TryCatchLogReturn(m_bInitialized == true, m_dbMutex.unlock(), PRIV_GUARD_ERROR_NOT_INITIALIZED, "Failed to initialize");
// open db
if(m_bDBOpen == false) {
if (m_bInitialized == false) {
initialize();
}
- TryCatchResLogReturn(m_bInitialized == true, m_dbMutex.unlock(), PRIV_GUARD_ERROR_NOT_INITIALIZED, "Failed to initialize", res);
+ TryCatchLogReturn(m_bInitialized == true, m_dbMutex.unlock(), PRIV_GUARD_ERROR_NOT_INITIALIZED, "Failed to initialize");
// open db
if(m_bDBOpen == false) {
if (m_bInitialized == false) {
initialize();
}
- TryCatchResLogReturn(m_bInitialized == true, m_dbMutex.unlock(), PRIV_GUARD_ERROR_NOT_INITIALIZED, "Failed to initialize", res);
+ TryCatchLogReturn(m_bInitialized == true, m_dbMutex.unlock(), PRIV_GUARD_ERROR_NOT_INITIALIZED, "Failed to initialize");
// open db
if(m_bDBOpen == false) {
if (m_bInitialized == false) {
initialize();
}
- TryCatchResLogReturn(m_bInitialized == true, m_dbMutex.unlock(), PRIV_GUARD_ERROR_NOT_INITIALIZED, "Failed to initialize", res);
+ TryCatchLogReturn(m_bInitialized == true, m_dbMutex.unlock(), PRIV_GUARD_ERROR_NOT_INITIALIZED, "Failed to initialize");
// open db
if(m_bDBOpen == false) {
if (m_bInitialized == false) {
initialize();
}
- TryCatchResLogReturn(m_bInitialized == true, m_dbMutex.unlock(), PRIV_GUARD_ERROR_NOT_INITIALIZED, "Failed to initialize", res);
+ TryCatchLogReturn(m_bInitialized == true, m_dbMutex.unlock(), PRIV_GUARD_ERROR_NOT_INITIALIZED, "Failed to initialize");
// open db
if(m_bDBOpen == false) {
if (m_bInitialized == false) {
initialize();
}
- TryCatchResLogReturn(m_bInitialized == true, m_dbMutex.unlock(), PRIV_GUARD_ERROR_NOT_INITIALIZED, "Failed to initialize", res);
+ TryCatchLogReturn(m_bInitialized == true, m_dbMutex.unlock(), PRIV_GUARD_ERROR_NOT_INITIALIZED, "Failed to initialize");
// open db
if(m_bDBOpen == false) {
if (m_bInitialized == false) {
initialize();
}
- TryCatchResLogReturn(m_bInitialized == true, m_dbMutex.unlock(), PRIV_GUARD_ERROR_NOT_INITIALIZED, "Failed to initialize", res);
+ TryCatchLogReturn(m_bInitialized == true, m_dbMutex.unlock(), PRIV_GUARD_ERROR_NOT_INITIALIZED, "Failed to initialize");
// open db
if(m_bDBOpen == false) {
// initialize
if (m_bInitialized == false)
initialize();
- TryCatchResLogReturn(m_bInitialized == true, m_dbMutex.unlock(), PRIV_GUARD_ERROR_NOT_INITIALIZED, "Failed to initialize", res);
+ TryCatchLogReturn(m_bInitialized == true, m_dbMutex.unlock(), PRIV_GUARD_ERROR_NOT_INITIALIZED, "Failed to initialize");
// open db
if (m_bDBOpen == false)
if (m_bInitialized == false) {
initialize();
}
- TryCatchResLogReturn(m_bInitialized == true, m_dbMutex.unlock(), PRIV_GUARD_ERROR_NOT_INITIALIZED, "Failed to initialize", res);
+ TryCatchLogReturn(m_bInitialized == true, m_dbMutex.unlock(), PRIV_GUARD_ERROR_NOT_INITIALIZED, "Failed to initialize");
// open db
if(m_bDBOpen == false) {
if (m_bInitialized == false) {
initialize();
}
- TryCatchResLogReturn(m_bInitialized == true, m_dbMutex.unlock(), PRIV_GUARD_ERROR_NOT_INITIALIZED, "Failed to initialize", res);
+ TryCatchLogReturn(m_bInitialized == true, m_dbMutex.unlock(), PRIV_GUARD_ERROR_NOT_INITIALIZED, "Failed to initialize");
// open db
if(m_bDBOpen == false) {
if (m_bInitialized == false) {
initialize();
}
- TryCatchResLogReturn(m_bInitialized == true, m_dbMutex.unlock(), PRIV_GUARD_ERROR_NOT_INITIALIZED, "Failed to initialize", res);
+ TryCatchLogReturn(m_bInitialized == true, m_dbMutex.unlock(), PRIV_GUARD_ERROR_NOT_INITIALIZED, "Failed to initialize");
// open db
if(m_bDBOpen == false) {
if (m_bInitialized == false) {
initialize();
}
- TryCatchResLogReturn(m_bInitialized == true, m_dbMutex.unlock(), PRIV_GUARD_ERROR_NOT_INITIALIZED, "Failed to initialize", res);
+ TryCatchLogReturn(m_bInitialized == true, m_dbMutex.unlock(), PRIV_GUARD_ERROR_NOT_INITIALIZED, "Failed to initialize");
// open db
if(m_bDBOpen == false) {
if (m_bInitialized == false) {
initialize();
}
- TryCatchResLogReturn(m_bInitialized == true, m_dbMutex.unlock(), PRIV_GUARD_ERROR_NOT_INITIALIZED, "Failed to initialize", res);
+ TryCatchLogReturn(m_bInitialized == true, m_dbMutex.unlock(), PRIV_GUARD_ERROR_NOT_INITIALIZED, "Failed to initialize");
// open db
if(m_bDBOpen == false) {
if (m_bInitialized == false) {
initialize();
}
- TryCatchResLogReturn(m_bInitialized == true, m_dbMutex.unlock(), PRIV_GUARD_ERROR_NOT_INITIALIZED, "Failed to initialize", res);
+ TryCatchLogReturn(m_bInitialized == true, m_dbMutex.unlock(), PRIV_GUARD_ERROR_NOT_INITIALIZED, "Failed to initialize");
// open db
if(m_bDBOpen == false) {
// initialize
if (m_bInitialized == false)
initialize();
- TryCatchResLogReturn(m_bInitialized == true, m_dbMutex.unlock(), PRIV_GUARD_ERROR_NOT_INITIALIZED, "Failed to initialize", res);
+ TryCatchLogReturn(m_bInitialized == true, m_dbMutex.unlock(), PRIV_GUARD_ERROR_NOT_INITIALIZED, "Failed to initialize");
// open db
if (m_bDBOpen == false)
// initialize
if (m_bInitialized == false)
initialize();
- TryCatchResLogReturn(m_bInitialized == true, m_dbMutex.unlock(), PRIV_GUARD_ERROR_NOT_INITIALIZED, "Failed to initialize", res);
+ TryCatchLogReturn(m_bInitialized == true, m_dbMutex.unlock(), PRIV_GUARD_ERROR_NOT_INITIALIZED, "Failed to initialize");
// open db
if (m_bDBOpen == false)
if (m_bInitialized == false) {
initialize();
}
- TryCatchResLogReturn(m_bInitialized == true, m_dbMutex.unlock(), PRIV_GUARD_ERROR_NOT_INITIALIZED, "Failed to initialize", res);
+ TryCatchLogReturn(m_bInitialized == true, m_dbMutex.unlock(), PRIV_GUARD_ERROR_NOT_INITIALIZED, "Failed to initialize");
// open db
if(m_bDBOpen == false) {
if (m_bInitialized == false) {
initialize();
}
- TryCatchResLogReturn(m_bInitialized == true, m_dbMutex.unlock(), PRIV_GUARD_ERROR_NOT_INITIALIZED, "Failed to initialize", res);
+ TryCatchLogReturn(m_bInitialized == true, m_dbMutex.unlock(), PRIV_GUARD_ERROR_NOT_INITIALIZED, "Failed to initialize");
// open db
if(m_bDBOpen == false) {
if (m_bInitialized == false) {
initialize();
}
- TryCatchResLogReturn(m_bInitialized == true, m_dbMutex.unlock(), PRIV_GUARD_ERROR_NOT_INITIALIZED, "Failed to initialize", res);
+ TryCatchLogReturn(m_bInitialized == true, m_dbMutex.unlock(), PRIV_GUARD_ERROR_NOT_INITIALIZED, "Failed to initialize");
// open db
if(m_bDBOpen == false) {
if (m_bInitialized == false) {
initialize();
}
- TryCatchResLogReturn(m_bInitialized == true, m_dbMutex.unlock(), PRIV_GUARD_ERROR_NOT_INITIALIZED, "Failed to initialize", res);
+ TryCatchLogReturn(m_bInitialized == true, m_dbMutex.unlock(), PRIV_GUARD_ERROR_NOT_INITIALIZED, "Failed to initialize");
// open db
if(m_bDBOpen == false) {
if (m_bInitialized == false) {
initialize();
}
- TryCatchResLogReturn(m_bInitialized == true, m_dbMutex.unlock(), PRIV_GUARD_ERROR_NOT_INITIALIZED, "Failed to initialize", res);
+ TryCatchLogReturn(m_bInitialized == true, m_dbMutex.unlock(), PRIV_GUARD_ERROR_NOT_INITIALIZED, "Failed to initialize");
// open db
if(m_bDBOpen == false) {