summaryrefslogtreecommitdiff
path: root/libsoup/soup-connection-auth.h
blob: 251ca35954e82a9895904531fb69a0fd560c6237 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
 * Copyright (C) 2010 Red Hat, Inc.
 */

#ifndef SOUP_CONNECTION_AUTH_H
#define SOUP_CONNECTION_AUTH_H 1

#include <libsoup/soup-auth.h>

G_BEGIN_DECLS

#define SOUP_TYPE_CONNECTION_AUTH            (soup_connection_auth_get_type ())
#define SOUP_CONNECTION_AUTH(object)         (G_TYPE_CHECK_INSTANCE_CAST ((object), SOUP_TYPE_CONNECTION_AUTH, SoupConnectionAuth))
#define SOUP_CONNECTION_AUTH_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), SOUP_TYPE_CONNECTION_AUTH, SoupConnectionAuthClass))
#define SOUP_IS_CONNECTION_AUTH(object)      (G_TYPE_CHECK_INSTANCE_TYPE ((object), SOUP_TYPE_CONNECTION_AUTH))
#define SOUP_IS_CONNECTION_AUTH_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SOUP_TYPE_CONNECTION_AUTH))
#define SOUP_CONNECTION_AUTH_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), SOUP_TYPE_CONNECTION_AUTH, SoupConnectionAuthClass))

typedef struct SoupConnectionAuthPrivate SoupConnectionAuthPrivate;

typedef struct {
	SoupAuth parent;

	SoupConnectionAuthPrivate *priv;
} SoupConnectionAuth;

typedef struct {
	SoupAuthClass parent_class;

	gpointer  (*create_connection_state)      (SoupConnectionAuth *auth);
	void      (*free_connection_state)        (SoupConnectionAuth *auth,
						   gpointer            conn);

	gboolean  (*update_connection)            (SoupConnectionAuth *auth,
						   SoupMessage        *msg,
						   const char         *auth_header,
						   gpointer            conn);
	char     *(*get_connection_authorization) (SoupConnectionAuth *auth,
						   SoupMessage        *msg,
						   gpointer            conn);
	gboolean  (*is_connection_ready)          (SoupConnectionAuth *auth,
						   SoupMessage        *msg,
						   gpointer            conn);
} SoupConnectionAuthClass;

SOUP_AVAILABLE_IN_2_42
GType soup_connection_auth_get_type (void);

G_END_DECLS

#endif /* SOUP_CONNECTION_AUTH_H */