ContentCallback Struct Reference

Callbacks for notifying others about incoming data. More...

#include <network_content.h>

Inheritance diagram for ContentCallback:
ClientNetworkContentSocketHandler ConsoleContentCallback NetworkContentDownloadStatusWindow NetworkContentListWindow

Public Member Functions

virtual void OnConnect (bool success)
 Callback for when the connection has finished.
virtual void OnDisconnect ()
 Callback for when the connection got disconnected.
virtual void OnReceiveContentInfo (const ContentInfo *ci)
 We received a content info.
virtual void OnDownloadProgress (const ContentInfo *ci, uint bytes)
 We have progress in the download of a file.
virtual void OnDownloadComplete (ContentID cid)
 We have finished downloading a file.
virtual ~ContentCallback ()
 Silentium.

Detailed Description

Callbacks for notifying others about incoming data.

Definition at line 29 of file network_content.h.


Member Function Documentation

virtual void ContentCallback::OnConnect ( bool  success  )  [inline, virtual]

Callback for when the connection has finished.

Parameters:
success whether the connection was made or that we failed to make it

Reimplemented in ConsoleContentCallback, ClientNetworkContentSocketHandler, and NetworkContentListWindow.

Definition at line 34 of file network_content.h.

Referenced by ClientNetworkContentSocketHandler::OnConnect().

virtual void ContentCallback::OnDownloadComplete ( ContentID  cid  )  [inline, virtual]

We have finished downloading a file.

Parameters:
cid the ContentID of the downloaded file

Reimplemented in ConsoleContentCallback, ClientNetworkContentSocketHandler, and NetworkContentListWindow.

Definition at line 58 of file network_content.h.

Referenced by ClientNetworkContentSocketHandler::OnDownloadComplete().

virtual void ContentCallback::OnDownloadProgress ( const ContentInfo ci,
uint  bytes 
) [inline, 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 in ClientNetworkContentSocketHandler, and NetworkContentDownloadStatusWindow.

Definition at line 52 of file network_content.h.

Referenced by ClientNetworkContentSocketHandler::OnDownloadProgress().

virtual void ContentCallback::OnReceiveContentInfo ( const ContentInfo ci  )  [inline, virtual]

We received a content info.

Parameters:
ci the content info

Reimplemented in ClientNetworkContentSocketHandler, and NetworkContentListWindow.

Definition at line 45 of file network_content.h.

Referenced by ClientNetworkContentSocketHandler::OnReceiveContentInfo().


The documentation for this struct was generated from the following file:

Generated on Wed Mar 17 23:50:50 2010 for OpenTTD by  doxygen 1.6.1