22 #ifndef MEDIASTATION_CLIENTS_H 23 #define MEDIASTATION_CLIENTS_H 25 #include "mediastation/datafile.h" 36 virtual bool attemptToReadFromStream(
Chunk &chunk, uint sectionType) = 0;
39 enum DeviceOwnerSectionType {
40 kDeviceOwnerAllowMultipleSounds = 0x35,
41 kDeviceOwnerAllowMultipleStreams = 0x36,
46 virtual bool attemptToReadFromStream(
Chunk &chunk, uint sectionType)
override;
48 bool _allowMultipleSounds =
false;
49 bool _allowMultipleStreams =
false;
52 enum DocumentSectionType {
53 kDocumentContextLoadComplete = 0x10,
54 kDocumentStartupInformation = 0x2e,
55 kDocumentEntryScreen = 0x2f,
62 virtual bool attemptToReadFromStream(
Chunk &chunk, uint sectionType)
override;
63 void readStartupInformation(
Chunk &chunk);
64 void readContextLoadComplete(
Chunk &chunk);
67 void startContextLoad(uint contextId);
68 bool isContextLoadInProgress(uint contextId);
69 void branchToScreen(uint screenId,
bool disableScreenAutoUpdate);
71 void streamDidClose(uint streamId);
72 void streamDidFinish(uint streamId);
75 void streamDidOpen(uint streamId) {};
76 void streamWillRead(uint streamId) {};
78 uint contextIdForScreenActorId(uint screenActorId);
79 void addToContextLoadQueue(uint contextId);
80 void removeFromContextLoadQueue(uint contextId);
81 bool isContextLoadQueued(uint contextId);
82 void contextReleaseComplete(uint contextId);
83 void contextAlreadyReleased(uint contextId);
88 uint _currentScreenActorId = 0;
91 bool _entryPointScreenIdWasOverridden =
false;
92 uint _entryPointScreenId = 0;
93 uint _entryPointStreamId = 0;
94 uint _loadingContextId = 0;
95 uint _loadingScreenActorId = 0;
96 uint _disabledScreenAutoUpdateToken = 0;
98 void contextLoadDidComplete();
99 void screenLoadDidComplete();
100 void startFeed(uint streamId);
106 void blowAwayCurrentScreen();
107 void preloadParentContexts(uint contextId);
108 void checkQueuedContextLoads();