1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
3 * Copyright (C) 2000-2003, Ximian, Inc.
9 #include <libsoup/soup-types.h>
13 /* Non-default-GMainContext operations */
14 GSource *soup_add_io_watch (GMainContext *async_context,
16 GIOCondition condition,
19 GSource *soup_add_idle (GMainContext *async_context,
22 SOUP_AVAILABLE_IN_2_24
23 GSource *soup_add_completion (GMainContext *async_context,
26 GSource *soup_add_timeout (GMainContext *async_context,
33 guint soup_str_case_hash (gconstpointer key);
34 gboolean soup_str_case_equal (gconstpointer v1,
37 #define _SOUP_ATOMIC_INTERN_STRING(variable, value) ((const char *)(g_atomic_pointer_get (&(variable)) ? (variable) : (g_atomic_pointer_set (&(variable), (gpointer)g_intern_static_string (value)), (variable))))
39 /* character classes */
41 extern const char soup_char_attributes[];
42 #define SOUP_CHAR_URI_PERCENT_ENCODED 0x01
43 #define SOUP_CHAR_URI_GEN_DELIMS 0x02
44 #define SOUP_CHAR_URI_SUB_DELIMS 0x04
45 #define SOUP_CHAR_HTTP_SEPARATOR 0x08
46 #define SOUP_CHAR_HTTP_CTL 0x10
48 #define soup_char_is_uri_percent_encoded(ch) (soup_char_attributes[(guchar)ch] & SOUP_CHAR_URI_PERCENT_ENCODED)
49 #define soup_char_is_uri_gen_delims(ch) (soup_char_attributes[(guchar)ch] & SOUP_CHAR_URI_GEN_DELIMS)
50 #define soup_char_is_uri_sub_delims(ch) (soup_char_attributes[(guchar)ch] & SOUP_CHAR_URI_SUB_DELIMS)
51 #define soup_char_is_uri_unreserved(ch) (!(soup_char_attributes[(guchar)ch] & (SOUP_CHAR_URI_PERCENT_ENCODED | SOUP_CHAR_URI_GEN_DELIMS | SOUP_CHAR_URI_SUB_DELIMS)))
52 #define soup_char_is_token(ch) (!(soup_char_attributes[(guchar)ch] & (SOUP_CHAR_HTTP_SEPARATOR | SOUP_CHAR_HTTP_CTL)))
56 extern const gboolean soup_ssl_supported;
58 /* Part of a debugging API */
62 SOUP_CONNECTION_CONNECTING,
64 SOUP_CONNECTION_IN_USE,
65 SOUP_CONNECTION_REMOTE_DISCONNECTED,
66 SOUP_CONNECTION_DISCONNECTED
67 } SoupConnectionState;
71 #endif /* SOUP_MISC_H */