Fix for 42792
[apps/osp/Call.git] / src / CallAppFrame.cpp
1 //
2 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
3 //
4 // Licensed under the Flora License, Version 1.1 (the License);
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
7 //
8 //     http://floralicense.org/license/
9 //
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an AS IS BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
15 //
16 #include "CallApp.h"
17 #include "CallAppFrame.h"
18 #include "CallPhoneFormFactory.h"
19 #include "CallPanelFactory.h"
20 #include "CallSceneRegister.h"
21
22 using namespace Tizen::App;
23 using namespace Tizen::Base;
24 using namespace Tizen::Ui;
25 using namespace Tizen::Ui::Controls;
26 using namespace Tizen::Ui::Scenes;
27
28
29 CallAppFrame::CallAppFrame(void)
30 {
31 }
32
33 CallAppFrame::~CallAppFrame(void)
34 {
35 }
36
37 result
38 CallAppFrame::OnInitializing(void)
39 {
40         result r = E_FAILURE;
41         CallApp* pPhoneApp = static_cast<CallApp*>(UiApp::GetInstance());
42         AppLogDebug("Enter");
43
44         //Initialize factory methods and register all scenes.
45         r = SceneRegister::RegisterAllScenes();
46         TryReturn(r == E_SUCCESS, r , "Scene registration failed");
47
48         //start initial Form
49         if (pPhoneApp->GetInitialScene().IsEmpty() == false)
50         {
51                 //goto next scene
52                 SceneManager* pSceneManager = SceneManager::GetInstance();
53                 r = pSceneManager->GoForward( ForwardSceneTransition(pPhoneApp->GetInitialScene(),
54                                 SCENE_TRANSITION_ANIMATION_TYPE_NONE, SCENE_HISTORY_OPTION_NO_HISTORY,SCENE_DESTROY_OPTION_KEEP),
55                                 pPhoneApp->GetAppLaunchArguments());
56         }
57         AppLogDebug("Exit %d",r);
58         return r;
59 }
60
61 result
62 CallAppFrame::OnTerminating(void)
63 {
64         result r = E_SUCCESS;
65
66         // TODO:
67         // Add your termination code here
68         return r;
69 }