static void sqldataControlSelectCallback(bundle* b, int request_code, appsvc_result_val res, void* data)
{
- LogDebug("Enter");
+ LoggerD("Enter");
EventSelectPendingEvent *pendingEvent = NULL;
SQLDataControlConsumer *consumer = NULL;
{
if (data == NULL)
{
- LogDebug("data null, can not send result to JS Layer");
+ LoggerD("data null, can not send result to JS Layer");
return;
}
for (size_t index = 0; index < result.size(); index++)
{
- LogDebug(result[index]);
+ LoggerD(result[index]);
}
if (result.size() < 3)
}
catch (const WrtDeviceApis::Commons::Exception& ex)
{
- LogError("Exception: " << ex.GetMessage());
+ LoggerE("Exception: " << ex.GetMessage());
event->setExceptionCode(ex.getCode());
event->setErrorMsg(ex.GetMessage());
}
static void sqldataControlInsertCallback(bundle* b, int request_code, appsvc_result_val res, void* data)
{
- LogDebug("Enter");
+ LoggerD("Enter");
EventInsertPendingEvent *pendingEvent = NULL;
{
if (data == NULL)
{
- LogDebug("data null, can not send result to JS Layer");
+ LoggerD("data null, can not send result to JS Layer");
return;
}
for (size_t index = 0; index < result.size(); index++)
{
- LogDebug(result[index]);
+ LoggerD(result[index]);
}
if (result.size() < 2)
std::stringstream sstr(result[2]);
long insertRowid = 0;
sstr >> insertRowid;
- LogDebug(result[2] << insertRowid);
+ LoggerD(result[2] << insertRowid);
event->setRowId(insertRowid);
event->setExceptionCode(WrtDeviceApis::Commons::ExceptionCodes::None);
}
catch (const WrtDeviceApis::Commons::Exception& ex)
{
- LogError("Exception: " << ex.GetMessage());
+ LoggerE("Exception: " << ex.GetMessage());
event->setExceptionCode(ex.getCode());
event->setErrorMsg(ex.GetMessage());
}
static void sqldataControlDeleteCallback(bundle* b, int request_code, appsvc_result_val res, void* data)
{
- LogDebug("Enter");
+ LoggerD("Enter");
if (data == NULL)
{
- LogDebug("Data or Bundle error");
+ LoggerD("Data or Bundle error");
return;
}
{
if (data == NULL)
{
- LogDebug("data null, can not send result to JS Layer");
+ LoggerD("data null, can not send result to JS Layer");
return;
}
for (size_t index = 0; index < result.size(); index++)
{
- LogDebug(result[index]);
+ LoggerD(result[index]);
}
if (result.size() < 2)
}
catch (const WrtDeviceApis::Commons::Exception& ex)
{
- LogError("Exception: " << ex.GetMessage());
+ LoggerE("Exception: " << ex.GetMessage());
event->setExceptionCode(ex.getCode());
event->setErrorMsg(ex.GetMessage());
}
static void sqldataControlUpdateCallback(bundle* b, int request_code, appsvc_result_val res, void* data)
{
- LogDebug("Enter");
+ LoggerD("Enter");
EventUpdatePendingEvent* pendingEvent = NULL;
SQLDataControlConsumer *consumer = NULL;
{
if (data == NULL)
{
- LogDebug("data null, can not send result to JS Layer");
+ LoggerD("data null, can not send result to JS Layer");
return;
}
for (size_t index = 0; index < result.size(); index++)
{
- LogDebug(result[index]);
+ LoggerD(result[index]);
}
if (result.size() < 2)
}
catch (const WrtDeviceApis::Commons::Exception& ex)
{
- LogError("Exception: " << ex.GetMessage());
+ LoggerE("Exception: " << ex.GetMessage());
event->setExceptionCode(ex.getCode());
event->setErrorMsg(ex.GetMessage());
}
}
SQLDataControlConsumer::SQLDataControlConsumer()
{
- LogDebug("Enter");
+ LoggerD("Enter");
m_appId = "";
m_type = "";;
SQLDataControlConsumer::~SQLDataControlConsumer()
{
- LogDebug("Enter");
+ LoggerD("Enter");
}
DPL::Mutex SQLDataControlConsumer::m_mutex;
if (m_appId.length() == 0)
{
- LogDebug("need " << passId);
+ LoggerD("need " << passId);
if( pkgmgr_datacontrol_get_info(passId, OSP_PKGINFO_SQL_TYPE, &appId, &access) < 0)
{
ThrowMsg(WrtDeviceApis::Commons::PlatformException, "get appId error");
}
- LogDebug("need2");
+ LoggerD("need2");
if (appId)
{
- LogDebug(appId);
+ LoggerD(appId);
appIdStr = appId;
free(appId);
}
void SQLDataControlConsumer::OnRequestReceived(const EventInsertPtr& event)
{
- LogDebug("Enter");
+ LoggerD("Enter");
bundle* passData = NULL;
try
{
event->setExceptionCode(ex.getCode());
event->setErrorMsg(ex.GetMessage());
- LogError("Exception: " << ex.GetMessage());
+ LoggerE("Exception: " << ex.GetMessage());
}
void SQLDataControlConsumer::OnRequestReceived(const EventDeletePtr& event)
{
- LogDebug("Enter");
+ LoggerD("Enter");
bundle* passData = NULL;
try
}
catch (const WrtDeviceApis::Commons::Exception& ex)
{
- LogError("Exception: " << ex.GetMessage());
+ LoggerE("Exception: " << ex.GetMessage());
event->setExceptionCode(ex.getCode());
event->setErrorMsg(ex.GetMessage());
}
void SQLDataControlConsumer::OnRequestReceived(const EventSelectPtr& event)
{
- LogDebug("Enter");
+ LoggerD("Enter");
bundle* passData = NULL;
try
}
catch (const WrtDeviceApis::Commons::Exception& ex)
{
- LogError("Exception: " << ex.GetMessage());
+ LoggerE("Exception: " << ex.GetMessage());
event->setExceptionCode(ex.getCode());
event->setErrorMsg(ex.GetMessage());
}
void SQLDataControlConsumer::OnRequestReceived(const EventUpdatePtr& event)
{
- LogDebug("Enter");
+ LoggerD("Enter");
bundle* passData = NULL;
try
}
catch (const WrtDeviceApis::Commons::Exception& ex)
{
- LogError("Exception: " << ex.GetMessage());
+ LoggerE("Exception: " << ex.GetMessage());
event->setExceptionCode(ex.getCode());
event->setErrorMsg(ex.GetMessage());
}