summaryrefslogtreecommitdiffstats
path: root/gtk/spice-util.h
blob: aaf16c77c699a3986457c77ec2aac4d458b81c7f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#ifndef SPICE_UTIL_H
#define SPICE_UTIL_H

#include <glib.h>

G_BEGIN_DECLS

void spice_util_set_debug(gboolean enabled);
gboolean spice_util_get_debug(void);
const gchar *spice_util_get_version_string(void);

#define SPICE_DEBUG(fmt, ...)                                   \
    do {                                                        \
        if (G_UNLIKELY(spice_util_get_debug()))                 \
            g_debug(__FILE__ " " fmt, ## __VA_ARGS__);          \
    } while (0)

G_END_DECLS

#endif /* SPICE_UTIL_H */