c29efbd79f20b0d1020f034410e3586d6bb762f5
[apps/osp/Call.git] / inc / CallConfCallerListForm.h
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
17 /**
18  * @file                CallConfCallerListForm.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 "CallBaseForm.h"
30 #include "CallTypes.h"
31
32 class AppCallInfo;
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         , public Tizen::Ui::Controls::IFormBackEventListener
44         , public Tizen::Ui::Controls::ITableViewItemProvider
45         , public Tizen::Ui::IOrientationEventListener
46 {
47 public:
48         ConfCallerListForm(void);
49         virtual ~ConfCallerListForm(void);
50         //From BaseForm
51         virtual void Initialize(void);
52
53 public:
54         virtual result OnInitializing(void);
55         virtual result OnTerminating(void);
56         virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId);
57         virtual void OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId, const Tizen::Ui::Scenes::SceneId& currentSceneId, Tizen::Base::Collection::IList* pArgs);
58         virtual void OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId, const Tizen::Ui::Scenes::SceneId& nextSceneId);
59         //From IOrientationEventListener
60         virtual void OnOrientationChanged(const Tizen::Ui::Control& source, Tizen::Ui::OrientationStatus orientationStatus);
61
62         //Disable all the elements
63         void DisableAllControls(void);
64         //
65         // From 'Container'.
66         // Called when the container needs to draw itself. @n
67         // Users can override this method to display user-specific drawings. @n
68         // This method is called after the container has drawn itself, but just before the container draws its child controls.
69         //
70         virtual result OnDraw(void);
71         // Handle change in conf call list
72         void HandleParticipantsChanged(void);
73
74         virtual void OnTimerExpired(Tizen::Base::Runtime::Timer& timer);
75         virtual void OnFormBackRequested(Tizen::Ui::Controls::Form& source);
76         //ITableViewItemProvider
77         virtual int GetItemCount(void);
78         virtual Tizen::Ui::Controls::TableViewItem* CreateItem(int itemIndex, int itemWidth);
79         virtual bool DeleteItem(int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
80         virtual void UpdateItem(int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem);
81         virtual int GetDefaultItemHeight(void);
82
83 private:
84         // Add the action listener for the buttons
85         void AddActionListener(const Tizen::Base::String& keyName, CommandIds cmdId);
86         // Method to show call duration/state(held) for call in progress
87         void ShowTimerInfo(const Tizen::Base::String& timerLblName, long long startTime = 0);
88         // Method to set "Hold" Button status
89         void SetHoldButtonStatus(bool isCallOnHold);
90         void CreateItemAndAddActionListener(  Tizen::Ui::Controls::Button& splitButton, Tizen::Ui::Controls::Button& endButton,  Tizen::Ui::Controls::Label& callerLabel, SplitConfCallerCmdIds splitCmdId,EndConfCallerCmdIds EndCmdId, const Tizen::Base::String& displayName);
91         void CreateTableView(void);
92
93 private:
94         AppCallInfo* __pConfCallInfo;
95         //Timer used to show call time
96         Tizen::Base::Runtime::Timer* __pConfCallTimer;
97         Tizen::Ui::Controls::TableView* __pList;
98         bool            __isCallSplit;
99 };
100
101 #endif  //_PHN_CONF_CALLER_LIST_FORM_H_