RemoteMessagePort::SendMessage() returns E_SYSTEM when the socket receiver buffer...
[platform/framework/native/appfw.git] / src / app / FApp_AppImpl.cpp
index e831e70..e41f92a 100644 (file)
@@ -322,10 +322,6 @@ _AppImpl::OnService(service_s* service, void* user_data)
                        }
                        free(pBuf);
                }
-               else
-               {
-                       SysLog(NID_APP, "It is failed to get multi-window value: %d", errVal);
-               }
 
                // call for callbacks
                // ptr to member function
@@ -351,6 +347,29 @@ _AppImpl::OnService(service_s* service, void* user_data)
 
                // call for callbacks
                // ptr to member function
+               (pAppImpl->*pAppImpl->__pRequestHandler)(service, req, handler);
+
+               std::unique_ptr<char[], charDeleter> pOperation(null);
+               char* pBuf = null;
+
+               int errVal = service_get_operation(service, &pBuf);
+               pOperation.reset(pBuf);
+
+               if((errVal == SERVICE_ERROR_NONE) && (!strcmp((const char*)pOperation.get(), "osp.operation.ALARM")))
+               {
+                       std::unique_ptr<char[], charDeleter> pAlarmId(null);
+                       char* pBuf = null;
+
+                       errVal = service_get_extra_data(service, SERVICE_DATA_ALARM_ID, &pBuf);
+                       pAlarmId.reset(pBuf);
+                       SysTryReturnVoidResult(NID_SYS, errVal == SERVICE_ERROR_NONE, E_SYSTEM, "It is failed to get reserved alarm id.");
+                       int alarmId = atoi((const char*)pAlarmId.get());
+
+                       _AlarmManager* pAlarmManager = _AlarmManager::GetInstance();
+                       pAlarmManager->OnAlarmExpired(alarmId);
+
+                       return;
+               }
        }
 
        pAppImpl->__pIAppImpl->OnService(service, initialLaunch);