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