Fix for 44692 44624
[apps/osp/Call.git] / inc / CallOptionPopup.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                CallCallOptionPopup.h
19  * @brief               This is the header file for the %CallOptionPopup class.
20  *
21  * This header file contains the declarations for %CallOptionPopup class.
22  */
23 #ifndef _PHN_CALL_OPTION_POPUP_H_
24 #define _PHN_CALL_OPTION_POPUP_H_
25
26 #include <FApp.h>
27 #include <FUi.h>
28
29 #include "CallIPopupItemSelectListener.h"
30 #include "CallPresentationModel.h"
31 #include "CallTypes.h"
32
33 /**
34  * @class CallOptionPopup
35  * @brief This class presents a Popup based UI and functionality for popup
36  * shown for incoming call scenarios.
37  *
38  */
39 class CallOptionPopup
40         : public Tizen::Ui::Controls::Popup
41         , public Tizen::Ui::Controls::IListViewItemEventListener
42         , public Tizen::Ui::Controls::IListViewItemProvider
43         , public Tizen::Ui::IActionEventListener
44         , public Tizen::Ui::IPropagatedKeyEventListener
45 {
46
47 public:
48         CallOptionPopup(IPopupItemSelectListener& listener, CallPresentationModel& callPresenter);
49         virtual ~CallOptionPopup(void);
50         result Initialize(void);
51         // IListViewItemEventListener
52         virtual void OnListViewContextItemStateChanged(Tizen::Ui::Controls::ListView& listView, int index, int elementId, Tizen::Ui::Controls::ListContextItemStatus state){};
53         virtual void OnListViewItemStateChanged(Tizen::Ui::Controls::ListView& listView, int index, int elementId, Tizen::Ui::Controls::ListItemStatus status);
54         virtual void OnListViewItemSwept(Tizen::Ui::Controls::ListView& listView, int index, Tizen::Ui::Controls::SweepDirection direction){};
55         virtual void OnListViewItemLongPressed(Tizen::Ui::Controls::ListView& listView, int index, int elementId, bool& invokeListViewItemCallback){};
56         //IListViewItemProvider
57         virtual Tizen::Ui::Controls::ListItemBase* CreateItem(int index, int itemWidth);
58         virtual bool DeleteItem(int index, Tizen::Ui::Controls::ListItemBase* pItem, int itemWidth);
59         virtual int GetItemCount(void);
60         // From IActionEventListener
61         void OnActionPerformed(const Tizen::Ui::Control& source, int actionId);
62         //IPropagatedKeyEventListener
63         virtual bool OnKeyPressed(Control& source, const Tizen::Ui::KeyEventInfo& keyEventInfo){ return false; };
64         virtual bool OnKeyReleased(Control& source, const Tizen::Ui::KeyEventInfo& keyEventInfo);
65         virtual bool OnPreviewKeyPressed(Control& source, const Tizen::Ui::KeyEventInfo& keyEventInfo){ return false; }
66         virtual bool OnPreviewKeyReleased(Control& source, const Tizen::Ui::KeyEventInfo& keyEventInfo){ return false; }
67         virtual bool TranslateKeyEventInfo(Control& source, Tizen::Ui::KeyEventInfo& keyEventInfo) { return false; }
68
69 private:
70         result ConstructListData(void);
71
72 private:
73         Tizen::Base::Collection::ArrayList* __pOptionsList;
74         IPopupItemSelectListener& __popupListener;
75         CallPresentationModel& __callPresenter;
76 };
77
78 #endif // _PHN_CALL_OPTION_POPUP_H_