diff --git a/panda/src/downloader/downloadDb.I b/panda/src/downloader/downloadDb.I index 3401f6b3d1..b234d78ff1 100644 --- a/panda/src/downloader/downloadDb.I +++ b/panda/src/downloader/downloadDb.I @@ -127,10 +127,12 @@ set_client_multifile_size(string mfname, int size) { // Access: Public // Description: //////////////////////////////////////////////////////////////////// -INLINE void DownloadDb:: +INLINE int DownloadDb:: set_client_multifile_delta_size(string mfname, int size) { (_client_db.get_multifile_record_named(mfname))->_size += size; write_db(_client_db._filename, _client_db); + // Return the new total + return (_client_db.get_multifile_record_named(mfname))->_size; } @@ -157,6 +159,17 @@ set_server_multifile_size(string mfname, int size) { } +//////////////////////////////////////////////////////////////////// +// Function: DownloadDb:: +// Access: Public +// Description: +//////////////////////////////////////////////////////////////////// +INLINE void DownloadDb:: +set_client_multifile_incomplete(string mfname) { + (_client_db.get_multifile_record_named(mfname))->_status = Status_incomplete; + write_db(_client_db._filename, _client_db); +} + //////////////////////////////////////////////////////////////////// // Function: DownloadDb:: // Access: Public diff --git a/panda/src/downloader/downloadDb.h b/panda/src/downloader/downloadDb.h index 5d3ff4a927..cd5b593278 100644 --- a/panda/src/downloader/downloadDb.h +++ b/panda/src/downloader/downloadDb.h @@ -80,13 +80,14 @@ public: INLINE int get_client_multifile_size(string mfname) const; INLINE void set_client_multifile_size(string mfname, int size); - INLINE void set_client_multifile_delta_size(string mfname, int size); + INLINE int set_client_multifile_delta_size(string mfname, int size); INLINE int get_server_multifile_size(string mfname) const; INLINE void set_server_multifile_size(string mfname, int size); INLINE int get_client_multifile_phase(string mfname) const; INLINE int get_server_multifile_phase(string mfname) const; + INLINE void set_client_multifile_incomplete(string mfname); INLINE void set_client_multifile_complete(string mfname); INLINE void set_client_multifile_decompressed(string mfname); INLINE void set_client_multifile_expanded(string mfname);