osso-abook-debug

osso-abook-debug — Debugging and instrumentation facilities.

Synopsis

void                osso_abook_debug_init               (void);
#define             OSSO_ABOOK_NOTE                     (type,format,...)

enum                OssoABookDebugFlags;
#define             OSSO_ABOOK_DEBUG_FLAGS              (type)
const GFlagsValue*  osso_abook_debug_flags_from_name    (const char *name);
const GFlagsValue*  osso_abook_debug_flags_from_nick    (const char *nick);
const char*         osso_abook_debug_flags_get_name     (OssoABookDebugFlags value);
const char*         osso_abook_debug_flags_get_nick     (OssoABookDebugFlags value);

#define             OSSO_ABOOK_MARK                     (type)
#define             OSSO_ABOOK_TIMER_START              (timer, type, name)
#define             OSSO_ABOOK_TIMER_MARK               (timer)
#define             OSSO_ABOOK_LOCAL_TIMER_START        (type, name)
#define             OSSO_ABOOK_LOCAL_TIMER_END          ()

Description

This module provides debugging facilities for printing debug messages and measuring duration of operations.

Those facilities are deactivated unless the --enable-debug switch was passed to the configure script.

Use the OSSO_ABOOK_DEBUG environment variable to control which messages are shown: Setting OSSO_ABOOK_DEBUG to "eds startup" limits debugging to Evolution-Data-Server and startup related code. Leaving that variable empty or specifying "none" disables all debug messages. See OssoABookDebugFlags for some complete list of valid flags.

Details

osso_abook_debug_init ()

void                osso_abook_debug_init               (void);

Initializes the debugging framework of libosso-abook.


OSSO_ABOOK_NOTE()

#define             OSSO_ABOOK_NOTE(type,format,...)

Prints a debug message when the debug flags cover type.

type : the required debugging flag, see OssoABookDebugFlags
format : a standard printf() format string
... : the arguments to insert in the output

enum OssoABookDebugFlags

typedef enum {
        OSSO_ABOOK_DEBUG_NONE           =  0,
        OSSO_ABOOK_DEBUG_EDS            = (1 << 0),
        OSSO_ABOOK_DEBUG_GTK            = (1 << 1),
        OSSO_ABOOK_DEBUG_HILDON         = (1 << 2),
        OSSO_ABOOK_DEBUG_CONTACT_ADD    = (1 << 3),
        OSSO_ABOOK_DEBUG_CONTACT_REMOVE = (1 << 4),
        OSSO_ABOOK_DEBUG_CONTACT_UPDATE = (1 << 5),
        OSSO_ABOOK_DEBUG_VCARD          = (1 << 6),
        OSSO_ABOOK_DEBUG_AVATAR         = (1 << 7),
        OSSO_ABOOK_DEBUG_MC             = (1 << 8),
        OSSO_ABOOK_DEBUG_CAPS           = (1 << 9),
        OSSO_ABOOK_DEBUG_GENERIC        = (1 << 10),
        OSSO_ABOOK_DEBUG_LIST_STORE     = (1 << 11),
        OSSO_ABOOK_DEBUG_STARTUP        = (1 << 12),
        OSSO_ABOOK_DEBUG_DBUS           = (1 << 13),
        OSSO_ABOOK_DEBUG_AGGREGATOR     = (1 << 14),
        OSSO_ABOOK_DEBUG_I18N           = (1 << 15),
        OSSO_ABOOK_DEBUG_SIM            = (1 << 16),
        OSSO_ABOOK_DEBUG_TREE_VIEW      = (1 << 17),
        OSSO_ABOOK_DEBUG_TODO           = (1 << 31),
        OSSO_ABOOK_DEBUG_ALL            = ~0,
} OssoABookDebugFlags;

This flags describe the various debugging domains of libosso-abook.

OSSO_ABOOK_DEBUG_NONE show no debugging messages
OSSO_ABOOK_DEBUG_EDS trace Evolution Data Server related behavior
OSSO_ABOOK_DEBUG_GTK trace GTK+ related behavior
OSSO_ABOOK_DEBUG_HILDON trace Hildon related behavior
OSSO_ABOOK_DEBUG_CONTACT_ADD trace contact additions
OSSO_ABOOK_DEBUG_CONTACT_REMOVE trace contact removals
OSSO_ABOOK_DEBUG_CONTACT_UPDATE trace contact updates
OSSO_ABOOK_DEBUG_VCARD trace vCard parsing related behavior
OSSO_ABOOK_DEBUG_AVATAR trace OssoABookAvatar related behavior
OSSO_ABOOK_DEBUG_MC trace Mission Control related behavior
OSSO_ABOOK_DEBUG_CAPS trace OssoABookCaps related behavior
OSSO_ABOOK_DEBUG_GENERIC trace generic behavior
OSSO_ABOOK_DEBUG_LIST_STORE trace OssoABookListStore related behavior
OSSO_ABOOK_DEBUG_STARTUP trace startup behavior
OSSO_ABOOK_DEBUG_DBUS trace D-Bus related behavior
OSSO_ABOOK_DEBUG_AGGREGATOR trace OssoABookAggregator related behavior
OSSO_ABOOK_DEBUG_I18N trace localization related behavior
OSSO_ABOOK_DEBUG_SIM trace sim-card related behavior
OSSO_ABOOK_DEBUG_TREE_VIEW trace OssoABookTreeView related behavior
OSSO_ABOOK_DEBUG_TODO show TODO notes
OSSO_ABOOK_DEBUG_ALL show all debugging messages

OSSO_ABOOK_DEBUG_FLAGS()

#define             OSSO_ABOOK_DEBUG_FLAGS(type)

Checks whether the debug flags cover type.

type : the required debugging flag, see OssoABookDebugFlags

osso_abook_debug_flags_from_name ()

const GFlagsValue*  osso_abook_debug_flags_from_name    (const char *name);

Looks up the description of the OssoABookDebugFlags member with that full name.

name : the full name of a OssoABookDebugFlags member
Returns : A GFlagsValue when name is valid, NULL otherwise.

osso_abook_debug_flags_from_nick ()

const GFlagsValue*  osso_abook_debug_flags_from_nick    (const char *nick);

Looks up the description of the OssoABookDebugFlags member with that nick name.

nick : the nick name of a OssoABookDebugFlags member
Returns : A GFlagsValue when nick is valid, NULL otherwise.

osso_abook_debug_flags_get_name ()

const char*         osso_abook_debug_flags_get_name     (OssoABookDebugFlags value);

Retreives the full name of a OssoABookDebugFlags member.

value : the a OssoABookDebugFlags member
Returns : The full name for value, or NULL if there is no such member.

osso_abook_debug_flags_get_nick ()

const char*         osso_abook_debug_flags_get_nick     (OssoABookDebugFlags value);

Retreives the nick name of a OssoABookDebugFlags member.

value : the a OssoABookDebugFlags member
Returns : The nick name for value, or NULL if there is no such member.

OSSO_ABOOK_MARK()

#define             OSSO_ABOOK_MARK(type)

Prints a debugging marker when the debug flags cover type.

type : the required debugging flag, see OssoABookDebugFlags

OSSO_ABOOK_TIMER_START()

#define             OSSO_ABOOK_TIMER_START(timer, type, name)

Initializes a GTimer object for debugging when the debugging flag described by type is set. Assigns name for later reference, or G_STRFUNC when name is NULL.

timer : a GTimer, or NULL
type : the required debugging flag, see OssoABookDebugFlags
name : the name of the timer, or NULL

OSSO_ABOOK_TIMER_MARK()

#define             OSSO_ABOOK_TIMER_MARK(timer)

Prints the current timestamp of timer when the debugging flag specified with OSSO_ABOOK_TIMER_START() is set.

timer : a GTimer, or NULL

OSSO_ABOOK_LOCAL_TIMER_START()

#define             OSSO_ABOOK_LOCAL_TIMER_START(type, name)

Initializes a local timer object for debugging when the debugging flag described by type is set. Assigns name for later reference, or G_STRFUNC when name is NULL.

Requires a matching OSSO_ABOOK_LOCAL_TIMER_END() call within the same scope.

type : the required debugging flag, see OssoABookDebugFlags
name : the name of the timer, or NULL

OSSO_ABOOK_LOCAL_TIMER_END()

#define             OSSO_ABOOK_LOCAL_TIMER_END()

Destroys a local timer created with OSSO_ABOOK_LOCAL_TIMER_START().