2 // Open Service Platform
3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
5 // Licensed under the Apache License, Version 2.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
9 // http://www.apache.org/licenses/LICENSE-2.0
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an "AS IS" BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
19 * @file CertificateSelectorForm.h
20 * @brief This is the header file for the %CertificateSelectorForm class.
22 * This header file contains the declarations of the %CertificateSelectorForm class.
25 #ifndef _CERTIFICATE_SELECTOR_FORM_H_
26 #define _CERTIFICATE_SELECTOR_FORM_H_
28 #include <unique_ptr.h>
29 #include <FBaseDataType.h>
30 #include <FUiCtrlForm.h>
31 #include <FUiCtrlIFormBackEventListener.h>
32 #include <FUiCtrlIListViewItemEventListener.h>
33 #include <FUiCtrlIListViewItemProvider.h>
34 #include <FUiCtrlListViewTypes.h>
35 #include <FUiCtrlListItemBase.h>
37 namespace Tizen { namespace Ui { namespace Controls
40 } } } // Tizen::Ui::Controls
42 namespace Tizen { namespace Security { namespace Cert
44 struct _CertFieldInfos;
45 } } } // Tizen::Security::Cert
47 class CertificateSelectorForm
48 : public Tizen::Ui::Controls::Form
49 , virtual public Tizen::Ui::Controls::IListViewItemProvider
50 , virtual public Tizen::Ui::Controls::IListViewItemEventListener
51 , virtual public Tizen::Ui::Controls::IFormBackEventListener
56 CertificateSelectorForm(void);
57 virtual ~CertificateSelectorForm(void);
58 result Initialize(RequestId reqId);
61 // prevent copy and assignment
62 CertificateSelectorForm(const CertificateSelectorForm& rhs);
63 CertificateSelectorForm& operator =(const CertificateSelectorForm& rhs);
65 void Finish(bool isSelected, int certId);
68 virtual result OnInitializing(void);
69 virtual result OnTerminating(void);
71 // IFormBackEventListener
72 virtual void OnFormBackRequested(Tizen::Ui::Controls::Form& source);
74 // IListViewItemProvider
75 virtual Tizen::Ui::Controls::ListItemBase* CreateItem(int index, int itemWidth);
76 virtual bool DeleteItem(int index, Tizen::Ui::Controls::ListItemBase* pItem, int itemWidth);
77 virtual int GetItemCount(void);
79 // IListViewItemEventListener
80 virtual void OnListViewItemStateChanged(Tizen::Ui::Controls::ListView& listView, int index, int elementId, Tizen::Ui::Controls::ListItemStatus status);
81 virtual void OnListViewContextItemStateChanged(Tizen::Ui::Controls::ListView& listView, int index, int elementId, Tizen::Ui::Controls::ListContextItemStatus state);
82 virtual void OnListViewItemSwept(Tizen::Ui::Controls::ListView& listView, int index, Tizen::Ui::Controls::SweepDirection direction);
89 std::unique_ptr<Tizen::Security::Cert::_CertFieldInfos[]> __pCertList;
90 std::unique_ptr<int[]> __pCertIndex;
93 #endif //_CERTIFICATE_SELECTOR_FORM_H_