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);
62 void beginTitle(uint overriddenEntryPointScreenId = 0);
63 void startContextLoad(uint contextId);
64 bool isContextLoadInProgress(uint contextId);
65 void branchToScreen();
66 void scheduleScreenBranch(uint screenActorId);
67 void scheduleContextRelease(uint contextId);
69 void streamDidClose(uint streamId);
70 void streamDidFinish(uint streamId);
73 void streamDidOpen(uint streamId) {};
74 void streamWillRead(uint streamId) {};
77 uint contextIdForScreenActorId(uint screenActorId);
80 uint _currentScreenActorId = 0;
84 uint _requestedScreenBranchId = 0;
85 bool _entryPointScreenIdWasOverridden =
false;
86 uint _entryPointScreenId = 0;
87 uint _entryPointStreamId = 0;
88 uint _loadingContextId = 0;
89 uint _loadingScreenActorId = 0;
91 void contextLoadDidComplete();
92 void screenLoadDidComplete();
93 void startFeed(uint streamId);
99 void blowAwayCurrentScreen();
100 void preloadParentContexts(uint contextId);
101 void addToContextLoadQueue(uint contextId);
102 bool isContextLoadQueued(uint contextId);
103 void checkQueuedContextLoads();