Vegastrike 0.5.1 rc1  1.0
Original sources for Vegastrike Evolved
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
VsnetDownload::Client::NotifyMe Class Reference

#include <vsnet_notify.h>

Inheritance diagram for VsnetDownload::Client::NotifyMe:
VsnetDownload::Client::Notify VsnetDownload::Client::TestItem

Public Member Functions

 NotifyMe ()
 
virtual ~NotifyMe ()
 
virtual void notify (State s, VSError e)
 
virtual void setTotalBytes (int sz)
 
virtual void addBytes (int sz)
 
bool done () const
 
bool ok () const
 
int total () const
 
int offset () const
 

Detailed Description

Definition at line 132 of file vsnet_notify.h.

Constructor & Destructor Documentation

VsnetDownload::Client::NotifyMe::NotifyMe ( )

Definition at line 18 of file vsnet_notify.cpp.

18  :
19  _state( Idle )
20  , _error( Ok )
21  , _total( 0 )
22  , _offset( 0 )
23 {}
virtual VsnetDownload::Client::NotifyMe::~NotifyMe ( )
inlinevirtual

Definition at line 135 of file vsnet_notify.h.

135 {}

Member Function Documentation

void VsnetDownload::Client::NotifyMe::addBytes ( int  sz)
virtual

Reimplemented from VsnetDownload::Client::Notify.

Definition at line 36 of file vsnet_notify.cpp.

37 {
38  _offset += sz;
39 }
bool VsnetDownload::Client::NotifyMe::done ( ) const
inline

Definition at line 141 of file vsnet_notify.h.

References VsnetDownload::Client::Completed.

Referenced by VsnetDownload::Client::NoteFile::done(), and VsnetDownload::Client::Buffer::done().

142  {
143  return _state == Completed;
144  }
void VsnetDownload::Client::NotifyMe::notify ( State  s,
VSError  e 
)
virtual

Implements VsnetDownload::Client::Notify.

Definition at line 25 of file vsnet_notify.cpp.

26 {
27  _state = s;
28  _error = e;
29 }
int VsnetDownload::Client::NotifyMe::offset ( ) const
inline

Definition at line 156 of file vsnet_notify.h.

Referenced by VsnetDownload::Client::NoteFile::offset(), and VsnetDownload::Client::Buffer::offset().

157  {
158  return _offset;
159  }
bool VsnetDownload::Client::NotifyMe::ok ( ) const
inline

Definition at line 146 of file vsnet_notify.h.

References VSFileSystem::Ok.

Referenced by VsnetDownload::Client::NoteFile::ok(), and VsnetDownload::Client::Buffer::ok().

147  {
148  return _error == Ok;
149  }
void VsnetDownload::Client::NotifyMe::setTotalBytes ( int  sz)
virtual

Reimplemented from VsnetDownload::Client::Notify.

Definition at line 31 of file vsnet_notify.cpp.

32 {
33  _total = sz;
34 }
int VsnetDownload::Client::NotifyMe::total ( ) const
inline

Definition at line 151 of file vsnet_notify.h.

Referenced by VsnetDownload::Client::NoteFile::total(), and VsnetDownload::Client::Buffer::total().

152  {
153  return _total;
154  }

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