1 | /* |
2 | * Copyright (C) 2013 Samsung Electronics Inc. All rights reserved. |
3 | * |
4 | * This library is free software; you can redistribute it and/or |
5 | * modify it under the terms of the GNU Library General Public |
6 | * License as published by the Free Software Foundation; either |
7 | * version 2 of the License, or (at your option) any later version. |
8 | * |
9 | * This library is distributed in the hope that it will be useful, |
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
12 | * Library General Public License for more details. |
13 | * |
14 | * You should have received a copy of the GNU Library General Public License |
15 | * along with this library; see the file COPYING.LIB. If not, write to |
16 | * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
17 | * Boston, MA 02110-1301, USA. |
18 | */ |
19 | |
20 | #if !defined(__WEBKIT2_H_INSIDE__) && !defined(WEBKIT2_COMPILATION) |
21 | #error "Only <webkit2/webkit2.h> can be included directly." |
22 | #endif |
23 | |
24 | #ifndef WebKitAuthenticationRequest_h |
25 | #define WebKitAuthenticationRequest_h |
26 | |
27 | #include <gtk/gtk.h> |
28 | #include <webkit2/WebKitCredential.h> |
29 | #include <webkit2/WebKitDefines.h> |
30 | |
31 | G_BEGIN_DECLS |
32 | |
33 | #define WEBKIT_TYPE_AUTHENTICATION_REQUEST (webkit_authentication_request_get_type()) |
34 | #define WEBKIT_AUTHENTICATION_REQUEST(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), WEBKIT_TYPE_AUTHENTICATION_REQUEST, WebKitAuthenticationRequest)) |
35 | #define WEBKIT_AUTHENTICATION_REQUEST_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), WEBKIT_TYPE_AUTHENTICATION_REQUEST, WebKitAuthenticationRequestClass)) |
36 | #define WEBKIT_IS_AUTHENTICATION_REQUEST(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), WEBKIT_TYPE_AUTHENTICATION_REQUEST)) |
37 | #define WEBKIT_IS_AUTHENTICATION_REQUEST_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), WEBKIT_TYPE_AUTHENTICATION_REQUEST)) |
38 | #define WEBKIT_AUTHENTICATION_REQUEST_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), WEBKIT_TYPE_AUTHENTICATION_REQUEST, WebKitAuthenticationRequestClass)) |
39 | |
40 | typedef struct _WebKitAuthenticationRequest WebKitAuthenticationRequest; |
41 | typedef struct _WebKitAuthenticationRequestClass WebKitAuthenticationRequestClass; |
42 | typedef struct _WebKitAuthenticationRequestPrivate WebKitAuthenticationRequestPrivate; |
43 | |
44 | struct _WebKitAuthenticationRequest { |
45 | GObject parent; |
46 | |
47 | /*< private >*/ |
48 | WebKitAuthenticationRequestPrivate *priv; |
49 | }; |
50 | |
51 | struct _WebKitAuthenticationRequestClass { |
52 | GObjectClass parent_class; |
53 | |
54 | void (*_webkit_reserved0) (void); |
55 | void (*_webkit_reserved1) (void); |
56 | void (*_webkit_reserved2) (void); |
57 | void (*_webkit_reserved3) (void); |
58 | }; |
59 | |
60 | /** |
61 | * WebKitAuthenticationScheme: |
62 | * @WEBKIT_AUTHENTICATION_SCHEME_DEFAULT: The default authentication scheme of WebKit. |
63 | * @WEBKIT_AUTHENTICATION_SCHEME_HTTP_BASIC: Basic authentication scheme as defined in RFC 2617. |
64 | * @WEBKIT_AUTHENTICATION_SCHEME_HTTP_DIGEST: Digest authentication scheme as defined in RFC 2617. |
65 | * @WEBKIT_AUTHENTICATION_SCHEME_HTML_FORM: HTML Form authentication. |
66 | * @WEBKIT_AUTHENTICATION_SCHEME_NTLM: NTLM Microsoft proprietary authentication scheme. |
67 | * @WEBKIT_AUTHENTICATION_SCHEME_NEGOTIATE: Negotiate (or SPNEGO) authentication scheme as defined in RFC 4559. |
68 | * @WEBKIT_AUTHENTICATION_SCHEME_CLIENT_CERTIFICATE_REQUESTED: Client Certificate Authentication (see RFC 2246). |
69 | * @WEBKIT_AUTHENTICATION_SCHEME_SERVER_TRUST_EVALUATION_REQUESTED: Server Trust Authentication. |
70 | * @WEBKIT_AUTHENTICATION_SCHEME_UNKNOWN: Authentication scheme unknown. |
71 | * |
72 | * Enum values representing the authentication scheme. |
73 | * |
74 | * Since: 2.2 |
75 | */ |
76 | typedef enum { |
77 | WEBKIT_AUTHENTICATION_SCHEME_DEFAULT = 1, |
78 | WEBKIT_AUTHENTICATION_SCHEME_HTTP_BASIC = 2, |
79 | WEBKIT_AUTHENTICATION_SCHEME_HTTP_DIGEST = 3, |
80 | WEBKIT_AUTHENTICATION_SCHEME_HTML_FORM = 4, |
81 | WEBKIT_AUTHENTICATION_SCHEME_NTLM = 5, |
82 | WEBKIT_AUTHENTICATION_SCHEME_NEGOTIATE = 6, |
83 | WEBKIT_AUTHENTICATION_SCHEME_CLIENT_CERTIFICATE_REQUESTED = 7, |
84 | WEBKIT_AUTHENTICATION_SCHEME_SERVER_TRUST_EVALUATION_REQUESTED = 8, |
85 | WEBKIT_AUTHENTICATION_SCHEME_UNKNOWN = 100, |
86 | } WebKitAuthenticationScheme; |
87 | |
88 | |
89 | WEBKIT_API GType |
90 | webkit_authentication_request_get_type (void); |
91 | |
92 | WEBKIT_API gboolean |
93 | webkit_authentication_request_can_save_credentials (WebKitAuthenticationRequest *request); |
94 | |
95 | WEBKIT_API WebKitCredential * |
96 | webkit_authentication_request_get_proposed_credential (WebKitAuthenticationRequest *request); |
97 | |
98 | WEBKIT_API const gchar * |
99 | webkit_authentication_request_get_host (WebKitAuthenticationRequest *request); |
100 | |
101 | WEBKIT_API guint |
102 | webkit_authentication_request_get_port (WebKitAuthenticationRequest *request); |
103 | |
104 | WEBKIT_API const gchar * |
105 | webkit_authentication_request_get_realm (WebKitAuthenticationRequest *request); |
106 | |
107 | WEBKIT_API WebKitAuthenticationScheme |
108 | webkit_authentication_request_get_scheme (WebKitAuthenticationRequest *request); |
109 | |
110 | WEBKIT_API gboolean |
111 | webkit_authentication_request_is_for_proxy (WebKitAuthenticationRequest *request); |
112 | |
113 | WEBKIT_API gboolean |
114 | webkit_authentication_request_is_retry (WebKitAuthenticationRequest *request); |
115 | |
116 | WEBKIT_API void |
117 | webkit_authentication_request_authenticate (WebKitAuthenticationRequest *request, |
118 | WebKitCredential *credential); |
119 | |
120 | WEBKIT_API void |
121 | webkit_authentication_request_cancel (WebKitAuthenticationRequest *request); |
122 | |
123 | G_END_DECLS |
124 | |
125 | #endif |
126 | |