Tizen 2.2.1
[framework/osp/web.git] / src / controls / FWebCtrl_AuthConfirmPopup.h
1 //
2 // Open Service Platform
3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
4 //
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
8 //
9 //     http://www.apache.org/licenses/LICENSE-2.0
10 //
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.
16 //
17
18 /**
19  * @file        FWebCtrl_AuthConfirmPopup.h
20  * @brief       The file contains the definition of _AuthConfirmPopup class.
21  */
22
23 #ifndef _FWEB_CTRL_INTERNAL_AUTH_CONFIRM_POPUP_H_
24 #define _FWEB_CTRL_INTERNAL_AUTH_CONFIRM_POPUP_H_
25
26 #include <unique_ptr.h>
27 #include <FBaseString.h>
28 #include <FUiIPropagatedKeyEventListener.h>
29 #include "FWebCtrl_WebPopup.h"
30
31 namespace Tizen { namespace Ui
32 {
33 class IActionEventListener;
34 }} // Tizen::Ui
35
36 namespace Tizen { namespace Ui { namespace Controls
37 {
38 class EditField;
39 }}} // Tizen::Ui::Controls
40
41 namespace Tizen { namespace Web { namespace Controls
42 {
43 class AuthenticationChallenge;
44
45
46 enum _AuthPopupButtonId
47 {
48         ID_BUTTON_AUTH_PROCESS,
49         ID_BUTTON_AUTH_CANCEL
50 };
51
52
53 class _AuthConfirmPopup
54         : public _WebPopup
55         , public Tizen::Ui::IPropagatedKeyEventListener
56 {
57
58 public:
59         /**
60          * Constructor
61          */
62         _AuthConfirmPopup(void);
63
64         /**
65          * Destructor
66          */
67         virtual ~_AuthConfirmPopup(void);
68
69         result Construct(const Tizen::Base::String& host, const Tizen::Base::String& realm, AuthenticationChallenge* pAuth);
70
71         virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId);
72
73         virtual bool  OnKeyPressed (Tizen::Ui::Control &source, const Tizen::Ui::KeyEventInfo &keyEventInfo);
74         virtual bool  OnKeyReleased (Tizen::Ui::Control &source, const Tizen::Ui::KeyEventInfo &keyEventInfo);
75         virtual bool  OnPreviewKeyPressed (Tizen::Ui::Control &source, const Tizen::Ui::KeyEventInfo &keyEventInfo);
76         virtual bool  OnPreviewKeyReleased (Tizen::Ui::Control &source, const Tizen::Ui::KeyEventInfo &keyEventInfo);
77         virtual bool  TranslateKeyEventInfo (Tizen::Ui::Control &source, Tizen::Ui::KeyEventInfo &keyEventInfo);
78
79 private:
80         _AuthConfirmPopup(const _AuthConfirmPopup&);
81
82         _AuthConfirmPopup& operator =(const _AuthConfirmPopup&);
83
84 private:
85         Tizen::Ui::Controls::EditField* __pIdEditField;
86         Tizen::Ui::Controls::EditField* __pPwdEditField;
87         AuthenticationChallenge* __pAuthHandler;
88 }; // _AuthConfirmPopup
89
90 }}} // Tizen::Web::Controls
91 #endif // _FWEB_CTRL_AUTH_COMMON_POPUP_H_