#include <aul.h>
#include <bundle.h>
#include <appsvc/appsvc.h>
-#include <heynoti.h>
+#include <vconf.h>
#include <FBaseObject.h>
#include <FBaseString.h>
}
result
-_Aul::SendResult(bundle* b, appsvc_result_val res, bool isSubMode)
+_Aul::SendResult(bundle* b, appsvc_result_val res, bool isSubMode, bool isServiceApp)
{
// to skip error handling, of appsvc_send_result, use aul_send_service_result() directly.
//int ret = appsvc_send_result(b, res);
_AppArg::UpdateSubMode(b);
}
+ if (isServiceApp)
+ {
+ _AppArg::UpdateServiceApp(b);
+ }
+
const int aul_ret = aul_send_service_result(b);
result r = GetConvertedResult(aul_ret, "SendResult");
return r;
}
+typedef void (* cbForVconf)(keynode_t* node, void *pData);
+
result
-_Aul::SetPowerOffNotiListener( void (*powerOffCb)(void *pData), void *pData)
+_Aul::SetPowerOffNotiListener( void (*powerOffCb)(void* node, void *pData), void *pData)
{
+
+#if 1
+ int ret = vconf_notify_key_changed(VCONFKEY_SYSMAN_POWER_OFF_STATUS, (cbForVconf)powerOffCb, pData);
+ SysTryReturnResult(NID_SYS, ret == 0, E_SYSTEM, "It failed to set power off");
+#else
int heyFd = heynoti_init();
SysTryReturnResult(NID_APP, heyFd >= 0, E_SYSTEM, "heynoti_init failed.");
ret = heynoti_attach_handler(heyFd);
SysTryReturnResult(NID_APP, ret >= 0, E_SYSTEM, "heynoti_attach_handler failed.");
+#endif
return E_SUCCESS;
}
String temp;
// [INFO] ugly code for submode callee
appId.SubString(11, temp);
- if (temp == L"_AppControl")
+ if (temp == String(SUBMODE_NAME))
{
String id;
appId.SubString(0, 10, id);