24 virtual void Pulse(
const PulseArgs & args);
32 void SendMessageToGUI(
const ConstMessageRef & msg,
bool allowReviewTrigger,
bool force =
false);
57 bool IsStrategyReviewMaybeNecessary()
const;
58 status_t SendPeerOnlineOfflineMessageToGUI(uint32 whatCode,
const ZGPeerID &
id,
const ConstMessageRef & optPeerInfo);
59 ConstMessageRef GenerateLatenciesMessage()
const;
69 bool _requestAssignmentStrategyReviewPending;
70 uint64 _allNotesAtLastReview;
71 Hashtable<ZGPeerID, ConstMessageRef> _peersAtLastReview;
73 uint64 _nextSendLatenciesTime;
This immutable class holds various read-only settings that will be used to define the peer's behavior...
void SendMessageToGUI(const ConstMessageRef &msg, bool allowReviewTrigger, bool force=false)
Sends the specified message to the GUI thread so the GUI will update its visible state to match ours...
This object holds the state of how the currently-in-memory Music sheet should be performed over time...
virtual void PeerHasGoneOffline(const ZGPeerID &peerID, const ConstMessageRef &peerInfo)
Called when a peer has left our group.
This is a convenience class; it is the same as a ZGPeerSession except that it also knows how to creat...
virtual void PeerHasComeOnline(const ZGPeerID &peerID, const ConstMessageRef &peerInfo)
Called when a new peer has joined our group.
virtual void Pulse(const PulseArgs &args)
Called at (approximately) the time specified by GetPulseTime().
ChoirSession(const ZGPeerSettings &peerSettings)
Constructor.
A ZGPeerID is a 128-bit integer that uniquely represents a particular peer in a ZG system...
virtual void MessageReceivedFromSession(AbstractReflectSession &from, const MessageRef &msg, void *userData)
Called when a Message object has been received from a fellow session on the same ReflectServer.
virtual uint64 GetPulseTime(const PulseArgs &args)
Returns the time (in microseconds, using the timebase of GetRunTime64()) when Pulse() should next be ...
virtual void SeniorPeerChanged(const ZGPeerID &oldSeniorPeerID, const ZGPeerID &newSeniorPeerID)
Called when the senior peer of our peer group has changed.
The choir namespace contains the code specific to the ZGChoir demonstration application.
void SetReviewResults(uint64 allNotesAtLastReview)
Called to set what the results of the last notes-assignments review was.
This object is the in-memory representation of a song, as a collection of notes over time...
This is the class that that the Choir demo uses to implement its data-replication functionality...
This object specifies which peers should be playing which notes.
IDatabaseObjectRef CreateDatabaseObject(uint32 whichDatabase)
This will be called as part of the startup sequence.