Statistics
| Branch: | Revision:

janus-gateway / events.h @ 1d31e31f

History | View | Annotate | Download (1.32 KB)

1
/*! \file    events.h
2
 * \author   Lorenzo Miniero <lorenzo@meetecho.com>
3
 * \copyright GNU General Public License v3
4
 * \brief    Event handler notifications (headers)
5
 * \details  Event handler plugins can receive events from the Janus core
6
 * and other plugins, in order to handle them somehow. This methods
7
 * provide helpers to notify events to such handlers. 
8
 * 
9
 * \ingroup core
10
 * \ref core
11
 */
12
 
13
#ifndef _JANUS_EVENTS_H
14
#define _JANUS_EVENTS_H
15

    
16
#include "debug.h"
17
#include "events/eventhandler.h"
18

    
19
/*! \brief Initialize the event handlers broadcaster
20
 * @param[in] enabled Whether broadcasting events should be supported at all
21
 * @param[in] handlers Map of all registered event handlers */
22
void janus_events_init(gboolean enabled, GHashTable *handlers);
23

    
24
/*! \brief Quick method to check whether event handlers are enabled at all or not
25
 * @returns TRUE if they're enabled, FALSE if not */
26
gboolean janus_events_is_enabled(void);
27

    
28
/*! \brief Notify an event to all interested handlers
29
 * @note According to the type of event to notify, different arguments may
30
 * be required and used in order to prepare the actual object to pass to handlers.
31
 * @param[in] type Type of the event to notify
32
 * @param[in] session_id Janus session identifier this event refers to */
33
void janus_events_notify_handlers(int type, guint64 session_id, ...);
34

    
35
#endif