1/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
2/*
3 * Copyright (C) 2007 Red Hat, Inc.
4 */
5
6#ifndef __SOUP_AUTH_MANAGER_H__
7#define __SOUP_AUTH_MANAGER_H__ 1
8
9#include "soup-types.h"
10#include "soup-auth.h"
11
12G_BEGIN_DECLS
13
14#define SOUP_TYPE_AUTH_MANAGER (soup_auth_manager_get_type ())
15#define SOUP_AUTH_MANAGER(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), SOUP_TYPE_AUTH_MANAGER, SoupAuthManager))
16#define SOUP_AUTH_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SOUP_TYPE_AUTH_MANAGER, SoupAuthManagerClass))
17#define SOUP_IS_AUTH_MANAGER(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), SOUP_TYPE_AUTH_MANAGER))
18#define SOUP_IS_AUTH_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SOUP_TYPE_AUTH_MANAGER))
19#define SOUP_AUTH_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SOUP_TYPE_AUTH_MANAGER, SoupAuthManagerClass))
20
21typedef struct SoupAuthManagerPrivate SoupAuthManagerPrivate;
22
23typedef struct {
24 GObject parent;
25
26 SoupAuthManagerPrivate *priv;
27} SoupAuthManager;
28
29typedef struct {
30 GObjectClass parent_class;
31
32 void (*authenticate) (SoupAuthManager *manager, SoupMessage *msg,
33 SoupAuth *auth, gboolean retrying);
34} SoupAuthManagerClass;
35
36SOUP_AVAILABLE_IN_2_4
37GType soup_auth_manager_get_type (void);
38
39SOUP_AVAILABLE_IN_2_4
40void soup_auth_manager_use_auth (SoupAuthManager *manager,
41 SoupURI *uri,
42 SoupAuth *auth);
43
44SOUP_AVAILABLE_IN_2_58
45void soup_auth_manager_clear_cached_credentials (SoupAuthManager *manager);
46
47G_END_DECLS
48
49#endif /* __SOUP_AUTH_MANAGER_H__ */
50