/usr/include/libsoup-2.4/libsoup/soup-server.h is in libsoup2.4-dev 2.52.2-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 | /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
* Copyright (C) 2000-2003, Ximian, Inc.
*/
#ifndef SOUP_SERVER_H
#define SOUP_SERVER_H 1
#include <libsoup/soup-types.h>
#include <libsoup/soup-uri.h>
#include <libsoup/soup-websocket-connection.h>
G_BEGIN_DECLS
#define SOUP_TYPE_SERVER (soup_server_get_type ())
#define SOUP_SERVER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SOUP_TYPE_SERVER, SoupServer))
#define SOUP_SERVER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SOUP_TYPE_SERVER, SoupServerClass))
#define SOUP_IS_SERVER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SOUP_TYPE_SERVER))
#define SOUP_IS_SERVER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), SOUP_TYPE_SERVER))
#define SOUP_SERVER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SOUP_TYPE_SERVER, SoupServerClass))
typedef struct SoupClientContext SoupClientContext;
GType soup_client_context_get_type (void);
#define SOUP_TYPE_CLIENT_CONTEXT (soup_client_context_get_type ())
typedef enum {
SOUP_SERVER_LISTEN_HTTPS = (1 << 0),
SOUP_SERVER_LISTEN_IPV4_ONLY = (1 << 1),
SOUP_SERVER_LISTEN_IPV6_ONLY = (1 << 2)
} SoupServerListenOptions;
struct _SoupServer {
GObject parent;
};
typedef struct {
GObjectClass parent_class;
/* signals */
void (*request_started) (SoupServer *server, SoupMessage *msg,
SoupClientContext *client);
void (*request_read) (SoupServer *server, SoupMessage *msg,
SoupClientContext *client);
void (*request_finished) (SoupServer *server, SoupMessage *msg,
SoupClientContext *client);
void (*request_aborted) (SoupServer *server, SoupMessage *msg,
SoupClientContext *client);
/* Padding for future expansion */
void (*_libsoup_reserved1) (void);
void (*_libsoup_reserved2) (void);
void (*_libsoup_reserved3) (void);
void (*_libsoup_reserved4) (void);
} SoupServerClass;
GType soup_server_get_type (void);
#define SOUP_SERVER_TLS_CERTIFICATE "tls-certificate"
#define SOUP_SERVER_RAW_PATHS "raw-paths"
#define SOUP_SERVER_SERVER_HEADER "server-header"
#define SOUP_SERVER_HTTP_ALIASES "http-aliases"
#define SOUP_SERVER_HTTPS_ALIASES "https-aliases"
SoupServer *soup_server_new (const char *optname1,
...) G_GNUC_NULL_TERMINATED;
SOUP_AVAILABLE_IN_2_48
gboolean soup_server_set_ssl_cert_file (SoupServer *server,
const char *ssl_cert_file,
const char *ssl_key_file,
GError **error);
gboolean soup_server_is_https (SoupServer *server);
SOUP_AVAILABLE_IN_2_48
gboolean soup_server_listen (SoupServer *server,
GSocketAddress *address,
SoupServerListenOptions options,
GError **error);
SOUP_AVAILABLE_IN_2_48
gboolean soup_server_listen_all (SoupServer *server,
guint port,
SoupServerListenOptions options,
GError **error);
SOUP_AVAILABLE_IN_2_48
gboolean soup_server_listen_local (SoupServer *server,
guint port,
SoupServerListenOptions options,
GError **error);
SOUP_AVAILABLE_IN_2_48
gboolean soup_server_listen_socket (SoupServer *server,
GSocket *socket,
SoupServerListenOptions options,
GError **error);
SOUP_AVAILABLE_IN_2_48
gboolean soup_server_listen_fd (SoupServer *server,
int fd,
SoupServerListenOptions options,
GError **error);
SOUP_AVAILABLE_IN_2_48
GSList *soup_server_get_uris (SoupServer *server);
SOUP_AVAILABLE_IN_2_48
GSList *soup_server_get_listeners (SoupServer *server);
void soup_server_disconnect (SoupServer *server);
SOUP_AVAILABLE_IN_2_50
gboolean soup_server_accept_iostream (SoupServer *server,
GIOStream *stream,
GSocketAddress *local_addr,
GSocketAddress *remote_addr,
GError **error);
/* Handlers and auth */
typedef void (*SoupServerCallback) (SoupServer *server,
SoupMessage *msg,
const char *path,
GHashTable *query,
SoupClientContext *client,
gpointer user_data);
void soup_server_add_handler (SoupServer *server,
const char *path,
SoupServerCallback callback,
gpointer user_data,
GDestroyNotify destroy);
SOUP_AVAILABLE_IN_2_50
void soup_server_add_early_handler (SoupServer *server,
const char *path,
SoupServerCallback callback,
gpointer user_data,
GDestroyNotify destroy);
typedef void (*SoupServerWebsocketCallback) (SoupServer *server,
SoupWebsocketConnection *connection,
const char *path,
SoupClientContext *client,
gpointer user_data);
SOUP_AVAILABLE_IN_2_50
void soup_server_add_websocket_handler (SoupServer *server,
const char *path,
const char *origin,
char **protocols,
SoupServerWebsocketCallback callback,
gpointer user_data,
GDestroyNotify destroy);
void soup_server_remove_handler (SoupServer *server,
const char *path);
void soup_server_add_auth_domain (SoupServer *server,
SoupAuthDomain *auth_domain);
void soup_server_remove_auth_domain (SoupServer *server,
SoupAuthDomain *auth_domain);
/* I/O */
void soup_server_pause_message (SoupServer *server,
SoupMessage *msg);
void soup_server_unpause_message (SoupServer *server,
SoupMessage *msg);
/* Client context */
SOUP_AVAILABLE_IN_2_48
GSocket *soup_client_context_get_gsocket (SoupClientContext *client);
SOUP_AVAILABLE_IN_2_48
GSocketAddress *soup_client_context_get_local_address (SoupClientContext *client);
SOUP_AVAILABLE_IN_2_48
GSocketAddress *soup_client_context_get_remote_address (SoupClientContext *client);
const char *soup_client_context_get_host (SoupClientContext *client);
SoupAuthDomain *soup_client_context_get_auth_domain (SoupClientContext *client);
const char *soup_client_context_get_auth_user (SoupClientContext *client);
SOUP_AVAILABLE_IN_2_50
GIOStream *soup_client_context_steal_connection (SoupClientContext *client);
/* Legacy API */
#define SOUP_SERVER_PORT "port"
#define SOUP_SERVER_INTERFACE "interface"
#define SOUP_SERVER_ASYNC_CONTEXT "async-context"
#define SOUP_SERVER_SSL_CERT_FILE "ssl-cert-file"
#define SOUP_SERVER_SSL_KEY_FILE "ssl-key-file"
SOUP_DEPRECATED_IN_2_48
guint soup_server_get_port (SoupServer *server);
SOUP_DEPRECATED_IN_2_48
SoupSocket *soup_server_get_listener (SoupServer *server);
SOUP_DEPRECATED_IN_2_48
GMainContext *soup_server_get_async_context (SoupServer *server);
SOUP_DEPRECATED_IN_2_48
void soup_server_run (SoupServer *server);
SOUP_DEPRECATED_IN_2_48
void soup_server_run_async (SoupServer *server);
SOUP_DEPRECATED_IN_2_48
void soup_server_quit (SoupServer *server);
SOUP_DEPRECATED_IN_2_48
SoupAddress *soup_client_context_get_address (SoupClientContext *client);
SOUP_DEPRECATED_IN_2_48
SoupSocket *soup_client_context_get_socket (SoupClientContext *client);
G_END_DECLS
#endif /* SOUP_SERVER_H */
|