Classified ads
|
Network-connection logic relating content publish demands. More...
#include <publishingengine.h>
Public Slots | |
void | nodeConnectionAttemptStatus (Connection::ConnectionState aStatus, const Hash aHashOfAttemptedNode) |
void | run () |
Signals | |
void | error (QTcpSocket::SocketError socketError) |
Public Member Functions | |
PublishingEngine (Controller *aController, Model &aModel) | |
~PublishingEngine () | |
Public Attributes | |
bool | iNeedsToRun |
Private Types | |
enum | StageOfPublish { InitialStage, AwaitingConnection } |
Private Member Functions | |
void | emptyNodeCandidateList () |
void | askConnectionsForNodesOnPublishList () |
void | sendPublishItemToAlreadyConnectedNodes () |
void | publishToNode (const Hash &aNode) |
void | checkForSuccessfullyConnectedNodes () |
void | checkForUnSuccessfullyConnectedNodes () |
Private Attributes | |
Controller * | iController |
Model & | iModel |
PublishItem | iWorkItem |
QList< Node * > | iNodeCandidatesToTryPush |
QList< Hash > | iNodesSuccessfullyConnected |
QList< Hash > | iNodesFailurefullyConnected |
StageOfPublish | iStageOfPublish |
bool | iNowRunning |
Network-connection logic relating content publish demands.
Class that will ask for connections to nodes destined to be holders of stuff published in this node. Once connection is established, stuff to be published is copied into send-queue of the newly-connected node.
|
private |
PublishingEngine::PublishingEngine | ( | Controller * | aController, |
Model & | aModel | ||
) |
Constructor
aController | application controller. not owned |
aModel | persistent storage. |
PublishingEngine::~PublishingEngine | ( | ) |
Destructor
|
private |
|
private |
|
private |
|
private |
|
signal |
|
slot |
when connection is attempted, NetworkListener will emit the status (failed or success) of the connection, emitted signal is connected here
|
private |
|
slot |
this class is a not a thread, but QTimer, thus run.
|
private |
|
private |
application controller
|
private |
persistent storage
bool PublishingEngine::iNeedsToRun |
when this is set to false, thread will terminate and run() return
|
private |
list of nodes where iWorkItem might be pushed to
|
private |
|
private |
|
private |
|
private |
|
private |
what we're trying to publish