|
rpm-build |
4f3c61 |
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
|
|
rpm-build |
4f3c61 |
/*
|
|
rpm-build |
4f3c61 |
* Copyright (C) 2000-2003, Ximian, Inc.
|
|
rpm-build |
4f3c61 |
*/
|
|
rpm-build |
4f3c61 |
|
|
rpm-build |
4f3c61 |
#ifndef SOUP_SESSION_H
|
|
rpm-build |
4f3c61 |
#define SOUP_SESSION_H 1
|
|
rpm-build |
4f3c61 |
|
|
rpm-build |
4f3c61 |
#include <libsoup/soup-types.h>
|
|
rpm-build |
4f3c61 |
#include <libsoup/soup-address.h>
|
|
rpm-build |
4f3c61 |
#include <libsoup/soup-message.h>
|
|
rpm-build |
4f3c61 |
#include <libsoup/soup-websocket-connection.h>
|
|
rpm-build |
4f3c61 |
|
|
rpm-build |
4f3c61 |
G_BEGIN_DECLS
|
|
rpm-build |
4f3c61 |
|
|
rpm-build |
4f3c61 |
#define SOUP_TYPE_SESSION (soup_session_get_type ())
|
|
rpm-build |
4f3c61 |
#define SOUP_SESSION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SOUP_TYPE_SESSION, SoupSession))
|
|
rpm-build |
4f3c61 |
#define SOUP_SESSION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SOUP_TYPE_SESSION, SoupSessionClass))
|
|
rpm-build |
4f3c61 |
#define SOUP_IS_SESSION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SOUP_TYPE_SESSION))
|
|
rpm-build |
4f3c61 |
#define SOUP_IS_SESSION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), SOUP_TYPE_SESSION))
|
|
rpm-build |
4f3c61 |
#define SOUP_SESSION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SOUP_TYPE_SESSION, SoupSessionClass))
|
|
rpm-build |
4f3c61 |
|
|
rpm-build |
4f3c61 |
typedef void (*SoupSessionCallback) (SoupSession *session,
|
|
rpm-build |
4f3c61 |
SoupMessage *msg,
|
|
rpm-build |
4f3c61 |
gpointer user_data);
|
|
rpm-build |
4f3c61 |
|
|
rpm-build |
4f3c61 |
struct _SoupSession {
|
|
rpm-build |
4f3c61 |
GObject parent;
|
|
rpm-build |
4f3c61 |
|
|
rpm-build |
4f3c61 |
};
|
|
rpm-build |
4f3c61 |
|
|
rpm-build |
4f3c61 |
typedef struct {
|
|
rpm-build |
4f3c61 |
GObjectClass parent_class;
|
|
rpm-build |
4f3c61 |
|
|
rpm-build |
4f3c61 |
/* signals */
|
|
rpm-build |
4f3c61 |
void (*request_started) (SoupSession *session, SoupMessage *msg,
|
|
rpm-build |
4f3c61 |
SoupSocket *socket);
|
|
rpm-build |
4f3c61 |
void (*authenticate) (SoupSession *session, SoupMessage *msg,
|
|
rpm-build |
4f3c61 |
SoupAuth *auth, gboolean retrying);
|
|
rpm-build |
4f3c61 |
|
|
rpm-build |
4f3c61 |
/* methods */
|
|
rpm-build |
4f3c61 |
void (*queue_message) (SoupSession *session, SoupMessage *msg,
|
|
rpm-build |
4f3c61 |
SoupSessionCallback callback,
|
|
rpm-build |
4f3c61 |
gpointer user_data);
|
|
rpm-build |
4f3c61 |
void (*requeue_message) (SoupSession *session, SoupMessage *msg);
|
|
rpm-build |
4f3c61 |
guint (*send_message) (SoupSession *session, SoupMessage *msg);
|
|
rpm-build |
4f3c61 |
|
|
rpm-build |
4f3c61 |
void (*cancel_message) (SoupSession *session, SoupMessage *msg,
|
|
rpm-build |
4f3c61 |
guint status_code);
|
|
rpm-build |
4f3c61 |
|
|
rpm-build |
4f3c61 |
void (*auth_required) (SoupSession *session, SoupMessage *msg,
|
|
rpm-build |
4f3c61 |
SoupAuth *auth, gboolean retrying);
|
|
rpm-build |
4f3c61 |
|
|
rpm-build |
4f3c61 |
void (*flush_queue) (SoupSession *session);
|
|
rpm-build |
4f3c61 |
|
|
rpm-build |
4f3c61 |
void (*kick) (SoupSession *session);
|
|
rpm-build |
4f3c61 |
|
|
rpm-build |
4f3c61 |
/* Padding for future expansion */
|
|
rpm-build |
4f3c61 |
void (*_libsoup_reserved4) (void);
|
|
rpm-build |
4f3c61 |
} SoupSessionClass;
|
|
rpm-build |
4f3c61 |
|
|
rpm-build |
4f3c61 |
SOUP_AVAILABLE_IN_2_42
|
|
rpm-build |
4f3c61 |
GType soup_session_get_type (void);
|
|
rpm-build |
4f3c61 |
|
|
rpm-build |
4f3c61 |
#define SOUP_SESSION_LOCAL_ADDRESS "local-address"
|
|
rpm-build |
4f3c61 |
#define SOUP_SESSION_PROXY_URI "proxy-uri"
|
|
rpm-build |
4f3c61 |
#define SOUP_SESSION_PROXY_RESOLVER "proxy-resolver"
|
|
rpm-build |
4f3c61 |
#define SOUP_SESSION_MAX_CONNS "max-conns"
|
|
rpm-build |
4f3c61 |
#define SOUP_SESSION_MAX_CONNS_PER_HOST "max-conns-per-host"
|
|
rpm-build |
4f3c61 |
#define SOUP_SESSION_USE_NTLM "use-ntlm"
|
|
rpm-build |
4f3c61 |
#define SOUP_SESSION_SSL_CA_FILE "ssl-ca-file"
|
|
rpm-build |
4f3c61 |
#define SOUP_SESSION_SSL_USE_SYSTEM_CA_FILE "ssl-use-system-ca-file"
|
|
rpm-build |
4f3c61 |
#define SOUP_SESSION_TLS_DATABASE "tls-database"
|
|
rpm-build |
4f3c61 |
#define SOUP_SESSION_SSL_STRICT "ssl-strict"
|
|
rpm-build |
4f3c61 |
#define SOUP_SESSION_TLS_INTERACTION "tls-interaction"
|
|
rpm-build |
4f3c61 |
#define SOUP_SESSION_ASYNC_CONTEXT "async-context"
|
|
rpm-build |
4f3c61 |
#define SOUP_SESSION_USE_THREAD_CONTEXT "use-thread-context"
|
|
rpm-build |
4f3c61 |
#define SOUP_SESSION_TIMEOUT "timeout"
|
|
rpm-build |
4f3c61 |
#define SOUP_SESSION_USER_AGENT "user-agent"
|
|
rpm-build |
4f3c61 |
#define SOUP_SESSION_ACCEPT_LANGUAGE "accept-language"
|
|
rpm-build |
4f3c61 |
#define SOUP_SESSION_ACCEPT_LANGUAGE_AUTO "accept-language-auto"
|
|
rpm-build |
4f3c61 |
#define SOUP_SESSION_IDLE_TIMEOUT "idle-timeout"
|
|
rpm-build |
4f3c61 |
#define SOUP_SESSION_ADD_FEATURE "add-feature"
|
|
rpm-build |
4f3c61 |
#define SOUP_SESSION_ADD_FEATURE_BY_TYPE "add-feature-by-type"
|
|
rpm-build |
4f3c61 |
#define SOUP_SESSION_REMOVE_FEATURE_BY_TYPE "remove-feature-by-type"
|
|
rpm-build |
4f3c61 |
#define SOUP_SESSION_HTTP_ALIASES "http-aliases"
|
|
rpm-build |
4f3c61 |
#define SOUP_SESSION_HTTPS_ALIASES "https-aliases"
|
|
rpm-build |
4f3c61 |
|
|
rpm-build |
4f3c61 |
SOUP_AVAILABLE_IN_2_42
|
|
rpm-build |
4f3c61 |
SoupSession *soup_session_new (void);
|
|
rpm-build |
4f3c61 |
|
|
rpm-build |
4f3c61 |
SOUP_AVAILABLE_IN_2_42
|
|
rpm-build |
4f3c61 |
SoupSession *soup_session_new_with_options (const char *optname1,
|
|
rpm-build |
4f3c61 |
...) G_GNUC_NULL_TERMINATED;
|
|
rpm-build |
4f3c61 |
|
|
rpm-build |
4f3c61 |
SOUP_AVAILABLE_IN_2_4
|
|
rpm-build |
4f3c61 |
void soup_session_queue_message (SoupSession *session,
|
|
rpm-build |
4f3c61 |
SoupMessage *msg,
|
|
rpm-build |
4f3c61 |
SoupSessionCallback callback,
|
|
rpm-build |
4f3c61 |
gpointer user_data);
|
|
rpm-build |
4f3c61 |
SOUP_AVAILABLE_IN_2_4
|
|
rpm-build |
4f3c61 |
void soup_session_requeue_message (SoupSession *session,
|
|
rpm-build |
4f3c61 |
SoupMessage *msg);
|
|
rpm-build |
4f3c61 |
|
|
rpm-build |
4f3c61 |
SOUP_AVAILABLE_IN_2_4
|
|
rpm-build |
4f3c61 |
guint soup_session_send_message (SoupSession *session,
|
|
rpm-build |
4f3c61 |
SoupMessage *msg);
|
|
rpm-build |
4f3c61 |
|
|
rpm-build |
4f3c61 |
SOUP_AVAILABLE_IN_2_4
|
|
rpm-build |
4f3c61 |
void soup_session_pause_message (SoupSession *session,
|
|
rpm-build |
4f3c61 |
SoupMessage *msg);
|
|
rpm-build |
4f3c61 |
SOUP_AVAILABLE_IN_2_4
|
|
rpm-build |
4f3c61 |
void soup_session_unpause_message (SoupSession *session,
|
|
rpm-build |
4f3c61 |
SoupMessage *msg);
|
|
rpm-build |
4f3c61 |
|
|
rpm-build |
4f3c61 |
SOUP_AVAILABLE_IN_2_4
|
|
rpm-build |
4f3c61 |
void soup_session_cancel_message (SoupSession *session,
|
|
rpm-build |
4f3c61 |
SoupMessage *msg,
|
|
rpm-build |
4f3c61 |
guint status_code);
|
|
rpm-build |
4f3c61 |
SOUP_AVAILABLE_IN_2_4
|
|
rpm-build |
4f3c61 |
void soup_session_abort (SoupSession *session);
|
|
rpm-build |
4f3c61 |
|
|
rpm-build |
4f3c61 |
SOUP_AVAILABLE_IN_2_4
|
|
rpm-build |
4f3c61 |
GMainContext *soup_session_get_async_context(SoupSession *session);
|
|
rpm-build |
4f3c61 |
|
|
rpm-build |
4f3c61 |
SOUP_AVAILABLE_IN_2_42
|
|
rpm-build |
4f3c61 |
void soup_session_send_async (SoupSession *session,
|
|
rpm-build |
4f3c61 |
SoupMessage *msg,
|
|
rpm-build |
4f3c61 |
GCancellable *cancellable,
|
|
rpm-build |
4f3c61 |
GAsyncReadyCallback callback,
|
|
rpm-build |
4f3c61 |
gpointer user_data);
|
|
rpm-build |
4f3c61 |
SOUP_AVAILABLE_IN_2_42
|
|
rpm-build |
4f3c61 |
GInputStream *soup_session_send_finish (SoupSession *session,
|
|
rpm-build |
4f3c61 |
GAsyncResult *result,
|
|
rpm-build |
4f3c61 |
GError **error);
|
|
rpm-build |
4f3c61 |
SOUP_AVAILABLE_IN_2_42
|
|
rpm-build |
4f3c61 |
GInputStream *soup_session_send (SoupSession *session,
|
|
rpm-build |
4f3c61 |
SoupMessage *msg,
|
|
rpm-build |
4f3c61 |
GCancellable *cancellable,
|
|
rpm-build |
4f3c61 |
GError **error);
|
|
rpm-build |
4f3c61 |
|
|
rpm-build |
4f3c61 |
#ifndef SOUP_DISABLE_DEPRECATED
|
|
rpm-build |
4f3c61 |
SOUP_AVAILABLE_IN_2_30
|
|
rpm-build |
4f3c61 |
SOUP_DEPRECATED_IN_2_38_FOR (soup_session_prefetch_dns)
|
|
rpm-build |
4f3c61 |
void soup_session_prepare_for_uri (SoupSession *session,
|
|
rpm-build |
4f3c61 |
SoupURI *uri);
|
|
rpm-build |
4f3c61 |
#endif
|
|
rpm-build |
4f3c61 |
|
|
rpm-build |
4f3c61 |
SOUP_AVAILABLE_IN_2_38
|
|
rpm-build |
4f3c61 |
void soup_session_prefetch_dns (SoupSession *session,
|
|
rpm-build |
4f3c61 |
const char *hostname,
|
|
rpm-build |
4f3c61 |
GCancellable *cancellable,
|
|
rpm-build |
4f3c61 |
SoupAddressCallback callback,
|
|
rpm-build |
4f3c61 |
gpointer user_data);
|
|
rpm-build |
4f3c61 |
|
|
rpm-build |
4f3c61 |
SOUP_AVAILABLE_IN_2_38
|
|
rpm-build |
4f3c61 |
gboolean soup_session_would_redirect (SoupSession *session,
|
|
rpm-build |
4f3c61 |
SoupMessage *msg);
|
|
rpm-build |
4f3c61 |
SOUP_AVAILABLE_IN_2_38
|
|
rpm-build |
4f3c61 |
gboolean soup_session_redirect_message (SoupSession *session,
|
|
rpm-build |
4f3c61 |
SoupMessage *msg);
|
|
rpm-build |
4f3c61 |
|
|
rpm-build |
4f3c61 |
SOUP_AVAILABLE_IN_2_24
|
|
rpm-build |
4f3c61 |
void soup_session_add_feature (SoupSession *session,
|
|
rpm-build |
4f3c61 |
SoupSessionFeature *feature);
|
|
rpm-build |
4f3c61 |
SOUP_AVAILABLE_IN_2_24
|
|
rpm-build |
4f3c61 |
void soup_session_add_feature_by_type (SoupSession *session,
|
|
rpm-build |
4f3c61 |
GType feature_type);
|
|
rpm-build |
4f3c61 |
SOUP_AVAILABLE_IN_2_24
|
|
rpm-build |
4f3c61 |
void soup_session_remove_feature (SoupSession *session,
|
|
rpm-build |
4f3c61 |
SoupSessionFeature *feature);
|
|
rpm-build |
4f3c61 |
SOUP_AVAILABLE_IN_2_24
|
|
rpm-build |
4f3c61 |
void soup_session_remove_feature_by_type (SoupSession *session,
|
|
rpm-build |
4f3c61 |
GType feature_type);
|
|
rpm-build |
4f3c61 |
SOUP_AVAILABLE_IN_2_42
|
|
rpm-build |
4f3c61 |
gboolean soup_session_has_feature (SoupSession *session,
|
|
rpm-build |
4f3c61 |
GType feature_type);
|
|
rpm-build |
4f3c61 |
SOUP_AVAILABLE_IN_2_26
|
|
rpm-build |
4f3c61 |
GSList *soup_session_get_features (SoupSession *session,
|
|
rpm-build |
4f3c61 |
GType feature_type);
|
|
rpm-build |
4f3c61 |
SOUP_AVAILABLE_IN_2_26
|
|
rpm-build |
4f3c61 |
SoupSessionFeature *soup_session_get_feature (SoupSession *session,
|
|
rpm-build |
4f3c61 |
GType feature_type);
|
|
rpm-build |
4f3c61 |
SOUP_AVAILABLE_IN_2_28
|
|
rpm-build |
4f3c61 |
SoupSessionFeature *soup_session_get_feature_for_message(SoupSession *session,
|
|
rpm-build |
4f3c61 |
GType feature_type,
|
|
rpm-build |
4f3c61 |
SoupMessage *msg);
|
|
rpm-build |
4f3c61 |
|
|
rpm-build |
4f3c61 |
SOUP_AVAILABLE_IN_2_42
|
|
rpm-build |
4f3c61 |
SoupRequest *soup_session_request (SoupSession *session,
|
|
rpm-build |
4f3c61 |
const char *uri_string,
|
|
rpm-build |
4f3c61 |
GError **error);
|
|
rpm-build |
4f3c61 |
SOUP_AVAILABLE_IN_2_42
|
|
rpm-build |
4f3c61 |
SoupRequest *soup_session_request_uri (SoupSession *session,
|
|
rpm-build |
4f3c61 |
SoupURI *uri,
|
|
rpm-build |
4f3c61 |
GError **error);
|
|
rpm-build |
4f3c61 |
SOUP_AVAILABLE_IN_2_42
|
|
rpm-build |
4f3c61 |
SoupRequestHTTP *soup_session_request_http (SoupSession *session,
|
|
rpm-build |
4f3c61 |
const char *method,
|
|
rpm-build |
4f3c61 |
const char *uri_string,
|
|
rpm-build |
4f3c61 |
GError **error);
|
|
rpm-build |
4f3c61 |
SOUP_AVAILABLE_IN_2_42
|
|
rpm-build |
4f3c61 |
SoupRequestHTTP *soup_session_request_http_uri (SoupSession *session,
|
|
rpm-build |
4f3c61 |
const char *method,
|
|
rpm-build |
4f3c61 |
SoupURI *uri,
|
|
rpm-build |
4f3c61 |
GError **error);
|
|
rpm-build |
4f3c61 |
|
|
rpm-build |
4f3c61 |
SOUP_AVAILABLE_IN_2_42
|
|
rpm-build |
4f3c61 |
GQuark soup_request_error_quark (void);
|
|
rpm-build |
4f3c61 |
#define SOUP_REQUEST_ERROR soup_request_error_quark ()
|
|
rpm-build |
4f3c61 |
|
|
rpm-build |
4f3c61 |
typedef enum {
|
|
rpm-build |
4f3c61 |
SOUP_REQUEST_ERROR_BAD_URI,
|
|
rpm-build |
4f3c61 |
SOUP_REQUEST_ERROR_UNSUPPORTED_URI_SCHEME,
|
|
rpm-build |
4f3c61 |
SOUP_REQUEST_ERROR_PARSING,
|
|
rpm-build |
4f3c61 |
SOUP_REQUEST_ERROR_ENCODING
|
|
rpm-build |
4f3c61 |
} SoupRequestError;
|
|
rpm-build |
4f3c61 |
|
|
rpm-build |
4f3c61 |
SOUP_AVAILABLE_IN_2_50
|
|
rpm-build |
4f3c61 |
GIOStream *soup_session_steal_connection (SoupSession *session,
|
|
rpm-build |
4f3c61 |
SoupMessage *msg);
|
|
rpm-build |
4f3c61 |
|
|
rpm-build |
4f3c61 |
SOUP_AVAILABLE_IN_2_50
|
|
rpm-build |
4f3c61 |
void soup_session_websocket_connect_async (SoupSession *session,
|
|
rpm-build |
4f3c61 |
SoupMessage *msg,
|
|
rpm-build |
4f3c61 |
const char *origin,
|
|
rpm-build |
4f3c61 |
char **protocols,
|
|
rpm-build |
4f3c61 |
GCancellable *cancellable,
|
|
rpm-build |
4f3c61 |
GAsyncReadyCallback callback,
|
|
rpm-build |
4f3c61 |
gpointer user_data);
|
|
rpm-build |
4f3c61 |
|
|
rpm-build |
4f3c61 |
SOUP_AVAILABLE_IN_2_50
|
|
rpm-build |
4f3c61 |
SoupWebsocketConnection *soup_session_websocket_connect_finish (SoupSession *session,
|
|
rpm-build |
4f3c61 |
GAsyncResult *result,
|
|
rpm-build |
4f3c61 |
GError **error);
|
|
rpm-build |
4f3c61 |
|
|
rpm-build |
4f3c61 |
typedef void (*SoupSessionConnectProgressCallback) (SoupSession *session,
|
|
rpm-build |
4f3c61 |
GSocketClientEvent event,
|
|
rpm-build |
4f3c61 |
GIOStream *connection,
|
|
rpm-build |
4f3c61 |
gpointer user_data);
|
|
rpm-build |
4f3c61 |
|
|
rpm-build |
4f3c61 |
SOUP_AVAILABLE_IN_2_62
|
|
rpm-build |
4f3c61 |
void soup_session_connect_async (SoupSession *session,
|
|
rpm-build |
4f3c61 |
SoupURI *uri,
|
|
rpm-build |
4f3c61 |
GCancellable *cancellable,
|
|
rpm-build |
4f3c61 |
SoupSessionConnectProgressCallback progress_callback,
|
|
rpm-build |
4f3c61 |
GAsyncReadyCallback callback,
|
|
rpm-build |
4f3c61 |
gpointer user_data);
|
|
rpm-build |
4f3c61 |
|
|
rpm-build |
4f3c61 |
SOUP_AVAILABLE_IN_2_62
|
|
rpm-build |
4f3c61 |
GIOStream *soup_session_connect_finish (SoupSession *session,
|
|
rpm-build |
4f3c61 |
GAsyncResult *result,
|
|
rpm-build |
4f3c61 |
GError **error);
|
|
rpm-build |
4f3c61 |
|
|
rpm-build |
4f3c61 |
G_END_DECLS
|
|
rpm-build |
4f3c61 |
|
|
rpm-build |
4f3c61 |
#endif /* SOUP_SESSION_H */
|