Tizen 2.0 Release
[apps/osp/Phone.git] / inc / PhnEmergencyDialForm.h
1 //
2 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
3 //
4 // Licensed under the Flora License, Version 1.0 (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
17 /**
18  * @file                PhnEmergencyDialForm.h
19  * @brief               This is the header file for the EmergencyDialForm class.
20  *
21  * This header file contains the declarations for EmergencyDialForm class.
22  */
23 #ifndef _PHN_EMERGENCY_DIAL_FORM_H_
24 #define _PHN_EMERGENCY_DIAL_FORM_H_
25
26 #include <FBase.h>
27 #include <FUi.h>
28
29 class DialerKeypad;
30 class ErrorMsgPopup;
31
32 /**
33  * @class EmergencyDialForm
34  * @brief This class presents Emergency dial form.
35  *
36  */
37 class EmergencyDialForm
38         : public Tizen::Ui::Controls::Form
39         , public Tizen::Ui::Scenes::ISceneEventListener
40         , public Tizen::Ui::IActionEventListener
41         , public IPopupClosedEventListener
42         , public Tizen::Ui::ITouchLongPressGestureEventListener
43 {
44 public:
45         EmergencyDialForm(void);
46         virtual ~EmergencyDialForm(void);
47         bool Initialize(void);
48
49 public:
50         virtual result OnInitializing(void);
51         virtual result OnTerminating(void);
52         virtual void OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId, const Tizen::Ui::Scenes::SceneId& currentSceneId, Tizen::Base::Collection::IList* pArgs);
53         virtual void OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId, const Tizen::Ui::Scenes::SceneId& nextSceneId);
54         virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId);
55
56         //Event Listeners from TouchLongPressGestureDetector
57         // Called when a long press gesture is detected.
58         virtual void OnLongPressGestureDetected(Tizen::Ui::TouchLongPressGestureDetector& gestureDetector);
59         //Called when a long press detection is canceled.
60         virtual void OnLongPressGestureCanceled(Tizen::Ui::TouchLongPressGestureDetector& gestureDetector){}
61
62         //Event Listener method from IPopupClosedEventListener
63         virtual void HandlePopupClosed(void);
64
65 private:
66         //Used to construct dialer keypad.
67         void ConstructKeypad(void);
68         //Used to show formatted contact number in text field.
69         void ShowFormattedText(Tizen::Ui::Controls::EditField* pEditField, int actionId);
70         //Used to prepare for MOCall and switch to emergency outgoing call screen.
71         void SwitchToOutgoingCallScreen(const Tizen::Base::String& contactNumber);
72
73 private:
74         DialerKeypad* __pDialKeypad;
75         ErrorMsgPopup* __pErrorMsgPopup;
76 };
77
78 #endif // _PHN_EMERGENCY_DIAL_FORM_H_