• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
2 /*
3  * Copyright 2011 Igalia, S.L.
4  * Copyright 2011 Red Hat, Inc.
5  */
6 
7 #ifndef __SOUP_MISC_PRIVATE_H__
8 #define __SOUP_MISC_PRIVATE_H__ 1
9 
10 #include "soup-message-headers.h"
11 
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);
17 
18 /* At some point it might be possible to mark additional methods
19  * safe or idempotent...
20  */
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)
26 
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)
34 
35 GSource *soup_add_completion_reffed (GMainContext   *async_context,
36 				     GSourceFunc     function,
37 				     gpointer        data,
38 				     GDestroyNotify  dnotify);
39 
40 guint soup_message_headers_get_ranges_internal (SoupMessageHeaders  *hdrs,
41 						goffset              total_length,
42 						gboolean             check_satisfiable,
43 						SoupRange          **ranges,
44 						int                 *length);
45 
46 SoupAddress *soup_address_new_from_gsockaddr (GSocketAddress *addr);
47 
48 gboolean           soup_host_matches_host    (const gchar *host,
49 					      const gchar *compare_with);
50 
51 #endif /* __SOUP_MISC_PRIVATE_H__ */
52