Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

DownloadDb::Db Class Reference

#include <downloadDb.h>

List of all members.

Public Member Functions

 Db (void)
void write (ostream &out) const
int get_num_multifiles (void) const
string get_multifile_name (int index) const
bool multifile_exists (string mfname) const
 PT (MultifileRecord) get_multifile_record_named(string mfname) const
void add_multifile_record (PT(MultifileRecord) mfr)
int parse_header (uchar *start, int size)
int parse_record_header (uchar *start, int size)
 PT (MultifileRecord) parse_mfr(uchar *start
 PT (FileRecord) parse_fr(uchar *start
bool read (istream &read_stream, bool want_server_info)
bool write (ofstream &write_stream, bool want_server_info)
bool write_header (ofstream &write_stream)
bool write_bogus_header (ofstream &write_stream)

Public Attributes

int size
Filename _filename
MultifileRecords _mfile_records

Private Attributes

PN_int32 _header_length
Datagram _datagram


Constructor & Destructor Documentation

DownloadDb::Db::Db void   ) 
 

Definition at line 574 of file downloadDb.cxx.

References _header_length.


Member Function Documentation

void DownloadDb::Db::add_multifile_record PT(MultifileRecord mfr  ) 
 

Definition at line 656 of file downloadDb.cxx.

References _mfile_records.

Referenced by DownloadDb::add_client_multifile(), read(), and DownloadDb::server_add_multifile().

string DownloadDb::Db::get_multifile_name int  index  )  const
 

Definition at line 610 of file downloadDb.cxx.

References _mfile_records, and index.

int DownloadDb::Db::get_num_multifiles void   )  const
 

Definition at line 600 of file downloadDb.cxx.

References _mfile_records.

Referenced by write_bogus_header(), and write_header().

bool DownloadDb::Db::multifile_exists string  mfname  )  const
 

Definition at line 620 of file downloadDb.cxx.

References _mfile_records.

Referenced by DownloadDb::client_multifile_exists().

int DownloadDb::Db::parse_header uchar start,
int  size
 

Definition at line 668 of file downloadDb.cxx.

References _datagram, Datagram::append_data(), Datagram::clear(), DatagramIterator::get_int32(), DatagramIterator::get_uint32(), PN_int32, PN_uint32, and start.

Referenced by read().

int DownloadDb::Db::parse_record_header uchar start,
int  size
 

Definition at line 712 of file downloadDb.cxx.

References _datagram, Datagram::append_data(), Datagram::clear(), DatagramIterator::get_int32(), PN_int32, and start.

Referenced by read().

DownloadDb::Db::PT FileRecord   ) 
 

DownloadDb::Db::PT MultifileRecord   ) 
 

DownloadDb::Db::PT MultifileRecord   )  const
 

Referenced by read().

bool DownloadDb::Db::read istream &  read_stream,
bool  want_server_info
 

Definition at line 810 of file downloadDb.cxx.

References _header_length, add_multifile_record(), parse_header(), parse_record_header(), PT(), and uchar.

Referenced by DownloadDb::read_db().

bool DownloadDb::Db::write ofstream &  write_stream,
bool  want_server_info
 

Definition at line 909 of file downloadDb.cxx.

References _datagram, _mfile_records, Datagram::add_float64(), Datagram::add_int32(), Datagram::add_uint32(), Datagram::append_data(), Datagram::clear(), Datagram::get_message(), HashVal::get_value(), PN_float64, PN_int32, and size.

void DownloadDb::Db::write ostream &  out  )  const
 

Definition at line 586 of file downloadDb.cxx.

References _mfile_records.

Referenced by DownloadDb::write(), and DownloadDb::write_db().

bool DownloadDb::Db::write_bogus_header ofstream &  write_stream  ) 
 

Definition at line 1010 of file downloadDb.cxx.

References _datagram, Datagram::add_int32(), Datagram::add_uint32(), Datagram::clear(), Datagram::get_message(), and get_num_multifiles().

Referenced by DownloadDb::write_db().

bool DownloadDb::Db::write_header ofstream &  write_stream  ) 
 

Definition at line 1031 of file downloadDb.cxx.

References _datagram, Datagram::add_int32(), Datagram::add_uint32(), Datagram::clear(), Datagram::get_message(), and get_num_multifiles().

Referenced by DownloadDb::write_db().


Member Data Documentation

Datagram DownloadDb::Db::_datagram [private]
 

Definition at line 195 of file downloadDb.h.

Referenced by parse_header(), parse_record_header(), write(), write_bogus_header(), and write_header().

Filename DownloadDb::Db::_filename
 

Definition at line 187 of file downloadDb.h.

Referenced by DownloadDb::DownloadDb(), DownloadDb::output(), DownloadDb::set_client_multifile_hash(), and DownloadDb::write().

PN_int32 DownloadDb::Db::_header_length [private]
 

Definition at line 192 of file downloadDb.h.

Referenced by Db(), and read().

MultifileRecords DownloadDb::Db::_mfile_records
 

Definition at line 188 of file downloadDb.h.

Referenced by add_multifile_record(), get_multifile_name(), get_num_multifiles(), multifile_exists(), DownloadDb::server_add_file(), and write().

int DownloadDb::Db::size
 

Definition at line 184 of file downloadDb.h.

Referenced by write().


The documentation for this class was generated from the following files:
Generated on Fri Apr 18 00:11:54 2003 for Panda by doxygen1.3