summaryrefslogtreecommitdiffstats
path: root/src/debug.h
diff options
context:
space:
mode:
authorGravatar Martin Szulecki2013-04-25 17:43:54 +0100
committerGravatar Martin Szulecki2013-04-25 17:43:54 +0100
commit4748e1ac72ede8ba1f7a28ec8c1b8d5bb0f0afd3 (patch)
tree708d1ec3ee0fcc3a3f49be45457c5f641c108dc2 /src/debug.h
parent927c34ee8e6974a34b1dfd7d1a4fde5eabbeca7a (diff)
downloadlibimobiledevice-4748e1ac72ede8ba1f7a28ec8c1b8d5bb0f0afd3.tar.gz
libimobiledevice-4748e1ac72ede8ba1f7a28ec8c1b8d5bb0f0afd3.tar.bz2
common: Move debug and userpref code into libinternalcommon
Diffstat (limited to 'src/debug.h')
-rw-r--r--src/debug.h59
1 files changed, 0 insertions, 59 deletions
diff --git a/src/debug.h b/src/debug.h
deleted file mode 100644
index b7cff80..0000000
--- a/src/debug.h
+++ /dev/null
@@ -1,59 +0,0 @@
1/*
2 * debug.h
3 * contains utilitary functions for debugging
4 *
5 * Copyright (c) 2008 Jonathan Beck All Rights Reserved.
6 * Copyright (c) 2010 Martin S. All Rights Reserved.
7 *
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either
11 * version 2.1 of the License, or (at your option) any later version.
12 *
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
17 *
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with this library; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21 */
22
23#ifndef __DEBUG_H
24#define __DEBUG_H
25
26#include <plist/plist.h>
27
28#ifndef LIBIMOBILEDEVICE_INTERNAL
29#ifdef WIN32
30#define LIBIMOBILEDEVICE_INTERNAL
31#else
32#define LIBIMOBILEDEVICE_INTERNAL __attribute__((visibility("hidden")))
33#endif
34#endif
35
36#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L && !defined(STRIP_DEBUG_CODE)
37#define debug_info(...) debug_info_real (__func__, __FILE__, __LINE__, __VA_ARGS__)
38#define debug_plist(a) debug_plist_real (__func__, __FILE__, __LINE__, a)
39#elif defined(__GNUC__) && __GNUC__ >= 3 && !defined(STRIP_DEBUG_CODE)
40#define debug_info(...) debug_info_real (__FUNCTION__, __FILE__, __LINE__, __VA_ARGS__)
41#define debug_plist(a) debug_plist_real (__FUNCTION__, __FILE__, __LINE__, a)
42#else
43#define debug_info(...)
44#define debug_plist(a)
45#endif
46
47LIBIMOBILEDEVICE_INTERNAL inline void debug_info_real(const char *func,
48 const char *file,
49 int line,
50 const char *format, ...);
51
52LIBIMOBILEDEVICE_INTERNAL inline void debug_buffer(const char *data, const int length);
53LIBIMOBILEDEVICE_INTERNAL inline void debug_buffer_to_file(const char *file, const char *data, const int length);
54LIBIMOBILEDEVICE_INTERNAL inline void debug_plist_real(const char *func,
55 const char *file,
56 int line,
57 plist_t plist);
58
59#endif