messages.c File Reference

Include dependency graph for messages.c:


Data Structures

struct  msg_context_t
struct  msg_bank_t
 Store all data required by messages interfaces. More...
struct  msg_subscription_t

Defines

#define vlc_va_copy(dest, src)   (dest)=(src)
#define COL(x)   "\033[" #x ";1m"
#define RED   COL(31)
#define GREEN   COL(32)
#define YELLOW   COL(33)
#define WHITE   COL(0)
#define GRAY   "\033[0m"

Functions

static void cleanup_msg_context (void *data)
static msg_bank_tlibvlc_bank (libvlc_int_t *inst)
static void PrintMsg (vlc_object_t *, msg_item_t *)
msg_bank_tmsg_Create (void)
 Initialize messages queues This function initializes all message queues.
void msg_EnableObjectPrinting (vlc_object_t *obj, const char *psz_object)
void msg_DisableObjectPrinting (vlc_object_t *obj, const char *psz_object)
void msg_Destroy (msg_bank_t *bank)
 Destroy the message queues.
msg_subscription_tmsg_Subscribe (libvlc_int_t *instance, msg_callback_t cb, msg_cb_data_t *opaque)
 Subscribe to the message queue.
void msg_Unsubscribe (msg_subscription_t *sub)
 Unsubscribe from the message queue.
void msg_Generic (vlc_object_t *p_this, int i_type, const char *psz_module, const char *psz_format,...)
static void msg_Free (gc_object_t *gc)
 Destroys a message.
void msg_GenericVa (vlc_object_t *p_this, int i_type, const char *psz_module, const char *psz_format, va_list _args)
 Add a message to a queue.
static msg_context_tGetContext (void)
void msg_StackSet (int i_code, const char *psz_message,...)
 Internal message stack context.
void msg_StackAdd (const char *psz_message,...)
const char * msg_StackMsg (void)

Variables

static vlc_threadvar_t msg_context
static uintptr_t banks = 0
static vlc_mutex_t msg_stack_lock = PTHREAD_MUTEX_INITIALIZER
static void const * kObjectPrintingEnabled = &kObjectPrintingEnabled
 Object Printing selection.
static void const * kObjectPrintingDisabled = &kObjectPrintingDisabled

Define Documentation

#define COL (  )     "\033[" #x ";1m"

#define GRAY   "\033[0m"

#define GREEN   COL(32)

#define RED   COL(31)

#define vlc_va_copy ( dest,
src   )     (dest)=(src)

Referenced by msg_GenericVa().

#define WHITE   COL(0)

#define YELLOW   COL(33)


Function Documentation

static void cleanup_msg_context ( void *  data  )  [static]

References ctx, and msg_context_t::psz_message.

Referenced by msg_Create().

static msg_context_t* GetContext ( void   )  [static]

static msg_bank_t* libvlc_bank ( libvlc_int_t inst  )  [inline, static]

msg_bank_t* msg_Create ( void   ) 

void msg_Destroy ( msg_bank_t bank  ) 

Destroy the message queues.

This functions prints all messages remaining in the queues, then frees all the allocated resources No other messages interface functions should be called after this one.

References banks, msg_bank_t::enabled_objects, freelocale(), msg_bank_t::i_sub, msg_bank_t::locale, msg_bank_t::lock, msg_context, msg_stack_lock, unlikely, vlc_dictionary_clear(), vlc_mutex_lock(), vlc_mutex_unlock(), vlc_rwlock_destroy(), and vlc_threadvar_delete().

Referenced by libvlc_InternalDestroy().

static void msg_Free ( gc_object_t gc  )  [static]

Destroys a message.

References msg_item_t::psz_header, msg_item_t::psz_module, msg_item_t::psz_msg, and vlc_priv.

Referenced by msg_GenericVa().

void msg_StackAdd ( const char *  psz_message,
  ... 
)

const char* msg_StackMsg ( void   ) 

void msg_StackSet ( int  i_code,
const char *  psz_message,
  ... 
)

Internal message stack context.

References GetContext(), msg_context_t::i_code, msg_context_t::psz_message, and vasprintf().

static void PrintMsg ( vlc_object_t p_this,
msg_item_t p_item 
) [static]


Variable Documentation

uintptr_t banks = 0 [static]

Referenced by msg_Create(), and msg_Destroy().

Object Printing selection.

Referenced by msg_EnableObjectPrinting(), and PrintMsg().

Referenced by GetContext(), msg_Create(), and msg_Destroy().

vlc_mutex_t msg_stack_lock = PTHREAD_MUTEX_INITIALIZER [static]

Referenced by msg_Create(), and msg_Destroy().


Generated on Tue May 25 08:05:36 2010 for VLC by  doxygen 1.5.6