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_BASIC_H__
7#define __SOUP_AUTH_DOMAIN_BASIC_H__ 1
8
9#include <libsoup/soup-auth-domain.h>
10
11G_BEGIN_DECLS
12
13#define SOUP_TYPE_AUTH_DOMAIN_BASIC (soup_auth_domain_basic_get_type ())
14#define SOUP_AUTH_DOMAIN_BASIC(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SOUP_TYPE_AUTH_DOMAIN_BASIC, SoupAuthDomainBasic))
15#define SOUP_AUTH_DOMAIN_BASIC_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SOUP_TYPE_AUTH_DOMAIN_BASIC, SoupAuthDomainBasicClass))
16#define SOUP_IS_AUTH_DOMAIN_BASIC(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SOUP_TYPE_AUTH_DOMAIN_BASIC))
17#define SOUP_IS_AUTH_DOMAIN_BASIC_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), SOUP_TYPE_AUTH_DOMAIN_BASIC))
18#define SOUP_AUTH_DOMAIN_BASIC_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SOUP_TYPE_AUTH_DOMAIN_BASIC, SoupAuthDomainBasicClass))
19
20typedef struct {
21 SoupAuthDomain parent;
22
23} SoupAuthDomainBasic;
24
25typedef 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} SoupAuthDomainBasicClass;
34
35#define SOUP_AUTH_DOMAIN_BASIC_AUTH_CALLBACK "auth-callback"
36#define SOUP_AUTH_DOMAIN_BASIC_AUTH_DATA "auth-data"
37
38SOUP_AVAILABLE_IN_2_4
39GType soup_auth_domain_basic_get_type (void);
40
41SOUP_AVAILABLE_IN_2_4
42SoupAuthDomain *soup_auth_domain_basic_new (const char *optname1,
43 ...) G_GNUC_NULL_TERMINATED;
44
45typedef gboolean (*SoupAuthDomainBasicAuthCallback) (SoupAuthDomain *domain,
46 SoupMessage *msg,
47 const char *username,
48 const char *password,
49 gpointer user_data);
50
51SOUP_AVAILABLE_IN_2_4
52void soup_auth_domain_basic_set_auth_callback (SoupAuthDomain *domain,
53 SoupAuthDomainBasicAuthCallback callback,
54 gpointer user_data,
55 GDestroyNotify dnotify);
56
57G_END_DECLS
58
59#endif /* __SOUP_AUTH_DOMAIN_BASIC_H__ */
60