1 /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ 2 /* 3 * Libbrasero-burn 4 * Copyright (C) Philippe Rouquier 2005-2009 <bonfire-app@wanadoo.fr> 5 * 6 * Libbrasero-burn is free software; you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License as published by 8 * the Free Software Foundation; either version 2 of the License, or 9 * (at your option) any later version. 10 * 11 * The Libbrasero-burn authors hereby grant permission for non-GPL compatible 12 * GStreamer plugins to be used and distributed together with GStreamer 13 * and Libbrasero-burn. This permission is above and beyond the permissions granted 14 * by the GPL license by which Libbrasero-burn is covered. If you modify this code 15 * you may extend this exception to your version of the code, but you are not 16 * obligated to do so. If you do not wish to do so, delete this exception 17 * statement from your version. 18 * 19 * Libbrasero-burn is distributed in the hope that it will be useful, 20 * but WITHOUT ANY WARRANTY; without even the implied warranty of 21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 22 * GNU Library General Public License for more details. 23 * 24 * You should have received a copy of the GNU General Public License 25 * along with this program; if not, write to: 26 * The Free Software Foundation, Inc., 27 * 51 Franklin Street, Fifth Floor 28 * Boston, MA 02110-1301, USA. 29 */ 30 31 #ifndef _BURN_DEBUG_H 32 #define _BURN_DEBUG_H 33 34 #include <glib.h> 35 #include <gmodule.h> 36 37 #include "brasero-medium.h" 38 39 #include "brasero-track.h" 40 #include "brasero-track-type-private.h" 41 #include "brasero-plugin-registration.h" 42 43 G_BEGIN_DECLS 44 45 #define BRASERO_BURN_LOG(format, ...) \ 46 brasero_burn_debug_message (G_STRLOC, \ 47 format, \ 48 ##__VA_ARGS__); 49 50 #define BRASERO_BURN_LOGV(format, args_list) \ 51 brasero_burn_debug_messagev (G_STRLOC, \ 52 format, \ 53 args_list); 54 55 #define BRASERO_BURN_LOG_DISC_TYPE(media_MACRO, format, ...) \ 56 BRASERO_BURN_LOG_WITH_FULL_TYPE (BRASERO_TRACK_TYPE_DISC, \ 57 media_MACRO, \ 58 BRASERO_PLUGIN_IO_NONE, \ 59 format, \ 60 ##__VA_ARGS__); 61 62 #define BRASERO_BURN_LOG_FLAGS(flags_MACRO, format, ...) \ 63 brasero_burn_debug_flags_type_message (flags_MACRO, \ 64 G_STRLOC, \ 65 format, \ 66 ##__VA_ARGS__); 67 68 #define BRASERO_BURN_LOG_TYPE(type_MACRO, format, ...) \ 69 brasero_burn_debug_track_type_struct_message (type_MACRO, \ 70 BRASERO_PLUGIN_IO_NONE, \ 71 G_STRLOC, \ 72 format, \ 73 ##__VA_ARGS__); 74 75 #define BRASERO_BURN_LOG_WITH_TYPE(type_MACRO, flags_MACRO, format, ...) \ 76 BRASERO_BURN_LOG_WITH_FULL_TYPE ((type_MACRO)->type, \ 77 (type_MACRO)->subtype.media, \ 78 flags_MACRO, \ 79 format, \ 80 ##__VA_ARGS__); 81 82 #define BRASERO_BURN_LOG_WITH_FULL_TYPE(type_MACRO, subtype_MACRO, flags_MACRO, format, ...) \ 83 brasero_burn_debug_track_type_message ((type_MACRO), \ 84 (subtype_MACRO), \ 85 (flags_MACRO), \ 86 G_STRLOC, \ 87 format, \ 88 ##__VA_ARGS__); 89 90 void 91 brasero_burn_library_set_debug (gboolean value); 92 93 void 94 brasero_burn_debug_setup_module (GModule *handle); 95 96 void 97 brasero_burn_debug_track_type_struct_message (BraseroTrackType *type, 98 BraseroPluginIOFlag flags, 99 const gchar *location, 100 const gchar *format, 101 ...); 102 void 103 brasero_burn_debug_track_type_message (BraseroTrackDataType type, 104 guint subtype, 105 BraseroPluginIOFlag flags, 106 const gchar *location, 107 const gchar *format, 108 ...); 109 void 110 brasero_burn_debug_flags_type_message (BraseroBurnFlag flags, 111 const gchar *location, 112 const gchar *format, 113 ...); 114 void 115 brasero_burn_debug_message (const gchar *location, 116 const gchar *format, 117 ...); 118 119 void 120 brasero_burn_debug_messagev (const gchar *location, 121 const gchar *format, 122 va_list args); 123 124 G_END_DECLS 125 126 #endif /* _BURN_DEBUG_H */ 127 128 129