void
AccessoryMonitor::OnDataRouterDataReceivedN(const char* buffer, int length)
{
- result r = E_SUCCESS;
+ //result r = E_SUCCESS;
SysLog(NID_SYS, "serial data is forwarded to AccessoryMonitor class");
SysTryReturnVoidResult(NID_SYS, buffer != null, E_INVALID_ARG, "[E_INVALID_ARG] buffer should not be null.");
if(buf.StartsWith(L"DueTime", 0) == true)
{
- ret = sscanf(convertedString.get(), "DueTime='%d/%d/%d %d:%d:%d' LaunchPeriod='%d'%s", &(pConvertedTime->tm_mon), &(pConvertedTime->tm_mday), &(pConvertedTime->tm_year), &(pConvertedTime->tm_hour), &(pConvertedTime->tm_min), &(pConvertedTime->tm_sec), &period, &garbage);
+ ret = sscanf(convertedString.get(), "DueTime='%d/%d/%d %d:%d:%d' LaunchPeriod='%d'%s", &(pConvertedTime->tm_mon), &(pConvertedTime->tm_mday), &(pConvertedTime->tm_year), &(pConvertedTime->tm_hour), &(pConvertedTime->tm_min), &(pConvertedTime->tm_sec), &period, garbage);
SysTryReturnResult(NID_SYS, ret == 7, E_INVALID_FORMAT, "The specified condition format is not compatible.");
}
else if(buf.StartsWith(L"DateTime", 0) == true)
{
- ret = sscanf(convertedString.get(), "DateTime='%d/%d/%d %d:%d:%d'%s", &(pConvertedTime->tm_mon), &(pConvertedTime->tm_mday), &(pConvertedTime->tm_year), &(pConvertedTime->tm_hour), &(pConvertedTime->tm_min), &(pConvertedTime->tm_sec), &garbage);
+ ret = sscanf(convertedString.get(), "DateTime='%d/%d/%d %d:%d:%d'%s", &(pConvertedTime->tm_mon), &(pConvertedTime->tm_mday), &(pConvertedTime->tm_year), &(pConvertedTime->tm_hour), &(pConvertedTime->tm_min), &(pConvertedTime->tm_sec), garbage);
SysTryReturnResult(NID_SYS, ret == 6, E_INVALID_FORMAT, "The specified condition format is not compatible.");
}
else
unique_ptr<char[]> convertedString(_StringConverter::CopyToCharArrayN(buf));
SysTryReturnResult(NID_SYS, convertedString.get() != null, E_OUT_OF_MEMORY, "Memory allocation failure.");
- ret = sscanf(convertedString.get(), "'%*s %d:%d:%d'%s", &(pConvertedTime->tm_hour), &(pConvertedTime->tm_min), &(pConvertedTime->tm_sec), &garbage);
+ ret = sscanf(convertedString.get(), "'%*s %d:%d:%d'%s", &(pConvertedTime->tm_hour), &(pConvertedTime->tm_min), &(pConvertedTime->tm_sec), garbage);
SysTryReturnResult(NID_SYS, ret == 3, E_INVALID_FORMAT, "The specified condition format is not compatible.");
DateTime currentTime;
char* packageName = null;
service_h service = null;
DateTime validateCheck;
- _AppLaunchCondition* pReservedCondition = null;
+ //_AppLaunchCondition* pReservedCondition = null;
if(appLaunchCondition.GetConditionString().StartsWith(L"WeeklyTime", 0) == true)
{
{
SysLog(NID_APP, "Enter.");
- HashMap packageFilterMap(SingleObjectDeleter);
+ HashMap packageFilterMap;
packageFilterMap.Construct();
- String* pDownloadKey = new String("http://tizen.org/package/downloaded");
- SysTryReturnVoidResult(NID_APP, pDownloadKey != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Creating a key gets failed.");
+ String downloadKey = "http://tizen.org/package/downloaded";
+ Boolean downloadValue = false;
- Boolean* pDownloadValue = new Boolean(false);
- SysTryReturnVoidResult(NID_APP, pDownloadValue != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Creating a value gets failed.");
+ result r = packageFilterMap.Add(&downloadKey, &downloadValue);
- result r = packageFilterMap.Add(pDownloadKey, pDownloadValue);
+ String extKey = "http://tizen.org/package/tpk";
+ Boolean extValue = true;
- String* pExtKey = new String("http://tizen.org/package/tpk");
- SysTryReturnVoidResult(NID_APP, pExtKey != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Creating a key gets failed.");
-
- Boolean* pExtValue = new Boolean(true);
- SysTryReturnVoidResult(NID_APP, pExtValue != null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Creating a value gets failed.");
-
- r = packageFilterMap.Add(pExtKey, pExtValue);
+ r = packageFilterMap.Add(&extKey, &extValue);
IList* pList = _PackageManagerImpl::GetInstance()->GetPackageInfoListN(packageFilterMap);
if (pList)
{
case HANDLER_REQUEST_INSTALL_COMPLETE:
{
- String isLaunchOnBoot = _ContextManager::_Util::QueryFeatureFromPackageManager(*pPackageName, *pExecName, L"LaunchOnBoot" );
+ const String& isLaunchOnBoot = _ContextManager::_Util::QueryFeatureFromPackageManager(*pPackageName, *pExecName, L"LaunchOnBoot" );
if ( isLaunchOnBoot == L"True")
{
// String realId = *pAppId + '.' + *pExecName;
_ConditionHandler* pHandler = null;
for (int i =0; i < __handlers.GetCount(); i ++)
{
- pHandler = null;
+ _ConditionHandler* pHandler = null;
r = __handlers.GetAt(i, pHandler);
delete pHandler;
}
}
pSections->RemoveAll(true);
+ delete pSections;
SysLog(NID_APP,"Exit.");
return E_SUCCESS;
CATCH:
SysLog(NID_APP,"Catch.");
pSections->RemoveAll(true);
+ delete pSections;
return r;
}
{
result r = E_SUCCESS;
+ delete __pLib;
+
SysTryCatch(NID_SYS, __pCommunicationDispatcher != null, r = E_SYSTEM, E_SYSTEM, "_CommunicationDispatcher is not initiated.");
r = __pCommunicationDispatcher->RemoveCommunicationEventListener(*this);