88b3a1f24e8ed62a18593e304d7d1dd9f4599876
[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.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                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 {
45
46 public:
47         CallOptionPopup(IPopupItemSelectListener& listener, CallPresentationModel& callPresenter);
48         virtual ~CallOptionPopup(void);
49         result Initialize(void);
50         // IListViewItemEventListener
51         virtual void OnListViewContextItemStateChanged(Tizen::Ui::Controls::ListView& listView, int index, int elementId, Tizen::Ui::Controls::ListContextItemStatus state){};
52         virtual void OnListViewItemStateChanged(Tizen::Ui::Controls::ListView& listView, int index, int elementId, Tizen::Ui::Controls::ListItemStatus status);
53         virtual void OnListViewItemSwept(Tizen::Ui::Controls::ListView& listView, int index, Tizen::Ui::Controls::SweepDirection direction){};
54         virtual void OnListViewItemLongPressed(Tizen::Ui::Controls::ListView& listView, int index, int elementId, bool& invokeListViewItemCallback){};
55         //IListViewItemProvider
56         virtual Tizen::Ui::Controls::ListItemBase* CreateItem(int index, int itemWidth);
57         virtual bool DeleteItem(int index, Tizen::Ui::Controls::ListItemBase* pItem, int itemWidth);
58         virtual int GetItemCount(void);
59         // From IActionEventListener
60         void OnActionPerformed(const Tizen::Ui::Control& source, int actionId);
61
62 private:
63         result ConstructListData(void);
64
65 private:
66         Tizen::Base::Collection::ArrayList* __pOptionsList;
67         IPopupItemSelectListener& __popupListener;
68         CallPresentationModel& __callPresenter;
69 };
70
71 #endif // _PHN_CALL_OPTION_POPUP_H_