#include <nqueue.h>
Public Member Functions | |
NQueueHost (QListView *parent, int hostId, NHostInfo hostInfo) | |
Creates a new toplevel entry in the list view for the given hostInfo. | |
virtual | ~NQueueHost () |
Destroys the host entry, but does not properly update NQueue's data structures. | |
void | dieNow () |
Destroys the host entry, and properly cleans up NQueue's data structures. | |
virtual QString | text (int c) const |
Return a serialized value for the content of column c. | |
virtual const QPixmap * | pixmap (int c) const |
Returns 0. | |
virtual int | rtti () const |
Returns 2301, the arbitrary rtti chosen for this QListViewItem type. | |
const int | id () const |
Returns the id of this host entry. | |
const NHostInfo | hostInfo () const |
Returns the host information for this host. | |
const bool | isDone () const |
Boolean affirmation that the host is done. | |
const bool | inUse () const |
Boolean affirmation that the host is in use. | |
const bool | failed () const |
Boolean affirmation that the host has failed. | |
const int | numCurrentConns () const |
Returns the number of connections open to this host. | |
void | setInUse (bool s=true) |
Marks the host as in use if s is true. | |
void | setDone (bool s=true) |
Marks the host as done and not in use if s is true. | |
void | setFailed (bool s=true) |
Marks the host as failed if s is true. | |
void | incCurrentConns () |
Increases the number of connections opened to this host. | |
void | decCurrentConns () |
Decreases the number of connections opened to this host. | |
void | setXferStats (uint size, int time, double rate) |
Set the total transfer statistics for the host. | |
void | reset () |
Reset any failed status of the host entry and all children. | |
void | childDone (bool removed=false) |
A child entry was marked done, decrease the remaining children count. | |
void | addChild () |
Add statistics for new child. | |
void | childReset () |
Forces a statistics regeneration. | |
void | killChildren (int prune=0) |
Summarily destroy any children that fit the desired kill parameters. |
One NQueueHost item will exist per prot://user:pass@host:port combination in the Queue.
|
Creates a new toplevel entry in the list view for the given hostInfo.
|
|
Destroys the host entry, but does not properly update NQueue's data structures. Use dieNow() rather than delete where possible. |
|
Add statistics for new child. Automatically sets the done flag to false. |
|
A child entry was marked done, decrease the remaining children count. If removed is true, update the childTotal as well. If the remaining children count is reduced to zero, perform setDone(). |
|
Forces a statistics regeneration.
Called when a child at any depth was reset. |
|
Decreases the number of connections opened to this host. If this drops the current connections to zero, and our child count is zero, call setDone(). |
|
Destroys the host entry, and properly cleans up NQueue's data structures. Use this rather than delete where possible. |
|
Boolean affirmation that the host has failed. Failure occurs when a child entry fails to transfer successfully. |
|
Returns the host information for this host.
|
|
Returns the id of this host entry.
|
|
Increases the number of connections opened to this host. If none were previously open, mark this host as now in use. |
|
Boolean affirmation that the host is in use. In use simply means that the host has a connection open, which may or may not also imply that a child entry is transferring. |
|
Boolean affirmation that the host is done. Done in this case, implies that there are no children waiting for transfer and no open connections to this host. |
|
Summarily destroy any children that fit the desired kill parameters.
If prune is 1, the child must be Done and Not Failed. |
|
Returns the number of connections open to this host.
|
|
Returns 0.
|
|
Reset any failed status of the host entry and all children.
|
|
Returns 2301, the arbitrary rtti chosen for this QListViewItem type.
|
|
Marks the host as done and not in use if s is true. If s is false, setFailed() is called. |
|
Marks the host as failed if s is true.
|
|
Marks the host as in use if s is true.
|
|
Set the total transfer statistics for the host.
|
|
Return a serialized value for the content of column c.
|