tizen beta release
[framework/web/webkit-efl.git] / debian / libwebkit-engine-dev / usr / include / ewebkit-0 / ewk_auth_soup.h
1 /*
2     Copyright (C) 2009 Igalia S.L.
3     Copyright (C) 2011 Samsung Electronics
4
5     This library is free software; you can redistribute it and/or
6     modify it under the terms of the GNU Library General Public
7     License as published by the Free Software Foundation; either
8     version 2 of the License, or (at your option) any later version.
9
10     This library is distributed in the hope that it will be useful,
11     but WITHOUT ANY WARRANTY; without even the implied warranty of
12     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13     Library General Public License for more details.
14
15     You should have received a copy of the GNU Library General Public License
16     along with this library; see the file COPYING.LIB.  If not, write to
17     the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18     Boston, MA 02110-1301, USA.
19 */
20
21 #ifndef ewk_auth_soup_h
22 #define ewk_auth_soup_h
23
24 #include "ewk_auth.h"
25 #include <glib-object.h>
26 #include <glib.h>
27
28 #ifdef __cplusplus
29 extern "C" {
30 #endif
31
32 #define EWK_TYPE_SOUP_AUTH_DIALOG            (ewk_auth_soup_dialog_get_type())
33 #define EWK_SOUP_AUTH_DIALOG(object)         (G_TYPE_CHECK_INSTANCE_CAST((object), EWK_TYPE_SOUP_AUTH_DIALOG, Ewk_Soup_Auth_Dialog))
34 #define EWK_SOUP_AUTH_DIALOG_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST((klass), EWK_TYPE_SOUP_AUTH_DIALOG, Ewk_Soup_Auth_Dialog))
35 #define EWK_IS_SOUP_AUTH_DIALOG(object)      (G_TYPE_CHECK_INSTANCE_TYPE((object), EWK_TYPE_SOUP_AUTH_DIALOG))
36 #define EWK_IS_SOUP_AUTH_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), EWK_TYPE_SOUP_AUTH_DIALOG))
37 #define EWK_SOUP_AUTH_DIALOG_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS((obj), EWK_TYPE_SOUP_AUTH_DIALOG, Ewk_Soup_Auth_Dialog))
38
39 typedef struct {
40     GObject parent_instance;
41 } Ewk_Soup_Auth_Dialog;
42
43 typedef struct {
44     GObjectClass parent_class;
45 } Ewk_Soup_Auth_DialogClass;
46
47 GType ewk_auth_soup_dialog_get_type(void);
48
49 /**
50  *  Sets callback to be called when authentication is required.
51  */
52 void ewk_auth_soup_show_dialog_callback_set(Ewk_Auth_Show_Dialog_Callback callback);
53
54 /**
55  *  Method for setting credentials
56  *
57  *  @param username username
58  *  @param password password
59  *  @param data soup authentication data
60  */
61 void ewk_auth_soup_credentials_set(const char *username, const char *password, void *data);
62
63 #ifdef __cplusplus
64 }
65 #endif
66
67 #endif // ewk_auth_soup_h