1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
3 * soup-message.h: Asyncronous Callback-based SOAP Request Queue.
6 * Alex Graveley (alex@helixcode.com)
8 * Copyright (C) 2000, Helix Code, Inc.
11 #ifndef SOUP_MESSAGE_H
12 #define SOUP_MESSAGE_H 1
15 #include "soup-context.h"
20 SOUP_ERROR_CANT_CONNECT,
22 SOUP_ERROR_MALFORMED_HEADER,
23 SOUP_ERROR_CANT_AUTHENTICATE,
30 SOUP_STATUS_CONNECTING,
31 SOUP_STATUS_SENDING_REQUEST,
32 SOUP_STATUS_READING_RESPONSE,
37 SOUP_BUFFER_SYSTEM_OWNED = 0,
38 SOUP_BUFFER_USER_OWNED,
48 typedef gchar * SoupAction;
50 typedef struct _SoupMessage SoupMessage;
51 typedef struct _SoupMessagePrivate SoupMessagePrivate;
54 SoupMessagePrivate *priv;
58 SoupTransferStatus status;
62 SoupDataBuffer request;
63 GHashTable *request_headers;
65 SoupDataBuffer response;
67 const gchar *response_phrase;
68 GHashTable *response_headers;
71 typedef void (*SoupCallbackFn) (SoupMessage *req,
75 SoupMessage *soup_message_new (SoupContext *context,
78 SoupMessage *soup_message_new_full (SoupContext *context,
80 SoupOwnership req_owner,
84 void soup_message_free (SoupMessage *req);
86 void soup_message_cancel (SoupMessage *req);
88 SoupErrorCode soup_message_send (SoupMessage *msg);
90 void soup_message_queue (SoupMessage *req,
91 SoupCallbackFn callback,
94 void soup_message_set_request_header (SoupMessage *req,
98 const gchar *soup_message_get_request_header (SoupMessage *req,
101 void soup_message_set_response_header (SoupMessage *req,
105 const gchar *soup_message_get_response_header (SoupMessage *req,
108 /* FIXME: None of these are implemented yet, oh well... */
110 SOUP_MESSAGE_FOLLOW_REDIRECT = (1 << 1),
111 SOUP_MESSAGE_NO_COOKIE = (1 << 2),
112 SOUP_MESSAGE_PROCESS_CHUNKS = (1 << 3)
115 void soup_message_set_flags (SoupMessage *msg,
118 guint soup_message_get_flags (SoupMessage *msg);
120 #endif /*SOUP_MESSAGE_H*/