1 | /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ |
2 | /* |
3 | * Copyright (C) 2007 Novell, Inc. |
4 | */ |
5 | |
6 | #ifndef __SOUP_AUTH_DOMAIN_DIGEST_H__ |
7 | #define __SOUP_AUTH_DOMAIN_DIGEST_H__ 1 |
8 | |
9 | #include <libsoup/soup-auth-domain.h> |
10 | |
11 | G_BEGIN_DECLS |
12 | |
13 | #define SOUP_TYPE_AUTH_DOMAIN_DIGEST (soup_auth_domain_digest_get_type ()) |
14 | #define SOUP_AUTH_DOMAIN_DIGEST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SOUP_TYPE_AUTH_DOMAIN_DIGEST, SoupAuthDomainDigest)) |
15 | #define SOUP_AUTH_DOMAIN_DIGEST_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SOUP_TYPE_AUTH_DOMAIN_DIGEST, SoupAuthDomainDigestClass)) |
16 | #define SOUP_IS_AUTH_DOMAIN_DIGEST(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SOUP_TYPE_AUTH_DOMAIN_DIGEST)) |
17 | #define SOUP_IS_AUTH_DOMAIN_DIGEST_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), SOUP_TYPE_AUTH_DOMAIN_DIGEST)) |
18 | #define SOUP_AUTH_DOMAIN_DIGEST_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SOUP_TYPE_AUTH_DOMAIN_DIGEST, SoupAuthDomainDigestClass)) |
19 | |
20 | typedef struct { |
21 | SoupAuthDomain parent; |
22 | |
23 | } SoupAuthDomainDigest; |
24 | |
25 | typedef struct { |
26 | SoupAuthDomainClass parent_class; |
27 | |
28 | /* Padding for future expansion */ |
29 | void (*_libsoup_reserved1) (void); |
30 | void (*_libsoup_reserved2) (void); |
31 | void (*_libsoup_reserved3) (void); |
32 | void (*_libsoup_reserved4) (void); |
33 | } SoupAuthDomainDigestClass; |
34 | |
35 | #define SOUP_AUTH_DOMAIN_DIGEST_AUTH_CALLBACK "auth-callback" |
36 | #define SOUP_AUTH_DOMAIN_DIGEST_AUTH_DATA "auth-data" |
37 | |
38 | SOUP_AVAILABLE_IN_2_4 |
39 | GType soup_auth_domain_digest_get_type (void); |
40 | |
41 | SOUP_AVAILABLE_IN_2_4 |
42 | SoupAuthDomain *soup_auth_domain_digest_new (const char *optname1, |
43 | ...) G_GNUC_NULL_TERMINATED; |
44 | |
45 | typedef char * (*SoupAuthDomainDigestAuthCallback) (SoupAuthDomain *domain, |
46 | SoupMessage *msg, |
47 | const char *username, |
48 | gpointer user_data); |
49 | |
50 | SOUP_AVAILABLE_IN_2_4 |
51 | void soup_auth_domain_digest_set_auth_callback (SoupAuthDomain *domain, |
52 | SoupAuthDomainDigestAuthCallback callback, |
53 | gpointer user_data, |
54 | GDestroyNotify dnotify); |
55 | |
56 | SOUP_AVAILABLE_IN_2_4 |
57 | char *soup_auth_domain_digest_encode_password (const char *username, |
58 | const char *realm, |
59 | const char *password); |
60 | |
61 | G_END_DECLS |
62 | |
63 | #endif /* __SOUP_AUTH_DOMAIN_DIGEST_H__ */ |
64 | |