#if !defined(SPOOLER_HPP) # define SPOOLER_HPP # if !defined(APPMGR_HPP) # include # endif //########################################################################## //########################### SpoolFile ################################ //########################################################################## class SpoolFile: public MemoryStream { public: SpoolFile( void *stream_start, size_t stream_size, size_t initial_offset=0 ); SpoolFile(SpoolFile& spool); ~SpoolFile(); enum SpoolState { Empty, Spooling, Stored, Playing }; SpoolState spoolState; void SaveAs(const char *name); void Read(const char *name); void SpoolPacket(NetworkPacket *packet); NetworkPacket* NextPacket(); }; //########################################################################## //############## MissionReviewApplicationManager ##################### //########################################################################## class MissionReviewApplicationManager: public ApplicationManager { public: MissionReviewApplicationManager( Scalar frame_rate, int spool_count, size_t spool_size ); ~MissionReviewApplicationManager(); SpoolFile* GetEmptySpoolFile(); SpoolFile* GetStoredSpoolFile(); void StoreSpoolFile(SpoolFile *spool_file); void ReleaseSpoolFile(SpoolFile *spool_file); protected: int spoolCount; SpoolFile **spoolFiles; char **spoolBuffers; size_t spoolSize; }; #endif