FApp_AppSettingImpl.cpp
FApp_LongevityManager.cpp
FApp_AppControlResponseEvent.cpp
+ FApp_AppLifecycleEvent.cpp
)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_SINGLETON_CLEANUP -fvisibility=hidden")
--- /dev/null
+//\r
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.\r
+//\r
+// Licensed under the Apache License, Version 2.0 (the License);\r
+// you may not use this file except in compliance with the License.\r
+// You may obtain a copy of the License at\r
+//\r
+// http://www.apache.org/licenses/LICENSE-2.0\r
+//\r
+// Unless required by applicable law or agreed to in writing, software\r
+// distributed under the License is distributed on an "AS IS" BASIS,\r
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+// See the License for the specific language governing permissions and\r
+// limitations under the License.\r
+//\r
+\r
+/**\r
+ * @file FApp_AppLifecycleEvent.cpp\r
+ * @brief This is the implementation for the _AppLifecycleEvent.cpp class.\r
+ */\r
+\r
+#include <FBaseSysLog.h>\r
+\r
+#include "FApp_Types.h"\r
+#include "FApp_AppLifecycleEvent.h"\r
+#include "FApp_AppLifecycleEventArg.h"\r
+#include "FApp_IAppLifecycleEventListener.h"\r
+\r
+using namespace Tizen::Base;\r
+using namespace Tizen::Base::Runtime;\r
+\r
+\r
+namespace Tizen { namespace App\r
+{\r
+\r
+_AppLifecycleEventArg::_AppLifecycleEventArg(void)\r
+{\r
+}\r
+\r
+_AppLifecycleEventArg::_AppLifecycleEventArg(const AppId& appId, _AppLifecycleEventType appLifecycleEventType)\r
+ : __appId(appId)\r
+ , __appLifecycleEventType(appLifecycleEventType)\r
+{\r
+}\r
+\r
+_AppLifecycleEventArg::~_AppLifecycleEventArg(void)\r
+{\r
+}\r
+\r
+const AppId\r
+_AppLifecycleEventArg::GetAppId(void) const\r
+{\r
+ return __appId;\r
+}\r
+\r
+_AppLifecycleEventType\r
+\r
+_AppLifecycleEventArg::GetAppLifecycleEventType(void) const\r
+{\r
+ return __appLifecycleEventType;\r
+}\r
+\r
+///////////////////////////////////////////////////////\r
+//_AppLifecycleEvent\r
+///////////////////////////////////////////////////////\r
+result\r
+_AppLifecycleEvent::Construct(void)\r
+{\r
+ return _Event::Initialize();\r
+}\r
+\r
+void\r
+_AppLifecycleEvent::FireImpl(IEventListener& listener, const IEventArg& arg)\r
+{\r
+ _IAppLifecycleEventListener* pListener = dynamic_cast<_IAppLifecycleEventListener*>(&listener);\r
+ SysTryReturnVoidResult(NID_APP, pListener != null, E_INVALID_STATE, "Invalid listener : listener(0x%x), arg(0x%x)", &listener, &arg);\r
+\r
+ const _AppLifecycleEventArg* pEventArg = dynamic_cast<const _AppLifecycleEventArg*>(&arg);\r
+ SysTryReturnVoidResult(NID_APP, pEventArg != null, E_INVALID_STATE, "Invalid arg : listener(0x%x), arg(0x%x)", &listener, &arg);\r
+\r
+ pListener->OnAppLifecycleEventReceived(pEventArg->GetAppId(), pEventArg->GetAppLifecycleEventType());\r
+}\r
+\r
+} } // Tizen::App\r
+\r
#include "FApp_Aul.h"
#include "FSys_SystemInfoImpl.h"
+#include "FApp_AppLifecycleEvent.h"
+#include "FApp_AppLifecycleEventArg.h"
+#include "FApp_IAppLifecycleEventListener.h"
using namespace Tizen::App::Package;
using namespace Tizen::Base;
using namespace Tizen::Base::Collection;
_AppManagerImpl::Construct(void)
{
__appManagerEvent.Construct();
+ __appLifecycleEvent.Construct();
+ __appListForAppLifecycle.Construct(0, 0, __strHashCodeProvider, __comparer);
+ __mutex.Create();
_IAppManager* pMgr = _AppManagerProxy::GetService();
//todo : uncomment following _SysTryReturn or put assert.
return pMgr->ClearUserPreferenceForAppControlResolution(appId);
}
+result
+_AppManagerImpl::AddAppLifecycleEventListener(_IAppLifecycleEventListener& listener)
+{
+ return __appLifecycleEvent.AddListener(listener, false);
+}
+
+result
+_AppManagerImpl::RemoveAppLifecycleEventListener(_IAppLifecycleEventListener& listener)
+{
+ return __appLifecycleEvent.RemoveListener(listener);
+}
+
+result
+_AppManagerImpl::RegisterAppForAppLifecycleEvent(const AppId& appId)
+{
+ SysLog(NID_APP, "Enter");
+
+ result r = __mutex.Acquire();
+
+ bool isContained = false;
+ r = __appListForAppLifecycle.ContainsKey(appId, isContained);
+
+ int currentRefCnt = 0;
+ if(isContained)
+ {
+ r = __appListForAppLifecycle.GetValue(appId, currentRefCnt);
+ r = __appListForAppLifecycle.SetValue(appId, ++currentRefCnt);
+ }
+ else
+ {
+ r = __appListForAppLifecycle.Add(appId, currentRefCnt);
+
+ _IAppManager* pMgr = _AppManagerProxy::GetService();
+ SysTryReturnResult(NID_APP, pMgr, E_SYSTEM, "_AppManagerProxy::GetService() is failed.");
+
+ r = pMgr->RegisterAppForAppLifecycleEvent(appId, -1);
+ SysLog(NID_APP, "The appId(%ls) is registered.", appId.GetPointer());
+ }
+ r = __mutex.Release();
+
+ SysLog(NID_APP, "Exit");
+
+ return r;
+}
+
+result
+_AppManagerImpl::UnregisterAppForAppLifecycleEvent(const AppId& appId)
+{
+ SysLog(NID_APP, "Enter");
+
+ result r = __mutex.Acquire();
+
+ bool isContained = false;
+ r = __appListForAppLifecycle.ContainsKey(appId, isContained);
+
+ if(isContained)
+ {
+ int currentRefCnt = 0;
+ r = __appListForAppLifecycle.GetValue(appId, currentRefCnt);
+
+ currentRefCnt--;
+
+ if (currentRefCnt < 0)
+ {
+ r = __appListForAppLifecycle.Remove(appId);
+
+ _IAppManager* pMgr = _AppManagerProxy::GetService();
+ SysTryReturnResult(NID_APP, pMgr, E_SYSTEM, "_AppManagerProxy::GetService() is failed.");
+
+ r = pMgr->UnregisterAppForAppLifecycleEvent(appId, -1);
+
+ SysLog(NID_APP, "The appId(%ls) is unregistered.", appId.GetPointer());
+ }
+ else
+ {
+ r = __appListForAppLifecycle.SetValue(appId, currentRefCnt);
+ }
+ }
+ else
+ {
+ SysLog(NID_APP, "The appId(%ls) is not registered.", appId.GetPointer());
+ }
+
+ r = __mutex.Release();
+
+ SysLog(NID_APP, "Exit");
+
+ return r;
+
+}
+
+result
+_AppManagerImpl::OnAppLifecycleEventReceived(int clientId,const AppId& appId, _AppLifecycleEventType appLifecycleEventType)
+{
+ SysLog(NID_APP, "Enter appId(%ls), appLifecycleEventType(%d)", appId.GetPointer(), appLifecycleEventType);
+
+ _AppLifecycleEventArg* pArg = new (std::nothrow)_AppLifecycleEventArg(appId, appLifecycleEventType);
+ SysTryReturnResult(NID_APP, pArg != null, E_OUT_OF_MEMORY, "Memory allocation failed.");
+
+ __appLifecycleEvent.FireAsync(*pArg);
+ return E_SUCCESS;
+}
+
}} // Tizen::App
#include "FApp_AppManagerEventArg.h"
#include "FApp_AppManagerProxy.h"
#include "FApp_AppManagerIpcMessage.h"
+#include "FApp_IAppLifecycleEventListener.h"
namespace
{
IPC_BEGIN_MESSAGE_MAP(_AppManagerProxy, message)
IPC_MESSAGE_HANDLER_EX(AppManager_OnEventReceived, &client, OnEventReceived )
IPC_MESSAGE_HANDLER_EX(AppManager_OnTerminateApplicationRequested, &client, OnTerminateApplicationRequested )
+ IPC_MESSAGE_HANDLER_EX(AppManager_OnAppLifecycleEventReceived, &client, OnAppLifecycleEventReceived )
IPC_END_MESSAGE_MAP()
}
return response;
}
+result
+_AppManagerProxy::RegisterAppForAppLifecycleEvent(const AppId& appId, int clientId)
+{
+ SysLog(NID_APP, "begin.");
+ result response = E_SUCCESS;
+ std::auto_ptr<IPC::Message> pMsg (new (std::nothrow) AppManager_RegisterAppForAppLifecycleEvent(appId, &response));
+ result r = __pIpcClient->SendRequest(*pMsg.get());
+ SysTryReturn(NID_APP, !IsFailed(r), r, r, "SendRequest is failed.");
+
+ SysLog(NID_APP, "end.");
+ return response;
+}
+
+result
+_AppManagerProxy::UnregisterAppForAppLifecycleEvent(const AppId& appId, int clientId)
+{
+ SysLog(NID_APP, "begin.");
+ result response = E_SUCCESS;
+ std::auto_ptr<IPC::Message> pMsg (new (std::nothrow) AppManager_UnregisterAppForAppLifecycleEvent(appId, &response));
+ result r = __pIpcClient->SendRequest(*pMsg.get());
+ SysTryReturn(NID_APP, !IsFailed(r), r, r, "SendRequest is failed.");
+
+ SysLog(NID_APP, "end.");
+ return response;
+}
+
+void
+_AppManagerProxy::OnAppLifecycleEventReceived(const AppId& appId, int appLifecycleEventType)
+{
+ SysTryLog(NID_APP, __pServiceEventListener != null, "__pServiceEventListener instance must not be null.");
+
+ _AppLifecycleEventType eventType;
+
+ if (appLifecycleEventType == 0)
+ {
+ eventType = _APP_LIFECYCLE_EVENT_LAUNCH;
+ }
+ else if (appLifecycleEventType == 1)
+ {
+ eventType = _APP_LIFECYCLE_EVENT_TERMINATE;
+ }
+ else
+ {
+ SysLog(NID_APP, "Not expected appLifecycleEventType(%d)", appLifecycleEventType);
+ }
+
+ __pServiceEventListener->OnAppLifecycleEventReceived(-1, appId, eventType);
+}
+
} } // Tizen::App
--- /dev/null
+//\r
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.\r
+//\r
+// Licensed under the Apache License, Version 2.0 (the License);\r
+// you may not use this file except in compliance with the License.\r
+// You may obtain a copy of the License at\r
+//\r
+// http://www.apache.org/licenses/LICENSE-2.0\r
+//\r
+// Unless required by applicable law or agreed to in writing, software\r
+// distributed under the License is distributed on an "AS IS" BASIS,\r
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+// See the License for the specific language governing permissions and\r
+// limitations under the License.\r
+//\r
+\r
+/**\r
+ * @file FApp_AppLifecycleEvent.cpp\r
+ * @brief This is the implementation for the _AppLifecycleEvent.cpp class.\r
+ */\r
+\r
+#include <FBaseSysLog.h>\r
+\r
+#include "FApp_Types.h"\r
+#include "FApp_AppLifecycleEvent.h"\r
+#include "FApp_AppLifecycleEventArg.h"\r
+#include "FApp_IAppLifecycleEventListener.h"\r
+\r
+using namespace Tizen::Base;\r
+using namespace Tizen::Base::Runtime;\r
+\r
+\r
+namespace Tizen { namespace App\r
+{\r
+\r
+_AppLifecycleEventArg::_AppLifecycleEventArg(void)\r
+{\r
+}\r
+\r
+_AppLifecycleEventArg::_AppLifecycleEventArg(const AppId& appId, _AppLifecycleEventType appLifecycleEventType)\r
+ : __appId(appId)\r
+ , __appLifecycleEventType(appLifecycleEventType)\r
+{\r
+}\r
+\r
+_AppLifecycleEventArg::~_AppLifecycleEventArg(void)\r
+{\r
+}\r
+\r
+const AppId\r
+_AppLifecycleEventArg::GetAppId(void) const\r
+{\r
+ return __appId;\r
+}\r
+\r
+_AppLifecycleEventType\r
+_AppLifecycleEventArg::GetAppLifecycleEventType(void) const\r
+{\r
+ return __appLifecycleEventType;\r
+}\r
+\r
+///////////////////////////////////////////////////////\r
+//_AppLifecycleEvent\r
+///////////////////////////////////////////////////////\r
+result\r
+_AppLifecycleEvent::Construct(void)\r
+{\r
+ return _Event::Initialize();\r
+}\r
+\r
+void\r
+_AppLifecycleEvent::FireImpl(IEventListener& listener, const IEventArg& arg)\r
+{\r
+ _IAppLifecycleEventListener* pListener = dynamic_cast<_IAppLifecycleEventListener*>(&listener);\r
+ SysTryReturnVoidResult(NID_APP, pListener != null, E_INVALID_STATE, "Invalid listener : listener(0x%x), arg(0x%x)", &listener, &arg);\r
+\r
+ const _AppLifecycleEventArg* pEventArg = dynamic_cast<const _AppLifecycleEventArg*>(&arg);\r
+ SysTryReturnVoidResult(NID_APP, pEventArg != null, E_INVALID_STATE, "Invalid arg : listener(0x%x), arg(0x%x)", &listener, &arg);\r
+\r
+ pListener->OnAppLifecycleEventReceived(pEventArg->GetAppId(), pEventArg->GetAppLifecycleEventType());\r
+}\r
+\r
+} } // Tizen::App\r
+\r
--- /dev/null
+//\r
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.\r
+//\r
+// Licensed under the Apache License, Version 2.0 (the License);\r
+// you may not use this file except in compliance with the License.\r
+// You may obtain a copy of the License at\r
+//\r
+// http://www.apache.org/licenses/LICENSE-2.0\r
+//\r
+// Unless required by applicable law or agreed to in writing, software\r
+// distributed under the License is distributed on an "AS IS" BASIS,\r
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+// See the License for the specific language governing permissions and\r
+// limitations under the License.\r
+//\r
+\r
+/**\r
+ * @file FApp_AppLifecycleEvent.h\r
+ * @brief This is the header file of _AppLifecycleEvent\r
+ */\r
+\r
+#ifndef _FAPP_INTERNAL_APP_LIFECYCLE_EVENT_H_\r
+#define _FAPP_INTERNAL_APP_LIFECYCLE_EVENT_H_\r
+\r
+#include <FOspConfig.h>\r
+#include <FBaseRt_Event.h>\r
+\r
+namespace Tizen { namespace App\r
+{\r
+\r
+/**\r
+* @class _AppLifecycleEvent\r
+* @brief This class contains application lifecycle event\r
+* @since 2.2\r
+*/\r
+class _AppLifecycleEvent\r
+ : public Tizen::Base::Runtime::_Event\r
+{\r
+public:\r
+ result Construct(void);\r
+\r
+protected:\r
+ void FireImpl(Tizen::Base::Runtime::IEventListener& lstener, const Tizen::Base::Runtime::IEventArg& arg);\r
+\r
+}; //_AppLifecycleEvent\r
+\r
+} } // Tizen::App\r
+\r
+#endif // _FAPP_INTERNAL_APP_LIFECYCLE_EVENT_H_\r
+\r
--- /dev/null
+//\r
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.\r
+//\r
+// Licensed under the Apache License, Version 2.0 (the License);\r
+// you may not use this file except in compliance with the License.\r
+// You may obtain a copy of the License at\r
+//\r
+// http://www.apache.org/licenses/LICENSE-2.0\r
+//\r
+// Unless required by applicable law or agreed to in writing, software\r
+// distributed under the License is distributed on an "AS IS" BASIS,\r
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+// See the License for the specific language governing permissions and\r
+// limitations under the License.\r
+//\r
+\r
+/**\r
+ * @file FApp_AppLifecycleEventArg.h\r
+ * @brief This is the header file of _AppLifecycleEventArg class.\r
+ */\r
+\r
+#ifndef _FAPP_INTERNAL_APP_LIFECYCLE_EVENT_ARG_H_\r
+#define _FAPP_INTERNAL_APP_LIFECYCLE_EVENT_ARG_H_\r
+\r
+#include <FBaseObject.h>\r
+#include <FAppTypes.h>\r
+#include <FApp_Types.h>\r
+#include <FBaseRtIEventArg.h>\r
+\r
+#include "FApp_AppManagerEvent.h"\r
+\r
+namespace Tizen { namespace App\r
+{\r
+\r
+/**\r
+ * @class _AppLifecycleEventArg\r
+ * @brief\r
+ * @since 2.2\r
+ *\r
+ */\r
+class _OSP_EXPORT_ _AppLifecycleEventArg\r
+ : public Tizen::Base::Object\r
+ , public Tizen::Base::Runtime::IEventArg\r
+{\r
+public:\r
+ _AppLifecycleEventArg(void);\r
+ _AppLifecycleEventArg(const AppId& appId, _AppLifecycleEventType appType);\r
+ virtual ~_AppLifecycleEventArg(void);\r
+\r
+ const AppId GetAppId(void) const;\r
+ _AppLifecycleEventType GetAppLifecycleEventType(void) const;\r
+\r
+private:\r
+ AppId __appId;\r
+ _AppLifecycleEventType __appLifecycleEventType;\r
+\r
+}; //_AppLifecycleEventArg\r
+\r
+} } // Tizen::App\r
+\r
+#endif // _FAPP_INTERNAL_APP_LIFECYCLE_EVENT_ARG_H_\r
+\r
#include <FBaseRtIEventListener.h>
#include <FAppAppManager.h>
#include <FBaseSysLog.h>
+#include <FBaseStringHashCodeProvider.h>
+#include <FBaseComparerT.h>
#include "FApp_Types.h"
#include "FApp_AppManagerEvent.h"
#include "FApp_IAppManagerServiceEventListener.h"
+#include "FApp_AppLifecycleEvent.h"
namespace Tizen { namespace Base
{
class _IAppManagerEventListener;
class _IAppEventListener;
class _AppManagerEventArg;
+class _IAppLifecycleEventListener;
class _AppLifecycleManager
virtual result OnTerminateApplicationRequested(int clientId);
+ virtual result OnAppLifecycleEventReceived(int clientId, const AppId& appId, _AppLifecycleEventType appLifecycleEventType);
+
static void SetAppManagerService(_IAppManager* pAppManager );
_OSP_LOCAL_ Tizen::Base::Runtime::_LibraryImpl& GetUiLibraryImpl(void);
result ClearUserPreferenceForAppControlResolution(const AppId& appId);
+ result AddAppLifecycleEventListener(_IAppLifecycleEventListener& listener);
+
+ result RemoveAppLifecycleEventListener(_IAppLifecycleEventListener& listener);
+
+ result RegisterAppForAppLifecycleEvent(const AppId& appId);
+
+ result UnregisterAppForAppLifecycleEvent(const AppId& appId);
+
private:
_OSP_LOCAL_ _AppManagerImpl(void);
_AppLifecycleManager __lifeManager;
_AppManagerEvent __appManagerEvent;
Tizen::Base::Collection::LinkedListT<IActiveAppEventListener*> __activeAppEventListenerList;
+ Tizen::App::_AppLifecycleEvent __appLifecycleEvent;
+ Tizen::Base::Collection::HashMapT<Tizen::Base::String, int> __appListForAppLifecycle;
+ Tizen::Base::ComparerT<Tizen::Base::String> __comparer;
+ Tizen::Base::StringHashCodeProvider __strHashCodeProvider;
+ Tizen::Base::Runtime::Mutex __mutex;
friend class AppManager;
friend class _AppControlImpl;
IPC_MESSAGE_CONTROL1(AppManager_AddEventListener, int)
IPC_MESSAGE_CONTROL1(AppManager_RemoveEventListener, int)
IPC_MESSAGE_CONTROL0(AppManager_OnTerminateApplicationRequested)
+IPC_MESSAGE_CONTROL2(AppManager_OnAppLifecycleEventReceived, Tizen::App::AppId, int)
+IPC_SYNC_MESSAGE_CONTROL1_1(AppManager_RegisterAppForAppLifecycleEvent, Tizen::App::AppId, result)
+IPC_SYNC_MESSAGE_CONTROL1_1(AppManager_UnregisterAppForAppLifecycleEvent, Tizen::App::AppId, result)
class _IAppManagerServiceEventListener;
class _AppManagerEventArg;
+class _IAppLifecycleEventListener;
+
+
class _OSP_EXPORT_ _AppManagerProxy
: public _IAppManager
, public Tizen::Io::_IIpcClientEventListener
virtual result ClearUserPreferenceForAppControlResolution(const AppId& appId);
+ virtual result RegisterAppForAppLifecycleEvent(const AppId& appId, int clientId);
+
+ virtual result UnregisterAppForAppLifecycleEvent(const AppId& appId, int clientId);
+
static _IAppManager* GetService(void);
static void SetService(_IAppManager* pAppManager);
bool OnEventReceived(const Tizen::App::_AppManagerEventArg& arg);
void OnTerminateApplicationRequested(void);
+ void OnAppLifecycleEventReceived(const AppId& appId, int appLifecycleEventType);
private:
static _IAppManager* __pSelf;
--- /dev/null
+//\r
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.\r
+//\r
+// Licensed under the Apache License, Version 2.0 (the License);\r
+// you may not use this file except in compliance with the License.\r
+// You may obtain a copy of the License at\r
+//\r
+// http://www.apache.org/licenses/LICENSE-2.0\r
+//\r
+// Unless required by applicable law or agreed to in writing, software\r
+// distributed under the License is distributed on an "AS IS" BASIS,\r
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+// See the License for the specific language governing permissions and\r
+// limitations under the License.\r
+//\r
+\r
+/**\r
+ * @file FApp_IAppLifecycleEventListener.h\r
+ * @brief This is the header file for _IAppLifecycleEventListener class.\r
+ */\r
+\r
+#ifndef _FAPP_INTERNAL_IAPP_LIFECYCLE_EVENT_LISTENER_H_\r
+#define _FAPP_INTERNAL_IAPP_LIFECYCLE_EVENT_LISTENER_H_\r
+\r
+#include <FApp_Types.h>\r
+#include <FBaseRtIEventListener.h>\r
+\r
+namespace Tizen { namespace App {\r
+\r
+/**\r
+* @interface _IAppLifecycleEventListener\r
+* @brief This is a tagging interface that all event listeners must implement.\r
+*\r
+* The event listener can listen when the specific event, such as launch and terminate is fired.\r
+*\r
+*/\r
+class _IAppLifecycleEventListener\r
+ : virtual public Tizen::Base::Runtime::IEventListener\r
+{\r
+public:\r
+ /**\r
+ * This is the destructor for this class.\r
+ */\r
+ virtual ~_IAppLifecycleEventListener() {}\r
+\r
+ /**\r
+ * This method will be called when the application's lifecycle event gets triggerred.\r
+ */\r
+ virtual void OnAppLifecycleEventReceived(const AppId& appId, Tizen::App::_AppLifecycleEventType type) = 0;\r
+\r
+}; // _IAppLifecycleEventListener\r
+\r
+}} //Tizen::App\r
+\r
+#endif // _FAPP_INTERNAL_IAPP_LIFECYCLE_EVENT_LISTENER_H_\r
+\r
virtual bool IsUserPreferredAppForAppControlResolution(const AppId& appId) = 0;
virtual result ClearUserPreferenceForAppControlResolution(const AppId& appId) = 0;
+
+ virtual result RegisterAppForAppLifecycleEvent(const AppId& appId, int clientId) = 0;
+ virtual result UnregisterAppForAppLifecycleEvent(const AppId& appId, int clientId) = 0;
+
};
}} // Tizen::App
public:
virtual result OnServiceEventReceived(int clientId, const _AppManagerEventArg& arg) = 0;
virtual result OnTerminateApplicationRequested(int clientId) = 0;
+ virtual result OnAppLifecycleEventReceived(int clientId, const AppId& appId, _AppLifecycleEventType appLifecycleEventType) = 0;
+
}; // _IAppManagerServiceEventListener
} } // Tizen::App
_APP_EVENT_RAISE,
};
+enum _AppLifecycleEventType
+{
+ _APP_LIFECYCLE_EVENT_LAUNCH = 0,
+ _APP_LIFECYCLE_EVENT_TERMINATE,
+};
+
/**
* @enum _ApphandlerType
* Defines the application provider type