1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
3 * Copyright (C) 2000-2003, Ximian, Inc.
7 #define SOUP_SESSION_H 1
9 #include <libsoup/soup-types.h>
10 #include <libsoup/soup-message.h>
12 #define SOUP_TYPE_SESSION (soup_session_get_type ())
13 #define SOUP_SESSION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SOUP_TYPE_SESSION, SoupSession))
14 #define SOUP_SESSION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SOUP_TYPE_SESSION, SoupSessionClass))
15 #define SOUP_IS_SESSION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SOUP_TYPE_SESSION))
16 #define SOUP_IS_SESSION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), SOUP_TYPE_SESSION))
17 #define SOUP_SESSION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SOUP_TYPE_SESSION, SoupSessionClass))
19 typedef struct SoupSessionPrivate SoupSessionPrivate;
24 SoupSessionPrivate *priv;
28 GObjectClass parent_class;
31 void (*authenticate) (SoupSession *, SoupMessage *,
32 const char *auth_type, const char *auth_realm,
33 char **username, char **password);
34 void (*reauthenticate) (SoupSession *, SoupMessage *,
35 const char *auth_type, const char *auth_realm,
36 char **username, char **password);
40 GType soup_session_get_type (void);
42 #define SOUP_SESSION_PROXY_URI "proxy-uri"
43 #define SOUP_SESSION_MAX_CONNS "max-conns"
44 #define SOUP_SESSION_MAX_CONNS_PER_HOST "max-conns-per-host"
45 #define SOUP_SESSION_USE_NTLM "use-ntlm"
47 SoupSession *soup_session_new (void);
48 SoupSession *soup_session_new_with_options (const char *optname1,
51 void soup_session_queue_message (SoupSession *session,
53 SoupMessageCallbackFn callback,
55 void soup_session_requeue_message (SoupSession *session,
58 guint soup_session_send_message (SoupSession *session,
61 void soup_session_abort (SoupSession *session);
64 #endif /* SOUP_SESSION_H */