DownloadDb

from panda3d.core import DownloadDb
class DownloadDb

Bases: DTOOL_SUPER_BASE

A listing of files within multifiles for management of client-side synchronization with a server-provided set of files.

This class manages one copy of the database for the client, representing the files on the client system, and another copy for the server, representing the files the server has available.

Inheritance diagram

Inheritance diagram of DownloadDb

StatusComplete = 1
StatusDecompressed = 2
StatusExtracted = 3
StatusIncomplete = 0
Status_complete = 1
Status_decompressed = 2
Status_extracted = 3
Status_incomplete = 0
__init__(*args, **kwargs)
addClientMultifile()

C++ Interface: add_client_multifile(const DownloadDb self, str server_mfname)

/**

*/

addVersion()

C++ Interface: add_version(const DownloadDb self, const Filename name, const HashVal hash, int version)

/**
  • Appends a new version of the file onto the end of the list, or changes the

  • hash associated with a version previously added.

  • Note: version numbers start at 1

*/

add_client_multifile()

C++ Interface: add_client_multifile(const DownloadDb self, str server_mfname)

/**

*/

add_version()

C++ Interface: add_version(const DownloadDb self, const Filename name, const HashVal hash, int version)

/**
  • Appends a new version of the file onto the end of the list, or changes the

  • hash associated with a version previously added.

  • Note: version numbers start at 1

*/

clientMultifileComplete()

C++ Interface: client_multifile_complete(DownloadDb self, str mfname)

/**
  • A multifile is complete when it is completely downloaded. Note: it may

  • already be decompressed or extracted and it is still complete

*/

clientMultifileDecompressed()

C++ Interface: client_multifile_decompressed(DownloadDb self, str mfname)

/**

*/

clientMultifileExists()

C++ Interface: client_multifile_exists(DownloadDb self, str mfname)

// Queries from the Launcher

/**

*/

clientMultifileExtracted()

C++ Interface: client_multifile_extracted(DownloadDb self, str mfname)

/**

*/

client_multifile_complete()

C++ Interface: client_multifile_complete(DownloadDb self, str mfname)

/**
  • A multifile is complete when it is completely downloaded. Note: it may

  • already be decompressed or extracted and it is still complete

*/

client_multifile_decompressed()

C++ Interface: client_multifile_decompressed(DownloadDb self, str mfname)

/**

*/

client_multifile_exists()

C++ Interface: client_multifile_exists(DownloadDb self, str mfname)

// Queries from the Launcher

/**

*/

client_multifile_extracted()

C++ Interface: client_multifile_extracted(DownloadDb self, str mfname)

/**

*/

createNewServerDb()

C++ Interface: create_new_server_db(const DownloadDb self)

// Server side operations to create multifile records

/**
  • Used on the server side makefiles to create a new clean server db

*/

create_new_server_db()

C++ Interface: create_new_server_db(const DownloadDb self)

// Server side operations to create multifile records

/**
  • Used on the server side makefiles to create a new clean server db

*/

deleteClientMultifile()

C++ Interface: delete_client_multifile(const DownloadDb self, str mfname)

// Operations on multifiles

/**

*/

delete_client_multifile()

C++ Interface: delete_client_multifile(const DownloadDb self, str mfname)

// Operations on multifiles

/**

*/

expandClientMultifile()

C++ Interface: expand_client_multifile(const DownloadDb self, str mfname)

/**

*/

expand_client_multifile()

C++ Interface: expand_client_multifile(const DownloadDb self, str mfname)

/**

*/

getClientMultifileHash()

C++ Interface: get_client_multifile_hash(DownloadDb self, str mfname)

// Ask what version (told with the hash) this multifile is

/**
  • Return the hash value of the file we are working on

*/

getClientMultifileName()

C++ Interface: get_client_multifile_name(DownloadDb self, int index)

/**

*/

getClientMultifilePhase()

C++ Interface: get_client_multifile_phase(DownloadDb self, str mfname)

/**

*/

getClientMultifileSize()

C++ Interface: get_client_multifile_size(DownloadDb self, str mfname)

/**

*/

getClientNumMultifiles()

C++ Interface: get_client_num_multifiles(DownloadDb self)

/**

*/

getHash()

C++ Interface: get_hash(DownloadDb self, const Filename name, int version)

/**
  • Returns the MD5 hash associated with the indicated version of the indicated

  • file.

*/

getNumVersions()

C++ Interface: get_num_versions(DownloadDb self, const Filename name)

/**
  • Returns the number of versions stored for the indicated file.

*/

getServerFileName()

C++ Interface: get_server_file_name(DownloadDb self, str mfname, int index)

/**

*/

getServerMultifileHash()

C++ Interface: get_server_multifile_hash(DownloadDb self, str mfname)

/**
  • Return the hash value of the server file

*/

getServerMultifileName()

C++ Interface: get_server_multifile_name(DownloadDb self, int index)

/**

*/

getServerMultifilePhase()

C++ Interface: get_server_multifile_phase(DownloadDb self, str mfname)

/**

*/

getServerMultifileSize()

C++ Interface: get_server_multifile_size(DownloadDb self, str mfname)

/**

*/

getServerNumFiles()

C++ Interface: get_server_num_files(DownloadDb self, str mfname)

/**

*/

getServerNumMultifiles()

C++ Interface: get_server_num_multifiles(DownloadDb self)

/**

*/

getVersion()

C++ Interface: get_version(DownloadDb self, const Filename name, const HashVal hash)

/**
  • Returns the version number of this particular file, determined by looking

  • up the hash generated from the file. Returns -1 if the version number

  • cannot be determined.

*/

get_client_multifile_hash()

C++ Interface: get_client_multifile_hash(DownloadDb self, str mfname)

// Ask what version (told with the hash) this multifile is

/**
  • Return the hash value of the file we are working on

*/

get_client_multifile_name()

C++ Interface: get_client_multifile_name(DownloadDb self, int index)

/**

*/

get_client_multifile_phase()

C++ Interface: get_client_multifile_phase(DownloadDb self, str mfname)

/**

*/

get_client_multifile_size()

C++ Interface: get_client_multifile_size(DownloadDb self, str mfname)

/**

*/

get_client_num_multifiles()

C++ Interface: get_client_num_multifiles(DownloadDb self)

/**

*/

get_hash()

C++ Interface: get_hash(DownloadDb self, const Filename name, int version)

/**
  • Returns the MD5 hash associated with the indicated version of the indicated

  • file.

*/

get_num_versions()

C++ Interface: get_num_versions(DownloadDb self, const Filename name)

/**
  • Returns the number of versions stored for the indicated file.

*/

get_server_file_name()

C++ Interface: get_server_file_name(DownloadDb self, str mfname, int index)

/**

*/

get_server_multifile_hash()

C++ Interface: get_server_multifile_hash(DownloadDb self, str mfname)

/**
  • Return the hash value of the server file

*/

get_server_multifile_name()

C++ Interface: get_server_multifile_name(DownloadDb self, int index)

/**

*/

get_server_multifile_phase()

C++ Interface: get_server_multifile_phase(DownloadDb self, str mfname)

/**

*/

get_server_multifile_size()

C++ Interface: get_server_multifile_size(DownloadDb self, str mfname)

/**

*/

get_server_num_files()

C++ Interface: get_server_num_files(DownloadDb self, str mfname)

/**

*/

get_server_num_multifiles()

C++ Interface: get_server_num_multifiles(DownloadDb self)

/**

*/

get_version()

C++ Interface: get_version(DownloadDb self, const Filename name, const HashVal hash)

/**
  • Returns the version number of this particular file, determined by looking

  • up the hash generated from the file. Returns -1 if the version number

  • cannot be determined.

*/

hasVersion()

C++ Interface: has_version(DownloadDb self, const Filename name)

/**
  • Returns true if the indicated file has version information, false

  • otherwise. Some files recorded in the database may not bother to track

  • versions.

*/

has_version()

C++ Interface: has_version(DownloadDb self, const Filename name)

/**
  • Returns true if the indicated file has version information, false

  • otherwise. Some files recorded in the database may not bother to track

  • versions.

*/

insertNewVersion()

C++ Interface: insert_new_version(const DownloadDb self, const Filename name, const HashVal hash)

/**
  • Inserts a new version 1 copy of the file, sliding all the other versions up

  • by one.

*/

insert_new_version()

C++ Interface: insert_new_version(const DownloadDb self, const Filename name, const HashVal hash)

/**
  • Inserts a new version 1 copy of the file, sliding all the other versions up

  • by one.

*/

output()

C++ Interface: output(DownloadDb self, ostream out)

/**

*/

serverAddFile()

C++ Interface: server_add_file(const DownloadDb self, str mfname, str fname)

/**

*/

serverAddMultifile()

C++ Interface: server_add_multifile(const DownloadDb self, str mfname, float phase, int size, int status)

/**

*/

server_add_file()

C++ Interface: server_add_file(const DownloadDb self, str mfname, str fname)

/**

*/

server_add_multifile()

C++ Interface: server_add_multifile(const DownloadDb self, str mfname, float phase, int size, int status)

/**

*/

setClientMultifileComplete()

C++ Interface: set_client_multifile_complete(const DownloadDb self, str mfname)

/**

*/

setClientMultifileDecompressed()

C++ Interface: set_client_multifile_decompressed(const DownloadDb self, str mfname)

/**

*/

setClientMultifileDeltaSize()

C++ Interface: set_client_multifile_delta_size(const DownloadDb self, str mfname, int size)

/**

*/

setClientMultifileExtracted()

C++ Interface: set_client_multifile_extracted(const DownloadDb self, str mfname)

/**

*/

setClientMultifileHash()

C++ Interface: set_client_multifile_hash(const DownloadDb self, str mfname, HashVal val)

/**
  • Set the hash value of file we are working on

*/

setClientMultifileIncomplete()

C++ Interface: set_client_multifile_incomplete(const DownloadDb self, str mfname)

/**

*/

setClientMultifileSize()

C++ Interface: set_client_multifile_size(const DownloadDb self, str mfname, int size)

/**

*/

setNumVersions()

C++ Interface: set_num_versions(const DownloadDb self, const Filename name, int num_versions)

/**
  • Reduces the number of versions of a particular file stored in the ddb by

  • throwing away all versions higher than the indicated index.

*/

setServerMultifileHash()

C++ Interface: set_server_multifile_hash(const DownloadDb self, str mfname, HashVal val)

/**
  • Set the hash value of file we are working on

*/

setServerMultifileSize()

C++ Interface: set_server_multifile_size(const DownloadDb self, str mfname, int size)

/**

*/

set_client_multifile_complete()

C++ Interface: set_client_multifile_complete(const DownloadDb self, str mfname)

/**

*/

set_client_multifile_decompressed()

C++ Interface: set_client_multifile_decompressed(const DownloadDb self, str mfname)

/**

*/

set_client_multifile_delta_size()

C++ Interface: set_client_multifile_delta_size(const DownloadDb self, str mfname, int size)

/**

*/

set_client_multifile_extracted()

C++ Interface: set_client_multifile_extracted(const DownloadDb self, str mfname)

/**

*/

set_client_multifile_hash()

C++ Interface: set_client_multifile_hash(const DownloadDb self, str mfname, HashVal val)

/**
  • Set the hash value of file we are working on

*/

set_client_multifile_incomplete()

C++ Interface: set_client_multifile_incomplete(const DownloadDb self, str mfname)

/**

*/

set_client_multifile_size()

C++ Interface: set_client_multifile_size(const DownloadDb self, str mfname, int size)

/**

*/

set_num_versions()

C++ Interface: set_num_versions(const DownloadDb self, const Filename name, int num_versions)

/**
  • Reduces the number of versions of a particular file stored in the ddb by

  • throwing away all versions higher than the indicated index.

*/

set_server_multifile_hash()

C++ Interface: set_server_multifile_hash(const DownloadDb self, str mfname, HashVal val)

/**
  • Set the hash value of file we are working on

*/

set_server_multifile_size()

C++ Interface: set_server_multifile_size(const DownloadDb self, str mfname, int size)

/**

*/

write()

C++ Interface: write(DownloadDb self, ostream out)

/**

*/

writeClientDb()

C++ Interface: write_client_db(const DownloadDb self, Filename file)

// Write a database file

/**

*/

writeServerDb()

C++ Interface: write_server_db(const DownloadDb self, Filename file)

/**

*/

writeVersionMap()

C++ Interface: write_version_map(DownloadDb self, ostream out)

/**

*/

/**

*/

write_client_db()

C++ Interface: write_client_db(const DownloadDb self, Filename file)

// Write a database file

/**

*/

write_server_db()

C++ Interface: write_server_db(const DownloadDb self, Filename file)

/**

*/

write_version_map()

C++ Interface: write_version_map(DownloadDb self, ostream out)

/**

*/

/**

*/