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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
|
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
* Copyright (C) 2000-2003, Ximian, Inc.
*/
#pragma once
#include "soup-types.h"
#include "soup-message-body.h"
#include "soup-message-headers.h"
#include "soup-method.h"
#include "soup-multipart.h"
G_BEGIN_DECLS
#define SOUP_TYPE_MESSAGE (soup_message_get_type ())
SOUP_AVAILABLE_IN_ALL
G_DECLARE_FINAL_TYPE (SoupMessage, soup_message, SOUP, MESSAGE, GObject)
SOUP_AVAILABLE_IN_2_4
SoupMessage *soup_message_new (const char *method,
const char *uri_string);
SOUP_AVAILABLE_IN_2_4
SoupMessage *soup_message_new_from_uri (const char *method,
SoupURI *uri);
SOUP_AVAILABLE_IN_ALL
SoupMessage *soup_message_new_from_encoded_form (const char *method,
const char *uri_string,
char *encoded_form);
SOUP_AVAILABLE_IN_ALL
SoupMessage *soup_message_new_from_multipart (const char *uri_string,
SoupMultipart *multipart);
SOUP_AVAILABLE_IN_ALL
void soup_message_set_request_body (SoupMessage *msg,
const char *content_type,
GInputStream *stream,
gssize content_length);
SOUP_AVAILABLE_IN_ALL
void soup_message_set_request_body_from_bytes (SoupMessage *msg,
const char *content_type,
GBytes *bytes);
SOUP_AVAILABLE_IN_2_4
void soup_message_set_http_version (SoupMessage *msg,
SoupHTTPVersion version);
SOUP_AVAILABLE_IN_2_4
SoupHTTPVersion soup_message_get_http_version (SoupMessage *msg);
SOUP_AVAILABLE_IN_2_4
gboolean soup_message_is_keepalive (SoupMessage *msg);
SOUP_AVAILABLE_IN_2_4
SoupURI *soup_message_get_uri (SoupMessage *msg);
SOUP_AVAILABLE_IN_2_4
void soup_message_set_uri (SoupMessage *msg,
SoupURI *uri);
SOUP_AVAILABLE_IN_2_30
SoupURI *soup_message_get_first_party (SoupMessage *msg);
SOUP_AVAILABLE_IN_2_30
void soup_message_set_first_party (SoupMessage *msg,
SoupURI *first_party);
SOUP_AVAILABLE_IN_2_70
SoupURI *soup_message_get_site_for_cookies (SoupMessage *msg);
SOUP_AVAILABLE_IN_2_70
void soup_message_set_site_for_cookies (SoupMessage *msg,
SoupURI *site_for_cookies);
SOUP_AVAILABLE_IN_2_70
void soup_message_set_is_top_level_navigation (SoupMessage *msg,
gboolean is_top_level_navigation);
SOUP_AVAILABLE_IN_2_70
gboolean soup_message_get_is_top_level_navigation (SoupMessage *msg);
typedef enum {
SOUP_MESSAGE_NO_REDIRECT = (1 << 1),
SOUP_MESSAGE_NEW_CONNECTION = (1 << 2),
SOUP_MESSAGE_IDEMPOTENT = (1 << 3),
SOUP_MESSAGE_DO_NOT_USE_AUTH_CACHE = (1 << 4)
} SoupMessageFlags;
SOUP_AVAILABLE_IN_2_4
void soup_message_set_flags (SoupMessage *msg,
SoupMessageFlags flags);
SOUP_AVAILABLE_IN_2_4
SoupMessageFlags soup_message_get_flags (SoupMessage *msg);
SOUP_AVAILABLE_IN_ALL
void soup_message_add_flags (SoupMessage *msg,
SoupMessageFlags flags);
SOUP_AVAILABLE_IN_ALL
void soup_message_remove_flags (SoupMessage *msg,
SoupMessageFlags flags);
SOUP_AVAILABLE_IN_ALL
gboolean soup_message_query_flags (SoupMessage *msg,
SoupMessageFlags flags);
SOUP_AVAILABLE_IN_ALL
GTlsCertificate *soup_message_get_tls_certificate (SoupMessage *msg);
SOUP_AVAILABLE_IN_ALL
GTlsCertificateFlags soup_message_get_tls_certificate_errors (SoupMessage *msg);
/* Specialized signal handlers */
SOUP_AVAILABLE_IN_2_4
guint soup_message_add_header_handler (SoupMessage *msg,
const char *signal,
const char *header,
GCallback callback,
gpointer user_data);
SOUP_AVAILABLE_IN_2_4
guint soup_message_add_status_code_handler (
SoupMessage *msg,
const char *signal,
guint status_code,
GCallback callback,
gpointer user_data);
/*
* Status Setting
*/
SOUP_AVAILABLE_IN_2_4
void soup_message_set_status (SoupMessage *msg,
guint status_code);
SOUP_AVAILABLE_IN_2_4
void soup_message_set_status_full (SoupMessage *msg,
guint status_code,
const char *reason_phrase);
SOUP_AVAILABLE_IN_2_28
void soup_message_disable_feature (SoupMessage *msg,
GType feature_type);
SOUP_AVAILABLE_IN_2_72
gboolean soup_message_is_feature_disabled (SoupMessage *msg,
GType feature_type);
typedef enum {
SOUP_MESSAGE_PRIORITY_VERY_LOW = 0,
SOUP_MESSAGE_PRIORITY_LOW,
SOUP_MESSAGE_PRIORITY_NORMAL,
SOUP_MESSAGE_PRIORITY_HIGH,
SOUP_MESSAGE_PRIORITY_VERY_HIGH
} SoupMessagePriority;
SOUP_AVAILABLE_IN_2_44
void soup_message_set_priority (SoupMessage *msg,
SoupMessagePriority priority);
SOUP_AVAILABLE_IN_2_44
SoupMessagePriority soup_message_get_priority (SoupMessage *msg);
SOUP_AVAILABLE_IN_ALL
const char *soup_message_get_method (SoupMessage *msg);
SOUP_AVAILABLE_IN_ALL
SoupStatus soup_message_get_status (SoupMessage *msg);
SOUP_AVAILABLE_IN_ALL
const char *soup_message_get_reason_phrase (SoupMessage *msg);
SOUP_AVAILABLE_IN_ALL
SoupMessageHeaders *soup_message_get_request_headers (SoupMessage *msg);
SOUP_AVAILABLE_IN_ALL
SoupMessageHeaders *soup_message_get_response_headers (SoupMessage *msg);
G_END_DECLS
|