apply html5 vibration feature
[framework/osp/web.git] / inc / FWebCtrlAuthenticationChallenge.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                FWebCtrlAuthenticationChallenge.h
20  * @brief               This is the header file for the %AuthenticationChallenge class.
21  *
22  * This header file contains the declarations of the %AuthenticationChallenge class.
23  */
24
25 #ifndef _FWEB_CTRL_AUTHENTICATION_CHALLENGE_H_
26 #define _FWEB_CTRL_AUTHENTICATION_CHALLENGE_H_
27
28 #include <FBaseDataType.h>
29 #include <FBaseObject.h>
30 #include <FBaseString.h>
31
32 namespace Tizen { namespace Web { namespace Controls
33 {
34
35 /**
36  *
37  * @class       AuthenticationChallenge
38  * @brief               This class handles the HyperText Transfer Protocol (HTTP) authentication requests.
39  *
40  * @since               2.0
41  *
42  * The %AuthenticationChallenge class sends the user ID and password to the server requesting user authentication.
43  * @n
44  * For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/web/controls_namespace.htm">Web Controls Guide</a>.
45  */
46 class _OSP_EXPORT_ AuthenticationChallenge
47         : public Tizen::Base::Object
48 {
49 public:
50         /**
51          * This destructor overrides Tizen::Base::Object::~Object().
52          *
53          * @since               2.0
54          */
55         virtual ~AuthenticationChallenge(void);
56
57         /**
58          * Sends the user ID and password to the host.
59          *
60          * @since               2.0
61          *
62          * @privlevel   public
63          * @privilege   %http://tizen.org/privilege/web.service
64          *
65          * @param[in]   userId          The user ID for authentication
66          * @param[in]   password                The password for authentication
67          * @exception   E_SUCCESS                       The method is successful.
68          * @exception   E_PRIVILEGE_DENIED      The application does not have the privilege to call this method.
69          * @exception   E_USER_NOT_CONSENTED    The user blocks an application from calling this method. @b Since: @b 2.1
70          * @remarks     The specific error code can be accessed using the GetLastResult() method.
71          */
72         void Process(const UserId& userId, const Tizen::Base::String& password);
73
74         /**
75          * Cancels the authentication request.
76          *
77          * @since               2.0
78          *
79          * @privlevel   public
80          * @privilege   %http://tizen.org/privilege/web.service
81          *
82          * @exception   E_SUCCESS                       The method is successful.
83          * @exception   E_PRIVILEGE_DENIED      The application does not have the privilege to call this method.
84          * @exception   E_USER_NOT_CONSENTED    The user blocks an application from calling this method. @b Since: @b 2.1
85          * @remarks     The specific error code can be accessed using the GetLastResult() method.
86          */
87         void Cancel(void);
88
89 private :
90         //
91         // This is the constructor for the %AuthenticationChallenge class.
92         //
93         // @remarks             This constructor is hidden.
94         //
95         AuthenticationChallenge(void);
96
97 private:
98         friend class _WebImpl;
99         friend class _AuthenticationChallengeImpl;
100         class _AuthenticationChallengeImpl* __pAuthenticationChallengeImpl;
101 }; // AuthenticationChallenge
102
103 }}} // Tizen::Web::Controls
104 #endif // _FWEB_CTRL_AUTHENTICATION_CHALLENGE_H_