Logo Search packages:      
Sourcecode: kmess version File versions

P2PFragmentTracker Class Reference

#include <p2pfragmenttracker.h>

List of all members.

Detailed Description

Utility class to track completed ranges of a transferred file.

Diederik van der Boor

Definition at line 31 of file p2pfragmenttracker.h.

Public Member Functions

QString getDebugMap () const
 Return a string with the various received parts.
quint32 getMessageID () const
 Return the identifier of the tracked message.
quint32 getTransferredBytes () const
 Return the number of bytes transferred.
void initialize (quint32 messageID, quint32 totalSize)
 Initialize the tracker with a new message.
bool isComplete () const
 Return whether the fragment tracker is complete.
bool isEmpty () const
 Return whether the tracker is empty, no data added yet.
bool isInitialized (quint32 messageID) const
 Return whether the tracker is initialized to receive a part for the given message ID.
 P2PFragmentTracker ()
void registerFragment (quint32 offset, quint32 size)
 // Register the arrival of a new fragment, updates the counters.
virtual ~P2PFragmentTracker ()

Private Attributes

quint32 messageID_
 The identifier of the message being transferred.
QList< Range * > ranges_
 The list of transferred ranges.
quint32 totalSize_
 The total size of the message.
quint32 transferredBytes_
 The total number of bytes transferred.


struct  Range

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

Generated by  Doxygen 1.6.0   Back to index