Panda3D

downloadDb.I

00001 // Filename: downloadDb.I
00002 // Created by:  shochet (08Sep00)
00003 //
00004 ////////////////////////////////////////////////////////////////////
00005 //
00006 // PANDA 3D SOFTWARE
00007 // Copyright (c) Carnegie Mellon University.  All rights reserved.
00008 //
00009 // All use of this software is subject to the terms of the revised BSD
00010 // license.  You should have received a copy of this license along
00011 // with this source code in a file named "LICENSE."
00012 //
00013 ////////////////////////////////////////////////////////////////////
00014 
00015 
00016 ////////////////////////////////////////////////////////////////////
00017 //     Function: DownloadDb::
00018 //       Access: Public
00019 //  Description:
00020 ////////////////////////////////////////////////////////////////////
00021 INLINE int DownloadDb::
00022 get_client_num_multifiles() const {
00023   return _client_db.get_num_multifiles();
00024 }
00025 
00026 ////////////////////////////////////////////////////////////////////
00027 //     Function: DownloadDb::
00028 //       Access: Public
00029 //  Description:
00030 ////////////////////////////////////////////////////////////////////
00031 INLINE int DownloadDb::
00032 get_server_num_multifiles() const {
00033   return _server_db.get_num_multifiles();
00034 }
00035 
00036 ////////////////////////////////////////////////////////////////////
00037 //     Function: DownloadDb::
00038 //       Access: Public
00039 //  Description:
00040 ////////////////////////////////////////////////////////////////////
00041 INLINE string DownloadDb::
00042 get_client_multifile_name(int index) const {
00043   return _client_db.get_multifile_name(index);
00044 }
00045 
00046 ////////////////////////////////////////////////////////////////////
00047 //     Function: DownloadDb::
00048 //       Access: Public
00049 //  Description:
00050 ////////////////////////////////////////////////////////////////////
00051 INLINE string DownloadDb::
00052 get_server_multifile_name(int index) const {
00053   return _server_db.get_multifile_name(index);
00054 }
00055 
00056 
00057 ////////////////////////////////////////////////////////////////////
00058 //     Function: DownloadDb::
00059 //       Access: Public
00060 //  Description:
00061 ////////////////////////////////////////////////////////////////////
00062 INLINE Phase DownloadDb::
00063 get_client_multifile_phase(string mfname) const {
00064   return (_client_db.get_multifile_record_named(mfname))->_phase;
00065 }
00066 
00067 ////////////////////////////////////////////////////////////////////
00068 //     Function: DownloadDb::
00069 //       Access: Public
00070 //  Description:
00071 ////////////////////////////////////////////////////////////////////
00072 INLINE Phase DownloadDb::
00073 get_server_multifile_phase(string mfname) const {
00074   return (_server_db.get_multifile_record_named(mfname))->_phase;
00075 }
00076 
00077 
00078 
00079 ////////////////////////////////////////////////////////////////////
00080 //     Function: DownloadDb::
00081 //       Access: Public
00082 //  Description:
00083 ////////////////////////////////////////////////////////////////////
00084 INLINE int DownloadDb::
00085 get_client_multifile_size(string mfname) const {
00086   return (_client_db.get_multifile_record_named(mfname))->_size;
00087 }
00088 
00089 ////////////////////////////////////////////////////////////////////
00090 //     Function: DownloadDb::
00091 //       Access: Public
00092 //  Description:
00093 ////////////////////////////////////////////////////////////////////
00094 INLINE void DownloadDb::
00095 set_client_multifile_size(string mfname, int size) {
00096   (_client_db.get_multifile_record_named(mfname))->_size = size;
00097   write_client_db(_client_db._filename);
00098 }
00099 
00100 
00101 ////////////////////////////////////////////////////////////////////
00102 //     Function: DownloadDb::
00103 //       Access: Public
00104 //  Description:
00105 ////////////////////////////////////////////////////////////////////
00106 INLINE int DownloadDb::
00107 set_client_multifile_delta_size(string mfname, int size) {
00108   (_client_db.get_multifile_record_named(mfname))->_size += size;
00109   write_client_db(_client_db._filename);
00110   // Return the new total
00111   return (_client_db.get_multifile_record_named(mfname))->_size;
00112 }
00113 
00114 
00115 
00116 ////////////////////////////////////////////////////////////////////
00117 //     Function: DownloadDb::
00118 //       Access: Public
00119 //  Description:
00120 ////////////////////////////////////////////////////////////////////
00121 INLINE int DownloadDb::
00122 get_server_multifile_size(string mfname) const {
00123   return (_server_db.get_multifile_record_named(mfname))->_size;
00124 }
00125 
00126 
00127 ////////////////////////////////////////////////////////////////////
00128 //     Function: DownloadDb::
00129 //       Access: Public
00130 //  Description:
00131 ////////////////////////////////////////////////////////////////////
00132 INLINE void DownloadDb::
00133 set_server_multifile_size(string mfname, int size) {
00134   (_server_db.get_multifile_record_named(mfname))->_size = size;
00135 }
00136 
00137 
00138 ////////////////////////////////////////////////////////////////////
00139 //     Function: DownloadDb::
00140 //       Access: Public
00141 //  Description:
00142 ////////////////////////////////////////////////////////////////////
00143 INLINE void DownloadDb::
00144 set_client_multifile_incomplete(string mfname) {
00145   (_client_db.get_multifile_record_named(mfname))->_status = Status_incomplete;
00146   write_client_db(_client_db._filename);
00147 }
00148 
00149 ////////////////////////////////////////////////////////////////////
00150 //     Function: DownloadDb::
00151 //       Access: Public
00152 //  Description:
00153 ////////////////////////////////////////////////////////////////////
00154 INLINE void DownloadDb::
00155 set_client_multifile_complete(string mfname) {
00156   (_client_db.get_multifile_record_named(mfname))->_status = Status_complete;
00157   write_client_db(_client_db._filename);
00158 }
00159 
00160 ////////////////////////////////////////////////////////////////////
00161 //     Function: DownloadDb::
00162 //       Access: Public
00163 //  Description:
00164 ////////////////////////////////////////////////////////////////////
00165 INLINE void DownloadDb::
00166 set_client_multifile_decompressed(string mfname) {
00167   (_client_db.get_multifile_record_named(mfname))->_status = Status_decompressed;
00168   write_client_db(_client_db._filename);
00169 }
00170 
00171 ////////////////////////////////////////////////////////////////////
00172 //     Function: DownloadDb::
00173 //       Access: Public
00174 //  Description:
00175 ////////////////////////////////////////////////////////////////////
00176 INLINE void DownloadDb::
00177 set_client_multifile_extracted(string mfname) {
00178   (_client_db.get_multifile_record_named(mfname))->_status = Status_extracted;
00179   write_client_db(_client_db._filename);
00180 }
00181 
00182 ////////////////////////////////////////////////////////////////////
00183 //     Function: DownloadDb::
00184 //       Access: Public
00185 //  Description:
00186 ////////////////////////////////////////////////////////////////////
00187 INLINE int DownloadDb::
00188 get_server_num_files(string mfname) const {
00189   return (_server_db.get_multifile_record_named(mfname))->get_num_files();
00190 }
00191 
00192 ////////////////////////////////////////////////////////////////////
00193 //     Function: DownloadDb::
00194 //       Access: Public
00195 //  Description:
00196 ////////////////////////////////////////////////////////////////////
00197 INLINE string DownloadDb::
00198 get_server_file_name(string mfname, int index) const {
00199   return (_server_db.get_multifile_record_named(mfname))->get_file_name(index);
00200 }
 All Classes Functions Variables Enumerations