MCPcopy Create free account
hub / github.com/BohemiaInteractive/CWR / StartDownloadingLogo

Method StartDownloadingLogo

engine/Poseidon/Network/NetworkMisc.cpp:355–379  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

353 _squadContext.size = &_squadXMLSize;
354 _squadContext.event = &_stateDone;
355 _squadContext.proxy = _proxy.GetLength() > 0 ? (const char*)_proxy : nullptr;
356 _squadContext.maxSize = Poseidon::NetworkSquadFileMaxSize;
357 _squadContext.result.Free();
358 _squadContext.done.store(false, std::memory_order_release);
359 DownloadToMemOverlapped(&_squadContext);
360}
361
362void CheckSquadObject::EndDownloadingXMLSource()
363{
364 _squadXMLData = _squadContext.result;
365}
366
367void CheckSquadObject::StartDownloadingLogo()
368{
369 // process XML results
370 ProcessXML();
371
372 if (_logoUrl.GetLength() > 0 && _logoFile.GetLength() > 0)
373 {
374 _state = DownloadingLogo;
375 _stateDone.Reset();
376 // start downloading logo - if necessary
377 // note: _logoUrl is RString, but is passed as const char *
378 // which is MT safe
379 _logoContext.file = _logoFile;
380 _logoContext.url = _logoUrl;
381 _logoContext.event = &_stateDone;
382 _logoContext.proxy = _proxy.GetLength() > 0 ? (const char*)_proxy : nullptr;

Callers

nothing calls this directly

Calls 3

DownloadToFileOverlappedFunction · 0.85
GetLengthMethod · 0.45
ResetMethod · 0.45

Tested by

no test coverage detected