1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
3 * Copyright (C) 2001-2003, Ximian, Inc.
9 #include <libsoup/soup-types.h>
11 #define SOUP_TYPE_AUTH (soup_auth_get_type ())
12 #define SOUP_AUTH(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SOUP_TYPE_AUTH, SoupAuth))
13 #define SOUP_AUTH_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SOUP_TYPE_AUTH, SoupAuthClass))
14 #define SOUP_IS_AUTH(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SOUP_TYPE_AUTH))
15 #define SOUP_IS_AUTH_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), SOUP_TYPE_AUTH))
16 #define SOUP_AUTH_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SOUP_TYPE_AUTH, SoupAuthClass))
25 GObjectClass parent_class;
27 const char *scheme_name;
29 void (*construct) (SoupAuth *auth,
30 GHashTable *auth_params);
32 GSList * (*get_protection_space) (SoupAuth *auth,
33 const SoupUri *source_uri);
35 void (*authenticate) (SoupAuth *auth,
37 const char *password);
38 gboolean (*is_authenticated) (SoupAuth *auth);
40 char * (*get_authorization) (SoupAuth *auth,
44 GType soup_auth_get_type (void);
47 SoupAuth *soup_auth_new_from_header_list (const GSList *vals);
49 const char *soup_auth_get_scheme_name (SoupAuth *auth);
50 const char *soup_auth_get_realm (SoupAuth *auth);
51 char *soup_auth_get_info (SoupAuth *auth);
53 void soup_auth_authenticate (SoupAuth *auth,
55 const char *password);
56 gboolean soup_auth_is_authenticated (SoupAuth *auth);
58 char *soup_auth_get_authorization (SoupAuth *auth,
61 GSList *soup_auth_get_protection_space (SoupAuth *auth,
62 const SoupUri *source_uri);
63 void soup_auth_free_protection_space (SoupAuth *auth,
66 #endif /* SOUP_AUTH_H */