22 #ifndef MEDIASTATION_CLIENTS_H 23 #define MEDIASTATION_CLIENTS_H 25 #include "mediastation/datafile.h" 34 virtual bool attemptToReadFromStream(
Chunk &chunk, uint sectionType) = 0;
37 enum DeviceOwnerSectionType {
38 kDeviceOwnerAllowMultipleSounds = 0x35,
39 kDeviceOwnerAllowMultipleStreams = 0x36,
44 virtual bool attemptToReadFromStream(
Chunk &chunk, uint sectionType)
override;
46 bool _allowMultipleSounds =
false;
47 bool _allowMultipleStreams =
false;
50 enum DocumentSectionType {
51 kDocumentContextLoadComplete = 0x10,
52 kDocumentStartupInformation = 0x2e,
53 kDocumentEntryScreen = 0x2f,
58 virtual bool attemptToReadFromStream(
Chunk &chunk, uint sectionType)
override;
59 void readStartupInformation(
Chunk &chunk);
60 void readContextLoadComplete(
Chunk &chunk);
63 void startContextLoad(uint contextId);
64 bool isContextLoadInProgress(uint contextId);
65 void branchToScreen(uint screenId,
bool disableScreenAutoUpdate);
67 void streamDidClose(uint streamId);
68 void streamDidFinish(uint streamId);
71 void streamDidOpen(uint streamId) {};
72 void streamWillRead(uint streamId) {};
74 uint contextIdForScreenActorId(uint screenActorId);
75 void addToContextLoadQueue(uint contextId);
76 void removeFromContextLoadQueue(uint contextId);
77 bool isContextLoadQueued(uint contextId);
78 void contextReleaseComplete(uint contextId);
79 void contextAlreadyReleased(uint contextId);
82 uint _currentScreenActorId = 0;
85 bool _entryPointScreenIdWasOverridden =
false;
86 uint _entryPointScreenId = 0;
87 uint _entryPointStreamId = 0;
88 uint _loadingContextId = 0;
89 uint _loadingScreenActorId = 0;
90 uint _disabledScreenAutoUpdateToken = 0;
92 void contextLoadDidComplete();
93 void screenLoadDidComplete();
94 void startFeed(uint streamId);
100 void blowAwayCurrentScreen();
101 void preloadParentContexts(uint contextId);
102 void checkQueuedContextLoads();