event.h

Go to the documentation of this file.
00001 // event.h
00002 //
00003 /****************************************************************************
00004    liblscp - LinuxSampler Control Protocol API
00005    Copyright (C) 2004-2008, rncbc aka Rui Nuno Capela. All rights reserved.
00006 
00007    This library is free software; you can redistribute it and/or
00008    modify it under the terms of the GNU Lesser General Public
00009    License as published by the Free Software Foundation; either
00010    version 2.1 of the License, or (at your option) any later version.
00011 
00012    This library is distributed in the hope that it will be useful,
00013    but WITHOUT ANY WARRANTY; without even the implied warranty of
00014    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
00015    Lesser General Public License for more details.
00016 
00017    You should have received a copy of the GNU General Public License along
00018    with this program; if not, write to the Free Software Foundation, Inc.,
00019    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
00020 
00021 *****************************************************************************/
00022 
00023 #ifndef __LSCP_EVENT_H
00024 #define __LSCP_EVENT_H
00025 
00026 #include "lscp/socket.h"
00027 
00028 #if defined(__cplusplus)
00029 extern "C" {
00030 #endif
00031 
00032 
00034 typedef enum _lscp_event_t
00035 {
00036     LSCP_EVENT_NONE                      = 0x0000,
00037     LSCP_EVENT_CHANNEL_COUNT             = 0x0001,
00038     LSCP_EVENT_VOICE_COUNT               = 0x0002,
00039     LSCP_EVENT_STREAM_COUNT              = 0x0004,
00040     LSCP_EVENT_BUFFER_FILL               = 0x0008,
00041     LSCP_EVENT_CHANNEL_INFO              = 0x0010,
00042     LSCP_EVENT_TOTAL_VOICE_COUNT         = 0x0020,
00043     LSCP_EVENT_AUDIO_OUTPUT_DEVICE_COUNT = 0x0040,
00044     LSCP_EVENT_AUDIO_OUTPUT_DEVICE_INFO  = 0x0080,
00045     LSCP_EVENT_MIDI_INPUT_DEVICE_COUNT   = 0x0100,
00046     LSCP_EVENT_MIDI_INPUT_DEVICE_INFO    = 0x0200,
00047     LSCP_EVENT_MIDI_INSTRUMENT_MAP_COUNT = 0x0400,
00048     LSCP_EVENT_MIDI_INSTRUMENT_MAP_INFO  = 0x1000,
00049     LSCP_EVENT_MIDI_INSTRUMENT_COUNT     = 0x2000,
00050     LSCP_EVENT_MIDI_INSTRUMENT_INFO      = 0x4000,
00051     LSCP_EVENT_MISCELLANEOUS             = 0x8000,
00052     // from these new events on, we simply enumerate them,
00053     // no dedicated bit flags anymore ...
00054     LSCP_EVENT_CHANNEL_MIDI              = 0x00010000,
00055     LSCP_EVENT_DEVICE_MIDI               = 0x00020000
00056 } lscp_event_t;
00057 
00058 
00059 //-------------------------------------------------------------------------
00060 // Simple event helper functions.
00061 
00062 const char *    lscp_event_to_text      ( lscp_event_t event );
00063 lscp_event_t    lscp_event_from_text    ( const char *pszText );
00064 
00065 
00066 #if defined(__cplusplus)
00067 }
00068 #endif
00069 
00070 #endif // __LSCP_EVENT_H
00071 
00072 // end of event.h