Panda3D
Public Member Functions | Public Attributes | List of all members
DownloadDb::Db Class Reference

Public Member Functions

std::string get_multifile_name (int index) const
 
int get_num_multifiles () const
 
bool multifile_exists (std::string mfname) const
 
int parse_header (Datagram dg)
 Verifies magic number, returns the number of multifiles or -1 if invalid. More...
 
int parse_record_header (Datagram dg)
 Parses a file record (fr) header and returns the length of the next file record. More...
 
 PT (MultifileRecord) parse_mfr(Datagram dg)
 
 PT (FileRecord) parse_fr(Datagram dg)
 
bool read (StreamReader &sr, bool want_server_info)
 
void write (std::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 (std::ostream &write_stream)
 Writes the header uncompressed with platform- independent byte ordering. More...
 

Public Attributes

Filename _filename
 
MultifileRecords _mfile_records
 

Detailed Description

Definition at line 165 of file downloadDb.h.

Member Function Documentation

◆ parse_header()

int DownloadDb::Db::parse_header ( Datagram  dg)

Verifies magic number, returns the number of multifiles or -1 if invalid.

Definition at line 593 of file downloadDb.cxx.

References DatagramIterator::get_int32(), and DatagramIterator::get_uint32().

◆ parse_record_header()

int DownloadDb::Db::parse_record_header ( Datagram  dg)

Parses a file record (fr) header and returns the length of the next file record.

Definition at line 631 of file downloadDb.cxx.

References DatagramIterator::get_int32().

◆ write_bogus_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 879 of file downloadDb.cxx.

References StreamWriter::add_int32(), and StreamWriter::add_uint32().

◆ write_header()

bool DownloadDb::Db::write_header ( std::ostream &  write_stream)

Writes the header uncompressed with platform- independent byte ordering.

Definition at line 893 of file downloadDb.cxx.

References Datagram::add_int32(), Datagram::add_uint32(), Datagram::get_data(), and Datagram::get_length().


The documentation for this class was generated from the following files: