| 280 | void FileServerST::CancelRequest(const char* name, int from, int to) {} |
| 281 | |
| 282 | void FileServerST::Update() |
| 283 | { |
| 284 | // check if current operation is terminated |
| 285 | // if it is, process next request |
| 286 | while (_queue.Size() > 0) |
| 287 | { |
| 288 | // get heap head |
| 289 | // check if operation already started |
| 290 | FileRequest& head = _queue[0]; |
| 291 | if (!head._filebuf) |
| 292 | { |
| 293 | QFBank* bank = QIFStreamB::AutoBank(head._filename); |
| 294 | if (bank) |
| 295 | { |
| 296 | const char* name = head._filename; |
| 297 | name += bank->GetPrefix().GetLength(); |
| 298 | head._filebuf = bank->ReadOverlapped(name); |
| 299 | } |
| 300 | else |
| 301 | { |
| 302 | QIFStreamB temp; |
| 303 | temp.AutoOpen(head._filename); |
| 304 | head._filebuf = head._in.GetBuffer(); |
| 305 | } |
| 306 | } |
| 307 | // check if operation terminated |
| 308 | if (!head._filebuf->IsReady()) |
| 309 | { |
| 310 | break; |
| 311 | } |
| 312 | FileRequest req; |
| 313 | _queue.HeapRemoveFirst(req); |
| 314 | req._in.OpenBuffer(head._filebuf); |
| 315 | _done.Add(req); |
| 316 | } |
| 317 | } |
| 318 | |
| 319 | void FileServerST::Open(QIFStream& stream, const char* name) |
| 320 | { |
no test coverage detected