• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 
12 G_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 
21 typedef struct SoupAuthManagerPrivate SoupAuthManagerPrivate;
22 
23 typedef struct {
24 	GObject parent;
25 
26 	SoupAuthManagerPrivate *priv;
27 } SoupAuthManager;
28 
29 typedef struct {
30 	GObjectClass parent_class;
31 
32 	void (*authenticate) (SoupAuthManager *manager, SoupMessage *msg,
33 			      SoupAuth *auth, gboolean retrying);
34 } SoupAuthManagerClass;
35 
36 SOUP_AVAILABLE_IN_2_4
37 GType soup_auth_manager_get_type (void);
38 
39 SOUP_AVAILABLE_IN_2_4
40 void  soup_auth_manager_use_auth (SoupAuthManager *manager,
41 				  SoupURI         *uri,
42 				  SoupAuth        *auth);
43 
44 SOUP_AVAILABLE_IN_2_58
45 void soup_auth_manager_clear_cached_credentials (SoupAuthManager *manager);
46 
47 G_END_DECLS
48 
49 #endif /* __SOUP_AUTH_MANAGER_H__ */
50