#include <FApp.h>
class AccountApp
- : public Tizen::App::UiApp
+ : public Tizen::App::UiApp,
+ public Tizen::App::IAppControlProviderEventListener
{
public:
AccountApp(void);
virtual void OnForeground(void);
static Tizen::App::UiApp* CreateInstance(void);
+
+ virtual void OnAppControlRequestReceived (RequestId reqId, const Tizen::Base::String &operationId, const Tizen::Base::String *pUriData, const Tizen::Base::String *pMimeType, const Tizen::Base::Collection::IMap *pExtraData);
+
};
#endif // _ACC_ACCOUNT_APP_H_
*/
#include <FApp.h>
+#include <FBase.h>
+#include <FSocial.h>
#include <FUi.h>
#include "AccAccountApp.h"
#include "AccMainForm.h"
#include "AppResourceId.h"
#include "AccAccountPresentationModel.h"
+
using namespace Tizen::App;
+using namespace Tizen::Base;
+using namespace Tizen::Base::Collection;
+using namespace Tizen::Social;
using namespace Tizen::Ui::Controls;
AccountApp::AccountApp(void)
bool
AccountApp::OnAppInitializing(Tizen::App::AppRegistry& appRegistry)
{
+ AppControlProviderManager::GetInstance()->SetAppControlProviderEventListener(this);
return true;
}
bool
AccountApp::OnAppInitialized(void)
{
+
+ AccountAccessor* pAccountAccessor = AccountAccessor::GetInstance();
+ IList* pAccountList = pAccountAccessor->GetAllAccountsN();
+ if (pAccountList == null)
+ {
+ return false;
+ }
+ pAccountList->RemoveAll(true);
+ delete pAccountList;
+
MainFrame* pAccountFrame = new (std::nothrow) MainFrame();
pAccountFrame->Construct();
AddFrame(*pAccountFrame);
TryReturnVoid(pCurrentForm, "There is no current form.");
pCurrentForm->SendUserEvent(0, null);
}
+void
+AccountApp::OnAppControlRequestReceived (RequestId reqId, const Tizen::Base::String &operationId, const Tizen::Base::String *pUriData, const Tizen::Base::String *pMimeType, const Tizen::Base::Collection::IMap *pExtraData)
+{
+ AppLog("AccountApp::OnAppControlRequestReceived called");
+ AccountAccessor* pAccountAccessor = AccountAccessor::GetInstance();
+ IList* pAccountList = pAccountAccessor->GetAllAccountsN();
+ if (pAccountList == null)
+ {
+ AppControlProviderManager::GetInstance()->SendAppControlResult(reqId,APP_CTRL_RESULT_TERMINATED,null);
+ }
+ else
+ {
+ pAccountList->RemoveAll(true);
+ delete pAccountList;
+ }
+}