2 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
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
8 // http://floralicense.org/license/
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.
18 * @file CallEndCallForm.h
19 * @brief This is the header file for the %EndCallForm class.
21 * This header file contains the declarations for %EndCallForm class.
23 #ifndef _PHN_END_CALL_FORM_H_
24 #define _PHN_END_CALL_FORM_H_
29 #include "CallBaseForm.h"
30 #include "CallTypes.h"
31 #include "CallIAppStateChangeListner.h"
33 class CallButtonsPanel;
37 * @brief This class presents a form based UI for end call scenarios.
42 , public Tizen::Ui::Scenes::ISceneEventListener
43 , public Tizen::Base::Runtime::ITimerEventListener
44 , public Tizen::App::IAppControlResponseListener
45 , public IAppStateChangeListener
46 , public Tizen::Ui::IOrientationEventListener
50 virtual ~EndCallForm(void);
52 virtual void Initialize(void);
55 virtual result OnInitializing(void);
56 virtual result OnTerminating(void);
57 virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId);
59 virtual void OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId, const Tizen::Ui::Scenes::SceneId& currentSceneId, Tizen::Base::Collection::IList* pArgs);
60 virtual void OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId, const Tizen::Ui::Scenes::SceneId& nextSceneId);
63 * Called when the container needs to draw itself. @n
64 * Users can override this method to display user-specific drawings. @n
65 * This method is called after the container has drawn itself, but just before the container draws its child controls.
67 virtual result OnDraw(void);
69 virtual void OnTimerExpired(Tizen::Base::Runtime::Timer& timer);
72 * Called when the application control is completed.
73 * @param[in] providerId The provider ID
74 * @param[in] operationId The operation ID used in application control invocation
75 * @param[in] pResultList The list of callback strings of application control
76 * @remarks The specified @c pResultList provides the result code for the first array element.
77 * @remarks When the invoked application control is terminated without sending a result,
78 * then this method is invoked with @c pResultList and it contains App::APPCONTROL_RESULT_TERMINATED.
79 * @remarks Switching forms using Tizen::Ui::Controls::Frame::SetCurrentForm() in this listener disables the upcoming form
80 * (UiApp::OnForeground()). If UiApp::OnForeground() is being used in the application logic,
81 * it is recommended to avoid switching forms in this listener.
82 * @see Tizen::App::AppControl
84 virtual void OnAppControlCompleteResponseReceived(const Tizen::App::AppId& appId, const Tizen::Base::String& operationId, Tizen::App::AppCtrlResult appControlResult, const Tizen::Base::Collection::IMap* pExtraData);
85 //Used to set the contact button state in the end call form
86 void SetContactButtonState(bool showState);
87 //To check if contact is present in Address bool
88 bool IsContactPresent(void);
89 //Called when App comes to foreground
90 virtual void OnForeground(void);
91 //Called when App goes to background
92 virtual void OnBackground(void);
93 //From IOrientationEventListener
94 virtual void OnOrientationChanged(const Tizen::Ui::Control& source, Tizen::Ui::OrientationStatus orientationStatus);
97 //initialise the end call panel
98 void InitializeCallButtonsPanel(void);
99 //Add the action listener for the buttons
100 void AddKeyPadActionListener(const Tizen::Base::String& keyName, CommandIds cmdId);
101 // Method to show phone number on screen for all calls except conference call.
102 void ShowPhoneNumber(const Tizen::Base::String& phoneNumber, const Tizen::Base::String& lblName);
103 // Method to show caller name and photo for all calls.
104 void ShowPersonDetails(const Tizen::Base::String& phoneNumber, const Tizen::Base::String& nameLblName, const Tizen::Base::String& photoLblName, AppCallInfo* pCallInfo);
105 // Method to show thumbnail
106 void ShowCallersPhotoThumbnail(const Tizen::Graphics::Bitmap& pPhotoId);
107 //private method to handle whether to close App or goto initial scene, after no more active calls are left.
108 void HandleLastCallCompletion(void);
109 //Handle Add to contacts button press
110 void HandleAddToContacts(void);
111 //Method to show thumbnail image
112 void ShowThumbnailImage(const Tizen::Graphics::Bitmap* pPhotoId,const Tizen::Base::String& photoLabel);
115 //Custom Buttons Panel
116 CallButtonsPanel* __pCallButtonsPanel;
117 Tizen::Base::String* __pContactNumber;
118 //Timer used to show End call scene for 3 sec
119 Tizen::Base::Runtime::Timer* __pEndCallEventTimer;
120 Tizen::Ui::Controls::Label* __pSmallPhotoLabel;
121 bool __isMsgAppControlLaunched;
122 bool __isContactAppControlLaunched;
123 bool __isContactPresent;
126 #endif // _PHN_END_CALL_FORM_H_