Tizen 2.0 Release
[apps/osp/Phone.git] / inc / PhnConfCallerListForm.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                PhnConfCallerListForm.h
19  * @brief               This is the header file for the %ConfCallerListForm class.
20  *
21  * This header file contains the declarations for %ConfCallerListForm class.
22  */
23 #ifndef _PHN_CONF_CALLER_LIST_FORM_H_
24 #define _PHN_CONF_CALLER_LIST_FORM_H_
25
26 #include <FBase.h>
27 #include <FApp.h>
28 #include <FUi.h>
29 #include "PhnBaseForm.h"
30 #include "PhnTypes.h"
31
32 class CallInfo;
33
34 /**
35  * @class ConfCallerListForm
36  * @brief This class presents a form based UI for participants list of conference call.
37  *
38  */
39 class ConfCallerListForm
40         : public BaseForm
41         , public Tizen::Ui::Scenes::ISceneEventListener
42         , public Tizen::Base::Runtime::ITimerEventListener
43 {
44 public:
45         ConfCallerListForm(void);
46         virtual ~ConfCallerListForm(void);
47         //From BaseForm
48         virtual void Initialize(void);
49
50 public:
51         virtual result OnInitializing(void);
52         virtual result OnTerminating(void);
53         virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId);
54         virtual void OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId, const Tizen::Ui::Scenes::SceneId& currentSceneId, Tizen::Base::Collection::IList* pArgs);
55         virtual void OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId, const Tizen::Ui::Scenes::SceneId& nextSceneId);
56
57         //Disable all the elements
58         void DisableAllControls(void);
59         //
60         // From 'Container'.
61         // Called when the container needs to draw itself. @n
62         // Users can override this method to display user-specific drawings. @n
63         // This method is called after the container has drawn itself, but just before the container draws its child controls.
64         //
65         virtual result OnDraw(void);
66         // Handle change in conf call list
67         void HandleCallChange(void);
68
69         virtual void OnTimerExpired(Tizen::Base::Runtime::Timer& timer);
70
71 private:
72         // Add the action listener for the buttons
73         void AddActionListener(const Tizen::Base::String& keyName, CommandIds cmdId);
74         // Activate the panels to be shown according to the number of calls
75         void ActivatePanels(void);
76         // Activate each individual element in the panel
77         void ActivatePanelAndAddActionListener(const Tizen::Base::String& panelName, const Tizen::Base::String& lineLabelName, const Tizen::Base::String& splitButtonName, const Tizen::Base::String& endButtonName, const Tizen::Base::String& callerLabelName, SplitConfCallerCmdIds splitCmdId, EndConfCallerCmdIds EndCmdId, const Tizen::Base::String& displayName);
78         // Method to show call duration/state(held) for call in progress
79         void ShowTimerInfo(const Tizen::Base::String& timerLblName, long long startTime = 0);
80         // Method to set "Hold" Button status
81         void SetHoldButtonStatus(bool isCallOnHold);
82
83 private:
84         CallInfo* __pConfCallInfo;
85         //Timer used to show call time
86         Tizen::Base::Runtime::Timer* __pConfCallTimer;
87 };
88
89 #endif  //_PHN_CONF_CALLER_LIST_FORM_H_