summaryrefslogtreecommitdiff
path: root/rest/rest-private.h
blob: 8cf2d9e27786a4adf99ea24562e52ef6f280ca0f (plain)
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
#ifndef _REST_PRIVATE
#define _REST_PRIVATE

#include <glib.h>
#include <rest/rest-proxy.h>
#include <libsoup/soup.h>

G_BEGIN_DECLS

typedef enum
{
  REST_DEBUG_XML_PARSER = 1 << 0,
  REST_DEBUG_PROXY = 1 << 1,
  REST_DEBUG_ALL = REST_DEBUG_XML_PARSER | REST_DEBUG_PROXY
} RestDebugFlags;

extern guint rest_debug_flags;

#define REST_DEBUG(category,x,a...)             G_STMT_START {      \
        if (rest_debug_flags & REST_DEBUG_##category)               \
          { g_message ("[" #category "] " G_STRLOC ": " x, ##a); }  \
                                                } G_STMT_END

void _rest_setup_debugging (void);

gboolean _rest_proxy_get_binding_required (RestProxy *proxy);
const gchar *_rest_proxy_get_bound_url (RestProxy *proxy);
void _rest_proxy_queue_message (RestProxy   *proxy,
                                SoupMessage *message);
G_END_DECLS
#endif /* _REST_PRIVATE */