summaryrefslogtreecommitdiff
path: root/libsoup/auth/soup-connection-auth.h
blob: e741e1168df38048eae99580415712cd79254542 (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
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
 * Copyright (C) 2010 Red Hat, Inc.
 */

#pragma once

#include "soup-auth.h"

G_BEGIN_DECLS

#define SOUP_TYPE_CONNECTION_AUTH (soup_connection_auth_get_type ())
_SOUP_EXTERN
G_DECLARE_DERIVABLE_TYPE (SoupConnectionAuth, soup_connection_auth, SOUP, CONNECTION_AUTH, SoupAuth)

struct _SoupConnectionAuthClass {
	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);
};


gpointer	soup_connection_auth_get_connection_state_for_message
						(SoupConnectionAuth *auth,
						 SoupMessage        *msg);
G_END_DECLS