| libMirage Reference Manual | ||||
|---|---|---|---|---|
| Top | Description | ||||
#include <mirage.h> enum MIRAGE_DebugMasks; #define MIRAGE_DEBUG (obj, lvl, msg...) MIRAGE_DebugContext; gboolean mirage_debug_context_set_debug_mask (MIRAGE_DebugContext *self,gint debug_mask,GError **error); gboolean mirage_debug_context_get_debug_mask (MIRAGE_DebugContext *self,gint *debug_mask,GError **error); gboolean mirage_debug_context_set_domain (MIRAGE_DebugContext *self,const gchar *domain,GError **error); gboolean mirage_debug_context_get_domain (MIRAGE_DebugContext *self,const gchar **domain,GError **error); gboolean mirage_debug_context_set_name (MIRAGE_DebugContext *self,const gchar *name,GError **error); gboolean mirage_debug_context_get_name (MIRAGE_DebugContext *self,const gchar **name,GError **error);
typedef enum {
/* Debug types */
MIRAGE_DEBUG_ERROR = 0x00F1,
MIRAGE_DEBUG_WARNING = 0x00F2,
/* Debug masks */
MIRAGE_DEBUG_GOBJECT = 0x0001,
MIRAGE_DEBUG_CHAIN = 0x0002,
MIRAGE_DEBUG_PARSER = 0x0004,
MIRAGE_DEBUG_DISC = 0x0008,
MIRAGE_DEBUG_SESSION = 0x0010,
MIRAGE_DEBUG_TRACK = 0x0020,
MIRAGE_DEBUG_SECTOR = 0x0040,
MIRAGE_DEBUG_FRAGMENT = 0x0080,
MIRAGE_DEBUG_CDTEXT = 0x0100,
} MIRAGE_DebugMasks;
Debug message types and debug masks used to control verbosity of various parts of libMirage.
All masks except MIRAGE_DEBUG_ERROR and MIRAGE_DEBUG_WARNING can be combined
together to control verbosity of libMirage.
| error message | |
| warning message | |
| message belonging to GObject functions | |
| message belonging to change propagation chain | |
| message belonging to parser | |
| message belonging to disc | |
| message belonging to session | |
| message belonging to track | |
| message belonging to sector | |
| message belonging to fragment | |
| message belonging to CD-TEXT encoder/decoder |
#define MIRAGE_DEBUG(obj, lvl, msg...)
Debugging macro, provided for convenience. It performs cast to MIRAGE_Object
on obj, then calls mirage_object_debug_message() with debug level lvl and
debug message msg....
|
object |
|
debug level |
|
debug message |
typedef struct {
GObject parent;
} MIRAGE_DebugContext;
Contains private data only, and should be accessed using the functions below.
gboolean mirage_debug_context_set_debug_mask (MIRAGE_DebugContext *self,gint debug_mask,GError **error);
Sets debug context's debug mask.
|
a MIRAGE_DebugContext |
|
debug mask |
|
location to store error, or NULL
|
Returns : |
TRUE on success, FALSE on failure |
gboolean mirage_debug_context_get_debug_mask (MIRAGE_DebugContext *self,gint *debug_mask,GError **error);
Retrieves debug context's debug mask.
|
a MIRAGE_DebugContext |
|
location to store debug mask |
|
location to store error, or NULL
|
Returns : |
TRUE on success, FALSE on failure |
gboolean mirage_debug_context_set_domain (MIRAGE_DebugContext *self,const gchar *domain,GError **error);
Sets debug context's domain name to domain.
|
a MIRAGE_DebugContext |
|
domain name |
|
location to store error, or NULL
|
Returns : |
TRUE on success, FALSE on failure |
gboolean mirage_debug_context_get_domain (MIRAGE_DebugContext *self,const gchar **domain,GError **error);
Retrieves debug context's domain name.
Pointer to buffer containing the domain name is stored into domain; buffer
belongs to the object and therefore should not be modified.
|
a MIRAGE_DebugContext |
|
location to store pointer to domain name buffer |
|
location to store error, or NULL
|
Returns : |
TRUE on success, FALSE on failure |
gboolean mirage_debug_context_set_name (MIRAGE_DebugContext *self,const gchar *name,GError **error);
Sets debug context's name to name.
|
a MIRAGE_DebugContext |
|
name |
|
location to store error, or NULL
|
Returns : |
TRUE on success, FALSE on failure |
gboolean mirage_debug_context_get_name (MIRAGE_DebugContext *self,const gchar **name,GError **error);
Retrieves debug context's name.
Pointer to buffer containing the name is stored into name; buffer
belongs to the object and therefore should not be modified.
|
a MIRAGE_DebugContext |
|
location to store pointer to name buffer |
|
location to store error, or NULL
|
Returns : |
TRUE on success, FALSE on failure |