ZG  "1.00
 All Classes Namespaces Files Functions Variables Enumerator Friends Macros Pages
ChoirProtocol.h
Go to the documentation of this file.
1 #ifndef ChoirProtocol_h
2 #define ChoirProtocol_h
3 
4 #include "util/String.h"
5 #include "ChoirNameSpace.h"
6 
7 namespace choir {
8 
9 #define CHOIR_VERSION_STRING "1.00"
11 enum {
12  CHOIR_DATABASE_SCORE = 0, // the music itself
13  CHOIR_DATABASE_PLAYBACKSTATE, // what and where we are currently playing at
14  CHOIR_DATABASE_ROSTER, // names and other info about our bell-ringers
16 };
17 
18 enum {
19  // commands for updating the CHOIR_DATABASE_SCORE database
20  CHOIR_COMMAND_TOGGLE_NOTE = 1668245874, // 'coir'
22  CHOIR_COMMAND_SET_CHORD, // sent by senior peer to junior peers
23  CHOIR_COMMAND_INSERT_CHORD, // inserts a column at the given index; all notes afterwards move to the right
24  CHOIR_COMMAND_DELETE_CHORD, // deletes a column at the given index; all notes afterwards move to the left
25 
26  // commands for updating the CHOIR_DATABASE_PLAYBACKSTATE database
27  CHOIR_COMMAND_PLAY, // may include a seek-command
28  CHOIR_COMMAND_PAUSE, // may include a seek-command
30 
31  // commands for updating the CHOIR_DATABASE_ROSTER database
34  CHOIR_COMMAND_REVIEW_ASSIGNMENTS, // if we have an automated bell-assignment strategy, here's where we implement it
37 
38  // Commands sent from local ChoirSession to GUI
41 };
42 
43 enum {
44  CHOIR_REPLY_GUI_UPDATE = 1668444268, // 'crpl' // send from our local network thread back to the GUI
45  CHOIR_REPLY_LATENCIES_TABLE, // new estimated-network-latencies to display
47 };
48 
49 extern const String CHOIR_NAME_CHORD_INDEX;
50 extern const String CHOIR_NAME_CHORD_VALUE;
51 extern const String CHOIR_NAME_NOTE_INDEX;
52 extern const String CHOIR_NAME_WRAPPED_MESSAGE;
53 extern const String CHOIR_NAME_MICROS_PER_CHORD;
54 extern const String CHOIR_NAME_LOOP;
55 extern const String CHOIR_NAME_SONG_FILE_PATH;
56 extern const String CHOIR_NAME_PEER_NICKNAME;
57 extern const String CHOIR_NAME_PEER_ID;
58 extern const String CHOIR_NAME_PEER_INFO;
59 extern const String CHOIR_NAME_PEER_LATENCY;
60 extern const String CHOIR_NAME_STRATEGY;
61 
62 }; // end namespace choir
63 
64 #endif
const String CHOIR_NAME_MICROS_PER_CHORD
const String CHOIR_NAME_PEER_NICKNAME
const String CHOIR_NAME_CHORD_VALUE
const String CHOIR_NAME_PEER_ID
const String CHOIR_NAME_CHORD_INDEX
const String CHOIR_NAME_PEER_LATENCY
const String CHOIR_NAME_SONG_FILE_PATH
const String CHOIR_NAME_PEER_INFO
The choir namespace contains the code specific to the ZGChoir demonstration application.
Definition: ChoirNameSpace.h:7
const String CHOIR_NAME_WRAPPED_MESSAGE
const String CHOIR_NAME_LOOP
const String CHOIR_NAME_NOTE_INDEX
const String CHOIR_NAME_STRATEGY