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>
14 #define SOUP_TYPE_SESSION (soup_session_get_type ())
15 #define SOUP_SESSION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SOUP_TYPE_SESSION, SoupSession))
16 #define SOUP_SESSION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SOUP_TYPE_SESSION, SoupSessionClass))
17 #define SOUP_IS_SESSION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SOUP_TYPE_SESSION))
18 #define SOUP_IS_SESSION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), SOUP_TYPE_SESSION))
19 #define SOUP_SESSION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SOUP_TYPE_SESSION, SoupSessionClass))
21 typedef void (*SoupSessionCallback) (SoupSession *session,
31 GObjectClass parent_class;
34 void (*request_started) (SoupSession *session, SoupMessage *msg,
36 void (*authenticate) (SoupSession *session, SoupMessage *msg,
37 SoupAuth *auth, gboolean retrying);
40 void (*queue_message) (SoupSession *session, SoupMessage *msg,
41 SoupSessionCallback callback,
43 void (*requeue_message) (SoupSession *session, SoupMessage *msg);
44 guint (*send_message) (SoupSession *session, SoupMessage *msg);
46 void (*cancel_message) (SoupSession *session, SoupMessage *msg,
49 /* Padding for future expansion */
50 void (*_libsoup_reserved1) (void);
51 void (*_libsoup_reserved2) (void);
52 void (*_libsoup_reserved3) (void);
53 void (*_libsoup_reserved4) (void);
56 GType soup_session_get_type (void);
58 #define SOUP_SESSION_PROXY_URI "proxy-uri"
59 #define SOUP_SESSION_MAX_CONNS "max-conns"
60 #define SOUP_SESSION_MAX_CONNS_PER_HOST "max-conns-per-host"
61 #define SOUP_SESSION_USE_NTLM "use-ntlm"
62 #define SOUP_SESSION_SSL_CA_FILE "ssl-ca-file"
63 #define SOUP_SESSION_ASYNC_CONTEXT "async-context"
64 #define SOUP_SESSION_TIMEOUT "timeout"
65 #define SOUP_SESSION_USER_AGENT "user-agent"
66 #define SOUP_SESSION_IDLE_TIMEOUT "idle-timeout"
67 #define SOUP_SESSION_ADD_FEATURE "add-feature"
68 #define SOUP_SESSION_ADD_FEATURE_BY_TYPE "add-feature-by-type"
69 #define SOUP_SESSION_REMOVE_FEATURE_BY_TYPE "remove-feature-by-type"
71 GMainContext *soup_session_get_async_context(SoupSession *session);
73 void soup_session_queue_message (SoupSession *session,
75 SoupSessionCallback callback,
77 void soup_session_requeue_message (SoupSession *session,
80 guint soup_session_send_message (SoupSession *session,
83 void soup_session_pause_message (SoupSession *session,
85 void soup_session_unpause_message (SoupSession *session,
88 void soup_session_cancel_message (SoupSession *session,
91 void soup_session_abort (SoupSession *session);
94 void soup_session_add_feature (SoupSession *session,
95 SoupSessionFeature *feature);
96 void soup_session_add_feature_by_type (SoupSession *session,
98 void soup_session_remove_feature (SoupSession *session,
99 SoupSessionFeature *feature);
100 void soup_session_remove_feature_by_type (SoupSession *session,
102 GSList *soup_session_get_features (SoupSession *session,
104 SoupSessionFeature *soup_session_get_feature (SoupSession *session,
109 #endif /* SOUP_SESSION_H */