/usr/include/roaraudio/notify.h is in libroar-dev 1.0~beta11-10.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 | //notify.h:
/*
* Copyright (C) Philipp 'ph3-der-loewe' Schafft - 2010-2014
*
* This file is part of RoarAudio,
* a cross-platform sound system for both, home and professional use.
* See README for details.
*
* This file is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* as published by the Free Software Foundation.
*
* RoarAudio is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this software; see the file COPYING. If not, write to
* the Free Software Foundation, 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*
* NOTE: Even though this file is LGPLed it (may) include GPLed files
* so the license of this file is/may therefore downgraded to GPL.
* See HACKING for details.
*/
#ifndef _ROARAUDIO_NOTIFY_H_
#define _ROARAUDIO_NOTIFY_H_
#define ROAR_EVENT_NETFLAG_NONE 0x00000000
#define ROAR_EVENT_NETFLAG_DATA 0x00000001
#define ROAR_EVENT_NETFLAG_PROXYEVENT 0x00000002
#define ROAR_NOTIFY_SPECIAL (uint32_t)0xffffffff
// protocol cmds:
#define ROAR_NOTIFY_OFFSET_CMD (uint32_t)0x00000000
#define ROAR_NOTIFY_MASK_CMD (uint32_t)0x000000ff
// event groups (AKA meta events):
#define ROAR_NOTIFY_OFFSET_EGRP (uint32_t)0x00010000
#define ROAR_NOTIFY_MASK_EGRP (uint32_t)0x0000ffff
// object event:
#define ROAR_NOTIFY_OFFSET_OE (uint32_t)0x00020000
#define ROAR_NOTIFY_MASK_OE (uint32_t)0x0000ffff
// data events:
#define ROAR_NOTIFY_OFFSET_DATA (uint32_t)0x00030000
#define ROAR_NOTIFY_MASK_DATA (uint32_t)0x0000ffff
// user defined events:
#define ROAR_NOTIFY_OFFSET_USER (uint32_t)0x40000000
#define ROAR_NOTIFY_MASK_USER (uint32_t)0x3fffffff
#define ROAR_NOTIFY_X2EVENT(x,offset,mask) ((x) == (uint32_t)-1 ? ROAR_NOTIFY_SPECIAL : (((x) & (mask))+(offset)))
#define ROAR_NOTIFY_EVENT2X(x,offset,mask) (ROAR_NOTIFY_IS_X((x),(offset),(mask)) != 1 ? (uint32_t)-1 : ((x) - (offset)))
#define ROAR_NOTIFY_IS_X(x,offset,mask) ((x) == ROAR_NOTIFY_SPECIAL ? -1 : (((x) | (mask)) - (mask)) == (offset) ? 1 : 0)
#define ROAR_NOTIFY_CMD2EVENT(x) ROAR_NOTIFY_X2EVENT((x), ROAR_NOTIFY_OFFSET_CMD, ROAR_NOTIFY_MASK_CMD)
#define ROAR_NOTIFY_EVENT2CMD(x) ROAR_NOTIFY_EVENT2X((x), ROAR_NOTIFY_OFFSET_CMD, ROAR_NOTIFY_MASK_CMD)
#define ROAR_NOTIFY_IS_CMD(x) ROAR_NOTIFY_IS_X((x), ROAR_NOTIFY_OFFSET_CMD, ROAR_NOTIFY_MASK_CMD)
#define ROAR_NOTIFY_EGRP2EVENT(x) ROAR_NOTIFY_X2EVENT((x), ROAR_NOTIFY_OFFSET_EGRP, ROAR_NOTIFY_MASK_EGRP)
#define ROAR_NOTIFY_EVENT2EGRP(x) ROAR_NOTIFY_EVENT2X((x), ROAR_NOTIFY_OFFSET_EGRP, ROAR_NOTIFY_MASK_EGRP)
#define ROAR_NOTIFY_IS_EGRP(x) ROAR_NOTIFY_IS_X((x), ROAR_NOTIFY_OFFSET_EGRP, ROAR_NOTIFY_MASK_EGRP)
#define ROAR_NOTIFY_OE2EVENT(x) ROAR_NOTIFY_X2EVENT((x), ROAR_NOTIFY_OFFSET_OE, ROAR_NOTIFY_MASK_OE)
#define ROAR_NOTIFY_EVENT2OE(x) ROAR_NOTIFY_EVENT2X((x), ROAR_NOTIFY_OFFSET_OE, ROAR_NOTIFY_MASK_OE)
#define ROAR_NOTIFY_IS_OE(x) ROAR_NOTIFY_IS_X((x), ROAR_NOTIFY_OFFSET_OE, ROAR_NOTIFY_MASK_OE)
#define ROAR_NOTIFY_DATA2EVENT(x) ROAR_NOTIFY_X2EVENT((x), ROAR_NOTIFY_OFFSET_DATA, ROAR_NOTIFY_MASK_DATA)
#define ROAR_NOTIFY_EVENT2DATA(x) ROAR_NOTIFY_EVENT2X((x), ROAR_NOTIFY_OFFSET_DATA, ROAR_NOTIFY_MASK_DATA)
#define ROAR_NOTIFY_IS_DATA(x) ROAR_NOTIFY_IS_X((x), ROAR_NOTIFY_OFFSET_DATA, ROAR_NOTIFY_MASK_DATA)
#define ROAR_NOTIFY_USER2EVENT(x) ROAR_NOTIFY_X2EVENT((x), ROAR_NOTIFY_OFFSET_USER, ROAR_NOTIFY_MASK_USER)
#define ROAR_NOTIFY_EVENT2USER(x) ROAR_NOTIFY_EVENT2X((x), ROAR_NOTIFY_OFFSET_USER, ROAR_NOTIFY_MASK_USER)
#define ROAR_NOTIFY_IS_USER(x) ROAR_NOTIFY_IS_X((x), ROAR_NOTIFY_OFFSET_USER, ROAR_NOTIFY_MASK_USER)
// EGRP:
#define ROAR_NOTIFY_EGRP_GROUP_BASICS 0x0000
#define ROAR_NOTIFY_EGRP_GROUP_CLIENTS (ROAR_OT_CLIENT << 8)
#define ROAR_NOTIFY_EGRP_GROUP_STREAMS (ROAR_OT_STREAM << 8)
#define ROAR_NOTIFY_EGRP_GROUP_SOURCES (ROAR_OT_SOURCE << 8)
#define ROAR_NOTIFY_EGRP_GROUP_SAMPLES (ROAR_OT_SAMPLE << 8)
#define ROAR_EGRP_ANY_EVENT ROAR_NOTIFY_EGRP2EVENT(ROAR_NOTIFY_EGRP_GROUP_BASICS + 0)
#define ROAR_EGRP_OBJECT_NEW ROAR_NOTIFY_EGRP2EVENT(ROAR_NOTIFY_EGRP_GROUP_BASICS + 1)
#define ROAR_EGRP_OBJECT_DELETE ROAR_NOTIFY_EGRP2EVENT(ROAR_NOTIFY_EGRP_GROUP_BASICS + 2)
#define ROAR_EGRP_OBJECT_REF ROAR_NOTIFY_EGRP2EVENT(ROAR_NOTIFY_EGRP_GROUP_BASICS + 3)
#define ROAR_EGRP_OBJECT_UNREF ROAR_NOTIFY_EGRP2EVENT(ROAR_NOTIFY_EGRP_GROUP_BASICS + 4)
#define ROAR_EGRP_ERROR ROAR_NOTIFY_EGRP2EVENT(ROAR_NOTIFY_EGRP_GROUP_BASICS + 5)
#define ROAR_EGRP_ANY_CLIENT_EVENT ROAR_NOTIFY_EGRP2EVENT(ROAR_NOTIFY_EGRP_GROUP_CLIENTS + 0)
#define ROAR_EGRP_ANY_STREAM_EVENT ROAR_NOTIFY_EGRP2EVENT(ROAR_NOTIFY_EGRP_GROUP_STREAMS + 0)
#define ROAR_EGRP_ANY_SOURCE_EVENT ROAR_NOTIFY_EGRP2EVENT(ROAR_NOTIFY_EGRP_GROUP_SOURCES + 0)
#define ROAR_EGRP_ANY_SAMPLE_EVENT ROAR_NOTIFY_EGRP2EVENT(ROAR_NOTIFY_EGRP_GROUP_SAMPLES + 0)
// OE:
#define ROAR_NOTIFY_OE_GROUP_BASICS 0x0000
#define ROAR_NOTIFY_OE_GROUP_CLIENTS (ROAR_OT_CLIENT << 8)
#define ROAR_NOTIFY_OE_GROUP_STREAMS (ROAR_OT_STREAM << 8)
#define ROAR_NOTIFY_OE_GROUP_SOURCES (ROAR_OT_SOURCE << 8)
#define ROAR_NOTIFY_OE_GROUP_SAMPLES (ROAR_OT_SAMPLE << 8)
#define ROAR_OE_BASICS_CHANGE_STATE ROAR_NOTIFY_OE2EVENT(ROAR_NOTIFY_OE_GROUP_BASICS + 0)
#define ROAR_OE_BASICS_CHANGE_FLAGS ROAR_NOTIFY_OE2EVENT(ROAR_NOTIFY_OE_GROUP_BASICS + 5)
#define ROAR_OE_BASICS_NEW ROAR_NOTIFY_OE2EVENT(ROAR_NOTIFY_OE_GROUP_BASICS + 6)
#define ROAR_OE_BASICS_DELETE ROAR_NOTIFY_OE2EVENT(ROAR_NOTIFY_OE_GROUP_BASICS + 7)
#define ROAR_OE_CLIENT_CONNECT ROAR_NOTIFY_OE2EVENT(ROAR_NOTIFY_OE_GROUP_CLIENTS + 0)
#define ROAR_OE_CLIENT_DISCONNECT ROAR_NOTIFY_OE2EVENT(ROAR_NOTIFY_OE_GROUP_CLIENTS + 1)
#define ROAR_OE_CLIENT_MSG ROAR_NOTIFY_OE2EVENT(ROAR_NOTIFY_OE_GROUP_CLIENTS + 3)
//#define ROAR_OE_STREAM_CHANGE_STATE ROAR_NOTIFY_OE2EVENT(ROAR_NOTIFY_OE_GROUP_STREAMS + 0)
#define ROAR_OE_STREAM_EXEC ROAR_NOTIFY_OE2EVENT(ROAR_NOTIFY_OE_GROUP_STREAMS + 1)
#define ROAR_OE_STREAM_EOF ROAR_NOTIFY_OE2EVENT(ROAR_NOTIFY_OE_GROUP_STREAMS + 2)
#define ROAR_OE_STREAM_CON_STREAM ROAR_NOTIFY_OE2EVENT(ROAR_NOTIFY_OE_GROUP_STREAMS + 3)
#define ROAR_OE_STREAM_PASSFH ROAR_NOTIFY_OE2EVENT(ROAR_NOTIFY_OE_GROUP_STREAMS + 4)
//#define ROAR_OE_STREAM_CHANGE_FLAGS ROAR_NOTIFY_OE2EVENT(ROAR_NOTIFY_OE_GROUP_STREAMS + 5)
#define ROAR_OE_STREAM_CHANGE_VOLUME ROAR_NOTIFY_OE2EVENT(ROAR_NOTIFY_OE_GROUP_STREAMS + 6)
#define ROAR_OE_STREAM_XRUN ROAR_NOTIFY_OE2EVENT(ROAR_NOTIFY_OE_GROUP_STREAMS + 7)
#define ROAR_OE_STREAM_META_UPDATE ROAR_NOTIFY_OE2EVENT(ROAR_NOTIFY_OE_GROUP_STREAMS + 8)
#define ROAR_XRUN_NONE 0
#define ROAR_XRUN_UNDER_PRE 1
#define ROAR_XRUN_UNDER_POST 2
#define ROAR_XRUN_OVER_PRE 3
#define ROAR_XRUN_OVER_POST 4
// Data:
#define ROAR_DATA_EVENT2DIR(ev) (((ev) & 0xFF00) >> 8)
#define ROAR_DATA_EVENT2EVENT(ev) (((ev) & 0x00FF))
#define ROAR_DATA_GROUP(dir) ((dir) << 8)
#define ROAR_DATA_GROUP_WAVEFORM ROAR_DATA_GROUP(ROAR_DIR_PLAY)
#define ROAR_DATA_GROUP_MIDI ROAR_DATA_GROUP(ROAR_DIR_MIDI_IN)
#define ROAR_DATA_GROUP_LIGHT ROAR_DATA_GROUP(ROAR_DIR_LIGHT_IN)
#define ROAR_DATA_GROUP_RAW ROAR_DATA_GROUP(ROAR_DIR_RAW_IN)
#define ROAR_DATA_GROUP_COMPLEX ROAR_DATA_GROUP(ROAR_DIR_COMPLEX_IN)
#define ROAR_DATA_GROUP_RDTCS ROAR_DATA_GROUP(ROAR_DIR_RDTCS_IN)
#define ROAR_DATA_DMX512_GROUP_CHANNEL (ROAR_DATA_GROUP_LIGHT + 0x00)
#define ROAR_DATA_DMX512_GROUP_EVENT (ROAR_DATA_GROUP_LIGHT + 0x10)
// should we really send channel updates? Latency? ...?
// Emmiter: client ID, target: mixer or other stream, target_type: STREAM,
// arg0: channel, arg1: new value
// *: -1/NULL
#define ROAR_DATA_DMX512_CHANNEL_UPDATE ROAR_NOTIFY_DATA2EVENT(ROAR_DATA_DMX512_GROUP_CHANNEL + 1)
// Emmiter: client ID, target: mixer or other stream, target_type: STREAM,
// arg0: event type (ROAR_ROARDMX_EVENT_*)
// *: -1/NULL
#define ROAR_DATA_DMX512_EVENT ROAR_NOTIFY_DATA2EVENT(ROAR_DATA_DMX512_GROUP_EVENT + 1)
#endif
//ll
|