BltEvent.h

Go to the documentation of this file.
00001 /*****************************************************************
00002 |
00003 |   BlueTune - Events Definitions
00004 |
00005 |   (c) 2002-2006 Gilles Boccon-Gibod
00006 |   Author: Gilles Boccon-Gibod (bok@bok.net)
00007 |
00008  ****************************************************************/
00013 #ifndef _BLT_EVENT_H_
00014 #define _BLT_EVENT_H_
00015 
00016 /*----------------------------------------------------------------------
00017 |   includes
00018 +---------------------------------------------------------------------*/
00019 #include "Atomix.h"
00020 #include "BltDefs.h"
00021 #include "BltTypes.h"
00022 #include "BltErrors.h"
00023 #include "BltMediaNode.h"
00024 #include "BltStream.h"
00025 
00026 /*----------------------------------------------------------------------
00027 |   types
00028 +---------------------------------------------------------------------*/
00029 typedef enum {
00030     BLT_EVENT_TYPE_USER,
00031     BLT_EVENT_TYPE_INFO,
00032     BLT_EVENT_TYPE_DEBUG,
00033     BLT_EVENT_TYPE_STREAM_TOPOLOGY,
00034     BLT_EVENT_TYPE_STREAM_INFO
00035 } BLT_EventType;
00036 
00037 typedef struct BLT_Event BLT_Event;
00038 
00039 typedef struct {
00040     BLT_Ordinal id;
00041     BLT_Size    size;
00042     /* payload follows (size bytes) */
00043 } BLT_UserEvent;
00044 
00045 typedef struct {
00046     BLT_CString message;
00047 } BLT_InfoEvent;
00048 
00049 typedef struct {
00050     BLT_Ordinal  category;
00051     BLT_Ordinal  level;
00052     BLT_CString  message;
00053 } BLT_DebugEvent;
00054 
00055 typedef enum {
00056     BLT_STREAM_TOPOLOGY_NODE_ADDED,
00057     BLT_STREAM_TOPOLOGY_NODE_REMOVED,
00058     BLT_STREAM_TOPOLOGY_NODE_CONNECTED,
00059     BLT_STREAM_TOPOLOGY_NODE_DISCONNECTED
00060 } BLT_StreamTopologyEventType;
00061 
00062 typedef struct {
00063     BLT_StreamTopologyEventType type;
00064     BLT_MediaNode*              node;
00065 } BLT_StreamTopologyEvent;
00066 
00067 typedef struct {
00068     BLT_Mask       update_mask;
00069     BLT_StreamInfo info;
00070 } BLT_StreamInfoEvent;
00071 
00072 #endif /* _BLT_EVENT_H_ */