#include <downloadDb.h>
Public Types | |
typedef pvector< PT(FileRecord) | FileRecords ) |
typedef pvector< PT(MultifileRecord) | MultifileRecords ) |
typedef pvector< HashVal > | VectorHash |
typedef pmap< Filename, VectorHash > | VersionMap |
Public Member Functions | |
Db | read_db (Ramfile &file, bool want_server_info) |
bool | write_db (Filename &file, Db db, bool want_server_info) |
void | insert_new_version (const Filename &name, const HashVal &hash) |
bool | has_version (const Filename &name) const |
int | get_num_versions (const Filename &name) const |
void | set_num_versions (const Filename &name, int num_versions) |
int | get_version (const Filename &name, const HashVal &hash) const |
const HashVal & | get_hash (const Filename &name, int version) const |
Public Attributes | |
PUBLISHED | __pad1__: Db read_db(Filename &file |
PUBLISHED bool | want_server_info |
Db | _client_db |
Db | _server_db |
PUBLISHED | __pad2__: void add_version(const Filename &name |
PUBLISHED const HashVal & | hash |
PUBLISHED const HashVal int | version |
Static Public Attributes | |
PN_uint32 | _magic_number = 0xfeedfeed |
PN_uint32 | _bogus_magic_number = 0x11111111 |
Protected Member Functions | |
void | write_version_map (ofstream &write_stream) |
bool | read_version_map (istream &read_stream) |
Protected Attributes | |
VersionMap | _versions |
Datagram | _master_datagram |
Private Member Functions | |
DownloadDb (void) | |
DownloadDb (Ramfile &server_file, Filename &client_file) | |
DownloadDb (Filename &server_file, Filename &client_file) | |
~DownloadDb (void) | |
void | output (ostream &out) const |
void | write (ostream &out) const |
void | write_version_map (ostream &out) const |
bool | write_client_db (Filename &file) |
bool | write_server_db (Filename &file) |
INLINE int | get_client_num_multifiles (void) const |
INLINE int | get_server_num_multifiles (void) const |
INLINE string | get_client_multifile_name (int index) const |
INLINE string | get_server_multifile_name (int index) const |
INLINE int | get_client_multifile_size (string mfname) const |
INLINE void | set_client_multifile_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 Phase | get_client_multifile_phase (string mfname) const |
INLINE Phase | 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_extracted (string mfname) |
INLINE int | get_server_num_files (string mfname) const |
INLINE string | get_server_file_name (string mfname, int index) const |
bool | client_multifile_exists (string mfname) const |
bool | client_multifile_complete (string mfname) const |
bool | client_multifile_decompressed (string mfname) const |
bool | client_multifile_extracted (string mfname) const |
HashVal | get_client_multifile_hash (string mfname) const |
void | set_client_multifile_hash (string mfname, HashVal val) |
HashVal | get_server_multifile_hash (string mfname) const |
void | set_server_multifile_hash (string mfname, HashVal val) |
void | delete_client_multifile (string mfname) |
void | add_client_multifile (string server_mfname) |
void | expand_client_multifile (string mfname) |
void | create_new_server_db () |
void | server_add_multifile (string mfname, Phase phase, int size, int status) |
void | server_add_file (string mfname, string fname) |
Private Attributes | |
PUBLISHED | __pad0__: enum Status { Status_incomplete = 0 |
PUBLISHED | Status_complete = 1 |
PUBLISHED | Status_decompressed = 2 |
PUBLISHED | Status_extracted |
|
Definition at line 149 of file downloadDb.h. |
|
Definition at line 170 of file downloadDb.h. |
|
Definition at line 213 of file downloadDb.h. Referenced by get_hash(), get_version(), insert_new_version(), and set_num_versions(). |
|
Definition at line 214 of file downloadDb.h. |
|
Definition at line 88 of file downloadDb.cxx. References _client_db, and _server_db. |
|
Definition at line 57 of file downloadDb.cxx. References _client_db, DownloadDb::Db::_filename, _server_db, and read_db(). |
|
Definition at line 72 of file downloadDb.cxx. References _client_db, DownloadDb::Db::_filename, _server_db, and read_db(). |
|
Definition at line 99 of file downloadDb.cxx. |
|
Definition at line 266 of file downloadDb.cxx. References _client_db, _server_db, DownloadDb::Db::add_multifile_record(), and PT. |
|
Definition at line 177 of file downloadDb.cxx. References _client_db, and Status_complete. |
|
Definition at line 188 of file downloadDb.cxx. References _client_db, and Status_decompressed. |
|
Definition at line 165 of file downloadDb.cxx. References _client_db, and DownloadDb::Db::multifile_exists(). |
|
Definition at line 199 of file downloadDb.cxx. References _client_db, and Status_extracted. |
|
Definition at line 388 of file downloadDb.cxx. References _server_db. |
|
Definition at line 257 of file downloadDb.cxx. |
|
Definition at line 281 of file downloadDb.cxx. |
|
Definition at line 211 of file downloadDb.cxx. References _client_db. |
|
|
|
|
|
|
|
|
|
Definition at line 1208 of file downloadDb.cxx. References _versions, and VectorHash. |
|
Definition at line 1146 of file downloadDb.cxx. References _versions. |
|
|
|
Definition at line 222 of file downloadDb.cxx. References _server_db. |
|
|
|
|
|
|
|
|
|
|
|
Definition at line 1185 of file downloadDb.cxx. References _versions, and VectorHash. |
|
Definition at line 1135 of file downloadDb.cxx. References _versions. |
|
Definition at line 1122 of file downloadDb.cxx. References _versions, and VectorHash. |
|
Definition at line 112 of file downloadDb.cxx. References _client_db, DownloadDb::Db::_filename, and _server_db. Referenced by operator<<(). |
|
Definition at line 328 of file downloadDb.cxx. References Ramfile::_data, DownloadDb::Db::read(), and read_version_map(). Referenced by DownloadDb(). |
|
Definition at line 1271 of file downloadDb.cxx. References _master_datagram, Datagram::append_data(), buffer, Datagram::clear(), DatagramIterator::extract_bytes(), DatagramIterator::get_int32(), DatagramIterator::get_uint32(), hash, length, PN_int32, PN_uint32, and HashVal::set_value(). Referenced by read_db(). |
|
Definition at line 411 of file downloadDb.cxx. References DownloadDb::Db::_mfile_records, _server_db, and PT. |
|
Definition at line 399 of file downloadDb.cxx. References _server_db, DownloadDb::Db::add_multifile_record(), and PT. |
|
|
|
|
|
|
|
|
|
Definition at line 233 of file downloadDb.cxx. References _client_db, DownloadDb::Db::_filename, and write_client_db(). |
|
|
|
|
|
Definition at line 1163 of file downloadDb.cxx. References _versions, and VectorHash. |
|
Definition at line 245 of file downloadDb.cxx. References _server_db. |
|
|
|
Definition at line 122 of file downloadDb.cxx. References _client_db, DownloadDb::Db::_filename, _server_db, DownloadDb::Db::write(), and write_version_map(). Referenced by main(). |
|
Definition at line 144 of file downloadDb.cxx. References _client_db, and write_db(). Referenced by set_client_multifile_hash(). |
|
Definition at line 355 of file downloadDb.cxx. References DownloadDb::Db::write(), DownloadDb::Db::write_bogus_header(), DownloadDb::Db::write_header(), and write_version_map(). Referenced by write_client_db(), and write_server_db(). |
|
Definition at line 155 of file downloadDb.cxx. References _server_db, and write_db(). |
|
Definition at line 1234 of file downloadDb.cxx. References _master_datagram, _versions, Datagram::add_int32(), Datagram::add_uint32(), Datagram::append_data(), Datagram::clear(), Datagram::get_message(), HashVal::get_value(), and hash. |
|
Definition at line 1342 of file downloadDb.cxx. References _versions, and hash. Referenced by write(), and write_db(). |
|
Definition at line 75 of file downloadDb.h. |
|
Definition at line 200 of file downloadDb.h. |
|
Definition at line 217 of file downloadDb.h. |
|
Definition at line 34 of file downloadDb.cxx. |
|
Definition at line 207 of file downloadDb.h. Referenced by add_client_multifile(), client_multifile_complete(), client_multifile_decompressed(), client_multifile_exists(), client_multifile_extracted(), DownloadDb(), get_client_multifile_hash(), output(), set_client_multifile_hash(), write(), and write_client_db(). |
|
Definition at line 28 of file downloadDb.cxx. |
|
Definition at line 230 of file downloadDb.h. Referenced by read_version_map(), and write_version_map(). |
|
Definition at line 208 of file downloadDb.h. Referenced by add_client_multifile(), create_new_server_db(), DownloadDb(), get_server_multifile_hash(), output(), server_add_file(), server_add_multifile(), set_server_multifile_hash(), write(), and write_server_db(). |
|
Definition at line 229 of file downloadDb.h. Referenced by get_hash(), get_num_versions(), get_version(), has_version(), insert_new_version(), set_num_versions(), and write_version_map(). |
|
Definition at line 217 of file downloadDb.h. Referenced by read_version_map(), and write_version_map(). |
|
Definition at line 76 of file downloadDb.h. Referenced by client_multifile_complete(). |
|
Definition at line 77 of file downloadDb.h. Referenced by client_multifile_decompressed(). |
|
Initial value: 3 } Definition at line 78 of file downloadDb.h. Referenced by client_multifile_extracted(). |
|
Definition at line 217 of file downloadDb.h. |
|
Definition at line 200 of file downloadDb.h. |