Panda3D
|
Public Member Functions | |
void | add_multifile_record (PT(MultifileRecord) mfr) |
string | get_multifile_name (int index) const |
int | get_num_multifiles () const |
bool | multifile_exists (string mfname) const |
int | parse_header (const string &data) |
Verifies magic number, returns the number of multifiles or -1 if invalid. More... | |
int | parse_record_header (const string &data) |
Parses a file record (fr) header and returns the length of the next file record. More... | |
PT (MultifileRecord) get_multifile_record_named(string mfname) const | |
PT (MultifileRecord) parse_mfr(const string &data) | |
PT (FileRecord) parse_fr(const string &data) | |
bool | read (StreamReader &sr, bool want_server_info) |
void | write (ostream &out) const |
bool | write (StreamWriter &sw, bool want_server_info) |
bool | write_bogus_header (StreamWriter &sw) |
Writes the bogus header uncompressed with platform- independent byte ordering. More... | |
bool | write_header (ostream &write_stream) |
Writes the header uncompressed with platform- independent byte ordering. More... | |
Public Attributes | |
Filename | _filename |
MultifileRecords | _mfile_records |
Definition at line 171 of file downloadDb.h.
int DownloadDb::Db::parse_header | ( | const string & | data | ) |
Verifies magic number, returns the number of multifiles or -1 if invalid.
Definition at line 678 of file downloadDb.cxx.
References DatagramIterator::get_int32(), DatagramIterator::get_uint32(), and parse_record_header().
Referenced by DownloadDb::create_new_server_db().
int DownloadDb::Db::parse_record_header | ( | const string & | data | ) |
Parses a file record (fr) header and returns the length of the next file record.
Definition at line 721 of file downloadDb.cxx.
References StreamWriter::add_float64(), StreamWriter::add_int32(), StreamWriter::append_data(), StreamReader::extract_bytes(), DatagramIterator::extract_bytes(), DatagramIterator::get_float64(), DatagramIterator::get_int32(), and write_bogus_header().
Referenced by parse_header().
bool DownloadDb::Db::write_bogus_header | ( | StreamWriter & | sw | ) |
Writes the bogus header uncompressed with platform- independent byte ordering.
This header will get overwritten with the real magic number as the last step in the write
Definition at line 987 of file downloadDb.cxx.
References StreamWriter::add_int32(), StreamWriter::add_uint32(), and write_header().
Referenced by parse_record_header(), and DownloadDb::set_server_multifile_hash().
bool DownloadDb::Db::write_header | ( | ostream & | write_stream | ) |
Writes the header uncompressed with platform- independent byte ordering.
Definition at line 1004 of file downloadDb.cxx.
References Datagram::add_int32(), Datagram::add_uint32(), DownloadDb::add_version(), and Datagram::get_message().
Referenced by DownloadDb::set_server_multifile_hash(), and write_bogus_header().