Wed Oct 28 11:46:08 2009

Asterisk developer's documentation


event_defs.h File Reference

Generic event system. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Enumerations

enum  ast_event_ie_pltype { AST_EVENT_IE_PLTYPE_EXISTS, AST_EVENT_IE_PLTYPE_UINT, AST_EVENT_IE_PLTYPE_STR }
 Payload types for event information elements. More...
enum  ast_event_ie_type {
  AST_EVENT_IE_END = -1, AST_EVENT_IE_NEWMSGS = 0x01, AST_EVENT_IE_OLDMSGS = 0x02, AST_EVENT_IE_MAILBOX = 0x03,
  AST_EVENT_IE_UNIQUEID = 0x04, AST_EVENT_IE_EVENTTYPE = 0x05, AST_EVENT_IE_EXISTS = 0x06, AST_EVENT_IE_DEVICE = 0x07,
  AST_EVENT_IE_STATE = 0x08, AST_EVENT_IE_CONTEXT = 0x09
}
 Event Information Element types. More...
enum  ast_event_subscriber_res { AST_EVENT_SUB_NONE, AST_EVENT_SUB_EXISTS }
 Results for checking for subscribers. More...
enum  ast_event_type {
  AST_EVENT_ALL = 0x00, AST_EVENT_CUSTOM = 0x01, AST_EVENT_MWI = 0x02, AST_EVENT_SUB = 0x03,
  AST_EVENT_UNSUB = 0x04, AST_EVENT_DEVICE_STATE = 0x05, AST_EVENT_TOTAL = 0x06
}
 Event types. More...


Detailed Description

Generic event system.

Author:
Russell Bryant <russell@digium.com>

Definition in file event_defs.h.


Enumeration Type Documentation

Payload types for event information elements.

Enumerator:
AST_EVENT_IE_PLTYPE_EXISTS  Just check if it exists, not the value
AST_EVENT_IE_PLTYPE_UINT  Unsigned Integer (Can be used for signed, too ...)
AST_EVENT_IE_PLTYPE_STR  String

Definition at line 117 of file event_defs.h.

00117                          {
00118    /*! Just check if it exists, not the value */
00119    AST_EVENT_IE_PLTYPE_EXISTS,
00120    /*! Unsigned Integer (Can be used for signed, too ...) */
00121    AST_EVENT_IE_PLTYPE_UINT,
00122    /*! String */
00123    AST_EVENT_IE_PLTYPE_STR,
00124 };

Event Information Element types.

Enumerator:
AST_EVENT_IE_END  Used to terminate the arguments to event functions
AST_EVENT_IE_NEWMSGS  Number of new messages Used by: AST_EVENT_MWI Payload type: UINT.
AST_EVENT_IE_OLDMSGS  Number of Used by: AST_EVENT_MWI Payload type: UINT.
AST_EVENT_IE_MAILBOX  Mailbox name.

(mailbox[@context]) 
Used by: AST_EVENT_MWI Payload type: STR
AST_EVENT_IE_UNIQUEID  Unique ID Used by: AST_EVENT_SUB, AST_EVENT_UNSUB Payload type: UINT.
AST_EVENT_IE_EVENTTYPE  Event type Used by: AST_EVENT_SUB, AST_EVENT_UNSUB Payload type: UINT.
AST_EVENT_IE_EXISTS  Hint that someone cares that an IE exists Used by: AST_EVENT_SUB Payload type: UINT (ast_event_ie_type).
AST_EVENT_IE_DEVICE  Device Name Used by AST_EVENT_DEVICE_STATE Payload type: STR.
AST_EVENT_IE_STATE  Generic State IE Used by AST_EVENT_DEVICE_STATE Payload type: UINT The actual state values depend on the event which this IE is a part of.
AST_EVENT_IE_CONTEXT  Context IE Used by AST_EVENT_MWI Payload type: str.

Definition at line 52 of file event_defs.h.

00052                        {
00053    /*! Used to terminate the arguments to event functions */
00054    AST_EVENT_IE_END       = -1,
00055 
00056    /*! 
00057     * \brief Number of new messages
00058     * Used by: AST_EVENT_MWI 
00059     * Payload type: UINT
00060     */
00061    AST_EVENT_IE_NEWMSGS   = 0x01,
00062    /*! 
00063     * \brief Number of
00064     * Used by: AST_EVENT_MWI 
00065     * Payload type: UINT
00066     */
00067    AST_EVENT_IE_OLDMSGS   = 0x02,
00068    /*! 
00069     * \brief Mailbox name \verbatim (mailbox[@context]) \endverbatim
00070     * Used by: AST_EVENT_MWI 
00071     * Payload type: STR
00072     */
00073    AST_EVENT_IE_MAILBOX   = 0x03,
00074    /*! 
00075     * \brief Unique ID
00076     * Used by: AST_EVENT_SUB, AST_EVENT_UNSUB
00077     * Payload type: UINT
00078     */
00079    AST_EVENT_IE_UNIQUEID  = 0x04,
00080    /*! 
00081     * \brief Event type 
00082     * Used by: AST_EVENT_SUB, AST_EVENT_UNSUB
00083     * Payload type: UINT
00084     */
00085    AST_EVENT_IE_EVENTTYPE = 0x05,
00086    /*!
00087     * \brief Hint that someone cares that an IE exists
00088     * Used by: AST_EVENT_SUB
00089     * Payload type: UINT (ast_event_ie_type)
00090     */
00091    AST_EVENT_IE_EXISTS    = 0x06,
00092    /*!
00093     * \brief Device Name
00094     * Used by AST_EVENT_DEVICE_STATE
00095     * Payload type: STR
00096     */
00097    AST_EVENT_IE_DEVICE    = 0x07,
00098    /*!
00099     * \brief Generic State IE
00100     * Used by AST_EVENT_DEVICE_STATE
00101     * Payload type: UINT
00102     * The actual state values depend on the event which
00103     * this IE is a part of.
00104     */
00105     AST_EVENT_IE_STATE    = 0x08,
00106     /*!
00107      * \brief Context IE
00108      * Used by AST_EVENT_MWI
00109      * Payload type: str
00110      */
00111     AST_EVENT_IE_CONTEXT  = 0x09,
00112 };

Results for checking for subscribers.

ast_event_check_subscriber()

Enumerator:
AST_EVENT_SUB_NONE  No subscribers exist
AST_EVENT_SUB_EXISTS  At least one subscriber exists

Definition at line 131 of file event_defs.h.

00131                               {
00132    /*! No subscribers exist */
00133    AST_EVENT_SUB_NONE,
00134    /*! At least one subscriber exists */
00135    AST_EVENT_SUB_EXISTS,
00136 };

Event types.

Note:
These values can *never* change.
Enumerator:
AST_EVENT_ALL  Reserved to provide the ability to subscribe to all events. A specific event should never have a payload of 0.
AST_EVENT_CUSTOM  This event type is reserved for use by third-party modules to create custom events without having to modify this file.
Note:
There are no "custom" IE types, because IEs only have to be unique to the event itself, not necessarily across all events.
AST_EVENT_MWI  Voicemail message waiting indication
AST_EVENT_SUB  Someone has subscribed to events
AST_EVENT_UNSUB  Someone has unsubscribed from events
AST_EVENT_DEVICE_STATE  The state of a device has changed
AST_EVENT_TOTAL  Number of event types. This should be the last event type + 1

Definition at line 30 of file event_defs.h.

00030                     {
00031    /*! Reserved to provide the ability to subscribe to all events.  A specific
00032        event should never have a payload of 0. */
00033    AST_EVENT_ALL    = 0x00,
00034    /*! This event type is reserved for use by third-party modules to create
00035        custom events without having to modify this file. 
00036        \note There are no "custom" IE types, because IEs only have to be
00037        unique to the event itself, not necessarily across all events. */
00038    AST_EVENT_CUSTOM = 0x01,
00039    /*! Voicemail message waiting indication */
00040    AST_EVENT_MWI          = 0x02,
00041    /*! Someone has subscribed to events */
00042    AST_EVENT_SUB          = 0x03,
00043    /*! Someone has unsubscribed from events */
00044    AST_EVENT_UNSUB        = 0x04,
00045    /*! The state of a device has changed */
00046    AST_EVENT_DEVICE_STATE = 0x05,
00047    /*! Number of event types.  This should be the last event type + 1 */
00048    AST_EVENT_TOTAL        = 0x06,
00049 };


Generated on Wed Oct 28 11:46:08 2009 for Asterisk - the Open Source PBX by  doxygen 1.5.6