aroarfw
proto.h
Go to the documentation of this file.
1 //proto.h:
2 
3 /*
4  * Copyright (C) Philipp 'ph3-der-loewe' Schafft - 2010-2013
5  *
6  * This file is part of aroarfw, a RoarAudio framework for
7  * embedded systems (µControlers).
8  *
9  * This file is free software; you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License version 3
11  * or (at your option) any later version as published by
12  * the Free Software Foundation.
13  *
14  * aroarfw is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with this software; see the file COPYING. If not, write to
21  * the Free Software Foundation, 51 Franklin Street, Fifth Floor,
22  * Boston, MA 02110-1301, USA.
23  */
24 
25 #ifndef _AROARFW_PROTO_H_
26 #define _AROARFW_PROTO_H_
27 
29 typedef enum {
30 // grep ^'#define MUROAR_CMD_' muroar.h | sed 's/ */ /g; s/^#define MUROAR_/R/;' | while read c i d; do printf " //! XXX\n %-24s = %3i,\n" $c $i; done
32  RCMD_NOOP = 0,
36  RCMD_AUTH = 2,
44  RCMD_QUIT = 6,
58  RCMD_EXIT = 13,
68  RCMD_KICK = 18,
80  RCMD_BEEP = 24,
104  RCMD_CAPS = 34,
106  RCMD_WAIT = 35,
110  RCMD_SEEK = 37,
120  RCMD_OK = 254,
122  RCMD_ERROR = 255
124 
126 typedef enum {
130  RTERM_TERM = 1
132 
134 typedef enum {
142  RVOL_SET_UNMAPED = 4
144 
146 typedef enum {
156  RFLAGCH_PROTECT = 0x8000
158 
160 typedef enum {
181 
182 
184 typedef enum {
197 // RDIR_INTERNAL = 7, // unused, undefined.
203  RDIR_THRU = 10,
229  RDIR_DIRIDS = 23
231 
233 typedef enum {
262 } rrole_t;
263 
265 typedef enum {
269  RSTANDBY_ACTIVE = 1
271 
272 
274 typedef enum {
296  ROT_MSGBUS = 11
298 
300 typedef enum {
310  RATTACH_BRIDGE = 5
312 
314 typedef enum {
336  RSTREAMPARA_RPG = 12
338 
340 typedef enum {
356 
358 typedef enum {
390  RAUTH_IDENT = 11
392 
394 typedef enum {
446  RPROTO_MPD = 26
448 
450 typedef enum {
452  RCT_CAPS = 0,
454  RCT_STANDARDS = 1
456 
458 typedef enum {
460  RHQ_BAD = 0,
464  RHQ_NEAR = 2,
470  RHQ_GOOD = 4,
480 
482 typedef enum {
490  RWHENCE_END = 2
492 
494 typedef enum {
500  RIT_LISTEN = 3
502 
504 typedef enum {
540  RITST_BUILD = 13
542 
543 #endif
544 
545 //ll
rcaps_t
Subtypes for CAPS command.
Definition: proto.h:450
@ RCT_CAPS
???
Definition: proto.h:452
@ RCT_STANDARDS
List of Standards.
Definition: proto.h:454
rflagch_t
Parameter for stream flag operation.
Definition: proto.h:146
@ RFLAGCH_PROTECT
Protect a flag from being changed.
Definition: proto.h:156
@ RFLAGCH_SET
Set flag.
Definition: proto.h:148
@ RFLAGCH_NOOP
Noop.
Definition: proto.h:154
@ RFLAGCH_RESET
Reset flag.
Definition: proto.h:150
@ RFLAGCH_TOGGLE
Toggle a given flag.
Definition: proto.h:152
rwhence_t
Whence for SEEK command.
Definition: proto.h:482
@ RWHENCE_END
Point is relative to end of stream.
Definition: proto.h:490
@ RWHENCE_CUR
Definition: proto.h:488
@ RWHENCE_BEGIN
Definition: proto.h:485
rstreampata_t
Sub-Commands for the RCMD_?ET_STREAM_PARA commands.
Definition: proto.h:314
@ RSTREAMPARA_NAME
Get or set stream name.
Definition: proto.h:320
@ RSTREAMPARA_LTM
Get or set stream's Long Term Monitoring (LTM) parameters.
Definition: proto.h:332
@ RSTREAMPARA_CHANMAP
Get or set channel mapping.
Definition: proto.h:322
@ RSTREAMPARA_RADIO
Get or set radio transmitter or receiver parameters.
Definition: proto.h:334
@ RSTREAMPARA_RPG
Get or set RePlay Gain settings of the stream.
Definition: proto.h:336
@ RSTREAMPARA_INFO
Ask for info structure.
Definition: proto.h:316
@ RSTREAMPARA_HASHTABLE
Get or set stream's HashTable.
Definition: proto.h:326
@ RSTREAMPARA_FLAGS
Operate on stream flags.
Definition: proto.h:318
@ RSTREAMPARA_WININFO
Get or set stream's hints for windowing systems.
Definition: proto.h:328
@ RSTREAMPARA_ROLE
Get or set stream role.
Definition: proto.h:324
@ RSTREAMPARA_PROPTABLE
Get or set stream's PropTable.
Definition: proto.h:330
rit_t
Information types for SERVER_INFO command.
Definition: proto.h:494
@ RIT_LISTEN
Information about listen sockets (this may be removed again in later versions of protocol specs)
Definition: proto.h:500
@ RIT_COUNTERS
Counters.
Definition: proto.h:498
@ RIT_SERVER
General information about the server like implementation name and version.
Definition: proto.h:496
rhq_t
Hint Quality values for SEEK command.
Definition: proto.h:458
@ RHQ_EXACT
This is exackt possition (alias).
Definition: proto.h:478
@ RHQ_NEAR_NB
Requested position is near this point but not before this point.
Definition: proto.h:466
@ RHQ_GOOD_NB
Hint is of good quality (very close to position) and requested position is not before this point.
Definition: proto.h:472
@ RHQ_BAD
Bad hint.
Definition: proto.h:460
@ RHQ_NEAR
Requested position is near this point.
Definition: proto.h:464
@ RHQ_EXACT_NB
Definition: proto.h:476
@ RHQ_GOOD
Definition: proto.h:470
@ RHQ_BAD_NB
Bad hint, requested position is not before this point.
Definition: proto.h:462
rterm_t
Parameter for server termination (RCMD_EXIT)
Definition: proto.h:126
@ RTERM_EXIT
Request the server to exit without waiting for clients to exit.
Definition: proto.h:128
@ RTERM_TERM
Request the server to exit but wait for clients to exit.
Definition: proto.h:130
rauth_t
Auth methodes for the RCMD_AUTH command.
Definition: proto.h:358
@ RAUTH_OPENPGP_SIGN
Use a OpenPGP based method using a signing key. (not recommented!)
Definition: proto.h:378
@ RAUTH_SYSUSER
Definition: proto.h:376
@ RAUTH_IDENT
Use Ident service.
Definition: proto.h:390
@ RAUTH_OPENPGP_AUTH
Use a OpenPGP based method using a auth key. (recommented)
Definition: proto.h:382
@ RAUTH_XAUTH
Use xauth cookie.
Definition: proto.h:388
@ RAUTH_OPENPGP_ENCRYPT
Use a OpenPGP based method using a encryption key.
Definition: proto.h:380
@ RAUTH_NONE
Definition: proto.h:365
@ RAUTH_PASSWORD
Send a user supplyed password. The user should get asked for the password.
Definition: proto.h:373
@ RAUTH_COOKIE
Send a binary-save cookie. This is normaly stored in a cookie file.
Definition: proto.h:367
@ RAUTH_KERBEROS
Use Kerveros.
Definition: proto.h:384
@ RAUTH_TRUST
Definition: proto.h:371
@ RAUTH_RHOST
Auth based on client's host or node name or address.
Definition: proto.h:386
@ RAUTH_AUTO
Definition: proto.h:361
rvolch_t
Parameter for type of volume change.
Definition: proto.h:134
@ RVOL_SET_ALL
Set all channels at once.
Definition: proto.h:136
@ RVOL_SET_MS
Set volume in a Mid/Side way (Volume/Balance)
Definition: proto.h:140
@ RVOL_SET_ONE
Set only one channel.
Definition: proto.h:138
@ RVOL_SET_UNMAPED
Set volume unmapped to current stream.
Definition: proto.h:142
rrole_t
Roles a stream can have.
Definition: proto.h:233
@ RROLE_VIDEO
Sound from a video.
Definition: proto.h:241
@ RROLE_VOICE
Voice stream (singer, speaker, ....)
Definition: proto.h:253
@ RROLE_CLICK
Click track.
Definition: proto.h:259
@ RROLE_BEEP
Notify beep sounds.
Definition: proto.h:247
@ RROLE_GAME
Sound generted by a game (see also RROLE_BACKGROUND_MUSIC)
Definition: proto.h:243
@ RROLE_INSTRUMENT
General instrument.
Definition: proto.h:255
@ RROLE_RHYTHM
Rhythem instrument.
Definition: proto.h:257
@ RROLE_MUSIC
Normal music.
Definition: proto.h:239
@ RROLE_PHONE
Voice connections (RoN, VoIP, ISDN,...)
Definition: proto.h:249
@ RROLE_NONE
No role assigned.
Definition: proto.h:237
@ RROLE_BACKGROUND_MUSIC
Background music.
Definition: proto.h:251
@ RROLE_UNKNOWN
Unknown role.
Definition: proto.h:235
@ RROLE_MIXED
Already mixed data (for example outout of another sound daemon)
Definition: proto.h:261
@ RROLE_EVENT
Event sounds?
Definition: proto.h:245
rcmd_t
Command values used for rmsg*_t.
Definition: proto.h:29
@ RCMD_PASSFH
Pass an open file handle to the server.
Definition: proto.h:96
@ RCMD_NOTIFY
Get Notified about events.
Definition: proto.h:108
@ RCMD_GET_STANDBY
Get standby state from from server.
Definition: proto.h:46
@ RCMD_GET_META
Get meta data of a stream.
Definition: proto.h:76
@ RCMD_CLIENTCTL
Control Client Parameters.
Definition: proto.h:112
@ RCMD_LIST_STREAMS
List streams.
Definition: proto.h:60
@ RCMD_KICK
Kick (terminate) a object from the server.
Definition: proto.h:68
@ RCMD_LIST_CLIENTS
List clients.
Definition: proto.h:62
@ RCMD_ADD_DATA
Add data to the stream's input buffer.
Definition: proto.h:56
@ RCMD_WAIT
Wait for events.
Definition: proto.h:106
@ RCMD_SET_META
Set meta data on a stream.
Definition: proto.h:40
@ RCMD_CAPS
Query or Tell capabilitys.
Definition: proto.h:104
@ RCMD_SHIFT_DATA
Read some stream data from the server.
Definition: proto.h:118
@ RCMD_GET_VOL
Get volume information of a stream.
Definition: proto.h:72
@ RCMD_ATTACH
Attach a stream to some resource (client, driver, ...)
Definition: proto.h:94
@ RCMD_EXEC_STREAM
Exec a stream.
Definition: proto.h:42
@ RCMD_NEW_STREAM
Create a new stream.
Definition: proto.h:38
@ RCMD_SET_STREAM_PARA
Set stream parameters.
Definition: proto.h:92
@ RCMD_WHOAMI
Asks the server for our client ID.
Definition: proto.h:100
@ RCMD_GET_CLIENT
Get a client object.
Definition: proto.h:64
@ RCMD_NOOP
No Operation Commands.
Definition: proto.h:32
@ RCMD_SET_STANDBY
Ask the server to change it's standby state.
Definition: proto.h:48
@ RCMD_GET_STREAM_PARA
Get stream parameters.
Definition: proto.h:90
@ RCMD_SERVER_OINFO
Asks the server for information on outputs.
Definition: proto.h:54
@ RCMD_SEEK
Seek within a stream.
Definition: proto.h:110
@ RCMD_GET_STREAM
Get a stream object.
Definition: proto.h:66
@ RCMD_AUTH
Auth our client on the server.
Definition: proto.h:36
@ RCMD_SERVER_INFO
Asks server for general information.
Definition: proto.h:50
@ RCMD_DEVCTL
Device Control.
Definition: proto.h:102
@ RCMD_BEEP
Asks the server to generate a notify sound (beep)
Definition: proto.h:80
@ RCMD_QUIT
Terminate the client connection.
Definition: proto.h:44
@ RCMD_CONCTL
Control Connection parameters.
Definition: proto.h:116
@ RCMD_CON_STREAM
Connect a stream to IO resource (to a socket)
Definition: proto.h:74
@ RCMD_LIST_META
List meta data of a stream.
Definition: proto.h:78
@ RCMD_ERROR
Negative (error) return value for request.
Definition: proto.h:122
@ RCMD_AUTHCTL
Control parameters for AUTH command.
Definition: proto.h:86
@ RCMD_SET_VOL
Change the volume of a stream.
Definition: proto.h:70
@ RCMD_IDENTIFY
Identify our client to the server.
Definition: proto.h:34
@ RCMD_ACLCTL
Control Access Control List informations.
Definition: proto.h:88
@ RCMD_OK
Positive return value for request.
Definition: proto.h:120
@ RCMD_SERVER_STATS
Asks the server for some stats.
Definition: proto.h:52
@ RCMD_GETTIMEOFDAY
Get current system clock time of server.
Definition: proto.h:98
@ RCMD_EXIT
Terminate the server.
Definition: proto.h:58
@ RCMD_LOOKUP
Look up objects.
Definition: proto.h:114
@ RCMD_SET_ACL
Set Access Control List informations (deprecated, do not use!)
Definition: proto.h:84
@ RCMD_GET_ACL
Get Access Control List informations (deprecated, do not use!)
Definition: proto.h:82
ritst_t
Information types for Server Type (ITST) for SERVER_INFO command.
Definition: proto.h:504
@ RITST_LOCATION
Freeform Location of server.
Definition: proto.h:509
@ RITST_BUILD
Definition: proto.h:540
@ RITST_UIURL
Definition: proto.h:530
@ RITST_ADDRESS
Definition: proto.h:527
@ RITST_CONTACT
Definition: proto.h:514
@ RITST_SERIAL
Freeform serial of device.
Definition: proto.h:524
@ RITST_UN_MACHINE
Opering System host type, like uname -m.
Definition: proto.h:522
@ RITST_UN_SYSNAME
Opering System name, like uname -s.
Definition: proto.h:516
@ RITST_UN_RELEASE
Opering System release, like uname -r.
Definition: proto.h:520
@ RITST_DESCRIPTION
Freform description of server.
Definition: proto.h:511
@ RITST_VERSION
Definition: proto.h:507
@ RITST_HOSTID
Definition: proto.h:533
@ RITST_UN_NODENAME
Opering System node name, like uname -n.
Definition: proto.h:518
@ RITST_LICENSE
Definition: proto.h:537
rstandby_t
Possible standby modes.
Definition: proto.h:265
@ RSTANDBY_ACTIVE
Standby is active.
Definition: proto.h:269
@ RSTANDBY_INACTIVE
Standby is inactive.
Definition: proto.h:267
rattach_t
Types of attaches for the RCMD_ATTACH command.
Definition: proto.h:300
@ RATTACH_SOURCE
Source Attach: Attach stream to a source driver.
Definition: proto.h:304
@ RATTACH_MIXER
Mixer Attach: Attaches a mixer device.
Definition: proto.h:308
@ RATTACH_OUTPUT
Output Attach: Attach stream to a output driver.
Definition: proto.h:306
@ RATTACH_SIMPLE
Simple Attach: Attach stream to a diffrent client.
Definition: proto.h:302
@ RATTACH_BRIDGE
Bridge Attach: Attches a bridge between diffrent subsystems.
Definition: proto.h:310
rproto_t
Protocol IDs.
Definition: proto.h:394
@ RPROTO_RSOUND
RSound protocol.
Definition: proto.h:412
@ RPROTO_IRC
Internet Relay Chat (IRC)
Definition: proto.h:416
@ RPROTO_AUTO
Auto select protocol.
Definition: proto.h:402
@ RPROTO_FINGER
Finger protocol.
Definition: proto.h:426
@ RPROTO_DAYTIME
Daytime protocol.
Definition: proto.h:430
@ RPROTO_RPLD
RoarAudio Playlist Daemon Protocol.
Definition: proto.h:444
@ RPROTO_ECHO
Echo.
Definition: proto.h:420
@ RPROTO_ESOUND
Old EsounD protocol.
Definition: proto.h:400
@ RPROTO_TIME
Time.
Definition: proto.h:440
@ RPROTO_GOPHER
Gopher.
Definition: proto.h:406
@ RPROTO_HTTP
HTTP.
Definition: proto.h:404
@ RPROTO_RLOGIN
RLogin.
Definition: proto.h:442
@ RPROTO_DISCARD
Discard.
Definition: proto.h:422
@ RPROTO_DHCP
Dynamic Host Configuration Protocol.
Definition: proto.h:436
@ RPROTO_MPD
Music Player Daemon Protocol.
Definition: proto.h:446
@ RPROTO_WHOIS
Whois protocol.
Definition: proto.h:424
@ RPROTO_ROARAUDIO
The RoarAudio protocol.
Definition: proto.h:398
@ RPROTO_SIMPLE
PulseAudio Simple protocol.
Definition: proto.h:410
@ RPROTO_TELNET
Telnet.
Definition: proto.h:434
@ RPROTO_GAME
Protocol ID used by games.
Definition: proto.h:432
@ RPROTO_QUOTE
Quote.
Definition: proto.h:428
@ RPROTO_RPLAY
RPlay protocol.
Definition: proto.h:414
@ RPROTO_SSH
SSH.
Definition: proto.h:438
@ RPROTO_ICY
Nullsoft ICY protocol.
Definition: proto.h:408
@ RPROTO_NONE
No protocol given, unused entry, use default.
Definition: proto.h:396
@ RPROTO_DCC
Direct Client-to-Client (DCC)
Definition: proto.h:418
rrpgmode_t
Modes as used with RSTREAMPARA_RPG.
Definition: proto.h:340
@ RRPGMODE_TRACK
Use Track RPG information.
Definition: proto.h:350
@ RRPGMODE_NONE
Do not use RPG information.
Definition: proto.h:344
@ RRPGMODE_USER
Use RPG information as provided by the client (set via RSTREAMPARA_RPG)
Definition: proto.h:346
@ RRPGMODE_ALBUMTRACK
Use Album RPG information, if not available use Track RPG information.
Definition: proto.h:352
@ RRPGMODE_ALBUM
Use Album RPG information.
Definition: proto.h:348
@ RRPGMODE_DEFAULT
Use default RPG Mode. In this case the mode is selected by the server.
Definition: proto.h:342
@ RRPGMODE_TRACKALBUM
Use Track RPG information, if not available use Album RPG information.
Definition: proto.h:354
rdir_t
Type for stream directions.
Definition: proto.h:184
@ RDIR_RDTCS_OUT
Radio Data and Transmitter Control System output stream.
Definition: proto.h:225
@ RDIR_RECORD
Waveform recoard stream.
Definition: proto.h:188
@ RDIR_THRU
Thru stream, this stream type sends raw copys of data passing thru a stream.
Definition: proto.h:203
@ RDIR_RAW_OUT
Raw data output stream.
Definition: proto.h:217
@ RDIR_DIRIDS
One more than the maximum direction ID.
Definition: proto.h:229
@ RDIR_FILTER
Waveform filter stream.
Definition: proto.h:192
@ RDIR_META
Meta data stream, obsolete.
Definition: proto.h:199
@ RDIR_MIDI_IN
MIDI input stream.
Definition: proto.h:207
@ RDIR_BIDIR
Waveform bidirectional stream (this is PLAY and MONITOR in one stream)
Definition: proto.h:201
@ RDIR_RECPLAY
Record and Play at the same time.
Definition: proto.h:227
@ RDIR_MIXING
Mixer core.
Definition: proto.h:196
@ RDIR_RDTCS_IN
Radio Data and Transmitter Control System input stream.
Definition: proto.h:223
@ RDIR_MIDI_OUT
MIDI output stream.
Definition: proto.h:209
@ RDIR_COMPLEX_IN
Complex data input stream.
Definition: proto.h:219
@ RDIR_RAW_IN
Raw data input stream.
Definition: proto.h:215
@ RDIR_LIGHT_IN
Light Control input stream.
Definition: proto.h:211
@ RDIR_OUTPUT
Waveform (and maybe other) stream attached to a driver.
Definition: proto.h:194
@ RDIR_BRIDGE
Bridge between subsystems or two objects in the same subsystem.
Definition: proto.h:205
@ RDIR_LIGHT_OUT
Light Control output stream.
Definition: proto.h:213
@ RDIR_MONITOR
Waveform monitoring stream.
Definition: proto.h:190
@ RDIR_PLAY
Waveform Playback stream.
Definition: proto.h:186
@ RDIR_COMPLEX_OUT
Complex data output stream.
Definition: proto.h:221
rstreamstat_t
States a stream can have.
Definition: proto.h:160
@ RSTREAMSTATE_UNKNOWN
The state of stream is unknown.
Definition: proto.h:162
@ RSTREAMSTATE_INITING
The stream is initing (is creating)
Definition: proto.h:168
@ RSTREAMSTATE_NEEDSEEK
like RSTREAMSTATE_ERROR but can be reset using SEEK command
Definition: proto.h:179
@ RSTREAMSTATE_NULL
The stream does not exist.
Definition: proto.h:164
@ RSTREAMSTATE_ERROR
Stream is in error condition.
Definition: proto.h:177
@ RSTREAMSTATE_NEW
The stream is new. This means the stream have not been used yet.
Definition: proto.h:170
@ RSTREAMSTATE_UNUSED
The stream object is unused.
Definition: proto.h:166
@ RSTREAMSTATE_CLOSING
Definition: proto.h:175
@ RSTREAMSTATE_OLD
The stream is old, This means it was arrady used for data.
Definition: proto.h:172
rot_t
RoarAudio object types.
Definition: proto.h:274
@ ROT_LISTEN
Listen sockets.
Definition: proto.h:290
@ ROT_OUTPUT
Outputs of some kind, normally using some kind of (audio) driver.
Definition: proto.h:284
@ ROT_STREAM
Streams.
Definition: proto.h:278
@ ROT_ACTION
Actions.
Definition: proto.h:292
@ ROT_MSGQUEUE
Message queues.
Definition: proto.h:294
@ ROT_CLIENT
Clients.
Definition: proto.h:276
@ ROT_SOURCE
Sources.
Definition: proto.h:280
@ ROT_MSGBUS
Message busses.
Definition: proto.h:296
@ ROT_SAMPLE
Samples.
Definition: proto.h:282
@ ROT_BRIDGE
Bridges between diffrent subsystems within a server.
Definition: proto.h:288
@ ROT_MIXER
Mixer streams. May be hardware mixer devices or software mixers.
Definition: proto.h:286