1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
3 * Copyright 2011 Igalia, S.L.
4 * Copyright 2011 Red Hat, Inc.
7 #ifndef __SOUP_MISC_PRIVATE_H__
8 #define __SOUP_MISC_PRIVATE_H__ 1
10 #include "soup-message-headers.h"
12 char *soup_uri_decoded_copy (const char *str, int length, int *decoded_length);
13 char *soup_uri_to_string_internal (SoupURI *uri, gboolean just_path_and_query,
14 gboolean include_password, gboolean force_port);
15 gboolean soup_uri_is_http (SoupURI *uri, char **aliases);
16 gboolean soup_uri_is_https (SoupURI *uri, char **aliases);
18 /* At some point it might be possible to mark additional methods
19 * safe or idempotent...
21 #define SOUP_METHOD_IS_SAFE(method) (method == SOUP_METHOD_GET || \
22 method == SOUP_METHOD_HEAD || \
23 method == SOUP_METHOD_OPTIONS || \
24 method == SOUP_METHOD_PROPFIND || \
25 method == SOUP_METHOD_TRACE)
27 #define SOUP_METHOD_IS_IDEMPOTENT(method) (method == SOUP_METHOD_GET || \
28 method == SOUP_METHOD_HEAD || \
29 method == SOUP_METHOD_OPTIONS || \
30 method == SOUP_METHOD_PROPFIND || \
31 method == SOUP_METHOD_TRACE || \
32 method == SOUP_METHOD_PUT || \
33 method == SOUP_METHOD_DELETE)
35 GSource *soup_add_completion_reffed (GMainContext *async_context,
38 GDestroyNotify dnotify);
40 guint soup_message_headers_get_ranges_internal (SoupMessageHeaders *hdrs,
42 gboolean check_satisfiable,
46 SoupAddress *soup_address_new_from_gsockaddr (GSocketAddress *addr);
48 gboolean soup_host_matches_host (const gchar *host,
49 const gchar *compare_with);
51 #endif /* __SOUP_MISC_PRIVATE_H__ */