Classified ads
|
Logic for handling tasks received from other peers or from user. More...
#include <netrequestexecutor.h>
Classes | |
struct | NetworkRequestQueueItem |
Work queue item. More... | |
Public Types | |
enum | NetworkRequestState { NewRequest, Processing, NodeIsInWishList, RequestBeingSentAround, ReadyToSend } |
Public Slots | |
void | run () |
void | nodeConnectionAttemptStatus (Connection::ConnectionState aStatus, const Hash aHashOfAttemptedNode) |
Public Member Functions | |
NetworkRequestExecutor (MController *aController, Model &aModel) | |
~NetworkRequestExecutor () | |
Private Attributes | |
MController * | iController |
Model & | iModel |
bool | iNowRunning |
time_t | iLastTimeOfNodeConnectedNodeStatusUpdate |
Logic for handling tasks received from other peers or from user.
Here is class that takes requests sent (or generated locally) from queue, obtains data needed and puts results into send-queues of nodes that need to see the results.
requests may be new, being processed, or ready to be sent, have enum indicating the state
Enumerator | |
---|---|
NewRequest | NetworkRequestExecutor has not yet touched |
Processing | is working in this very moment |
NodeIsInWishList | node connection in progress |
RequestBeingSentAround | request is sent to nodes around hash |
ReadyToSend | request completed but not sent |
NetworkRequestExecutor::NetworkRequestExecutor | ( | MController * | aController, |
Model & | aModel | ||
) |
constructor
NetworkRequestExecutor::~NetworkRequestExecutor | ( | ) |
|
private |
method for actually sending the bytes to peer
aEntry | is the request to send |
aNodeToSend | is fingerprint of the node where to send ; if KNullHash then aEntry.iDestinationNode is used. If aNodeSend is not connected at the moment, request is simply ignored. |
|
slot |
when connection is attempted, NetworkListener will emit the status (failed or success) of the connection, emitted signal is connected here
|
private |
method for producing reply to request concerning a classified ad classification -> e.g. this method sends an listing of ads to remote node, the classification of the ads match hash given in entry
|
private |
method for producing reply to request concerning a binary blob -> e.g. this method sends a binary blob
|
private |
method for producing reply to request concerning a classified ad -> e.g. this method sends an ad to remote node
|
private |
method for sending one or more node references to given node
|
private |
method for producing reply to request concerning a private msg -> e.g. this method sends a private message
|
private |
method for producing send queue items for every private message that the requesting profile has in queue.
|
private |
method for requesting retrieval of a binary file
|
private |
method for requesting retrieval of a binary file
|
private |
method for publishing a profile+ad+binary file+profile comment + db record
|
private |
method for sending nodegreeting around given hash. user initiates this and this sends around queries about nodes around given hash. the nodes that are sent the query are already-connected nodes
|
private |
method for publishing a private message
|
private |
method for requesting update of profile data and comments
|
private |
method for requesting retrieval of a operator profile. so this means that some neighboring node sent us a request regarding a particular profile and this method then finds it from our local data store, or does not.
|
private |
method for requesting retrieval of a comment of operator profile. this is called in situation where user wants to locally view a comment and it is not in local storage so we need to ask other nodes to send it to us.
|
private |
method for producing reply to request concerning a user profile -> e.g. this method sends a profile to remote node
|
private |
method for producing bytearray to send to other node containing single profile comment
|
private |
method for producing reply to request concerning profile comments e.g. this method sends a profile comments whose commented profile matches the one given in the request
|
slot |
this class is no thread but lets try pretending..
|
private |
method for checking nodes around hash, sending request to those and if not already connected, adding those nodes to wishlist
|
private |
|
private |
|
private |
|
private |