Public Member Functions | Protected Attributes

# BaseNetworkContentDownloadStatusWindow Class Reference

Base window for showing the download status of content. More...

`#include <network_content_gui.h>`

Inheritance diagram for BaseNetworkContentDownloadStatusWindow:

## Public Member Functions
| BaseNetworkContentDownloadStatusWindow (WindowDesc *desc)
| Create the window with the given description.
| ~BaseNetworkContentDownloadStatusWindow ()
| Free everything associated with this window.
virtual void | DrawWidget (const Rect &r, int widget) const
virtual void | OnDownloadProgress (const ContentInfo *ci, int bytes)
| We have progress in the download of a file.
## Protected Attributes
uint | total_bytes
| Number of bytes to download.
uint | downloaded_bytes
| Number of bytes downloaded.
uint | total_files
| Number of files to download.
uint | downloaded_files
| Number of files downloaded.
uint32 | cur_id
| The current ID of the downloaded file.
char | name [48]
| The current name of the downloaded file.

## Detailed Description

Base window for showing the download status of content.

Definition at line 20 of file network_content_gui.h.

## Constructor & Destructor Documentation

BaseNetworkContentDownloadStatusWindow::BaseNetworkContentDownloadStatusWindow | ( | WindowDesc * | desc | ) |

Create the window with the given description.

Parameters:

  | desc | The description of the window.

Definition at line 101 of file network_content_gui.cpp.

References _network_content_client, ClientNetworkContentSocketHandler::AddCallback(), ClientNetworkContentSocketHandler::DownloadSelectedContent(), Window::InitNested(), total_bytes, total_files, and WN_NETWORK_STATUS_WINDOW_CONTENT_DOWNLOAD.

## Member Function Documentation

void BaseNetworkContentDownloadStatusWindow::OnDownloadProgress | ( | const ContentInfo * | ci,
|  | int | bytes |
| ) |  |  | `[virtual]`

We have progress in the download of a file.

Parameters:

  | ci | the content info of the file
  | bytes | the number of bytes downloaded since the previous call

Reimplemented from ContentCallback.

Reimplemented in NetworkContentDownloadStatusWindow.

Definition at line 144 of file network_content_gui.cpp.

References cur_id, downloaded_bytes, downloaded_files, ContentInfo::filename, ContentInfo::id, lastof, name, Window::SetDirty(), and strecpy().

The documentation for this class was generated from the following files:

- src/network/network_content_gui.h
- src/network/network_content_gui.cpp