In file /home/eternity/Source/Eso/Finder/H/finder.h:

class Finder : public Debugable, public SixOffspring

Manager of searching and downloading

Inheritance:

Finder < Debugable

Finder < SixOffspring


Public Methods

Int Finder::AlreadySent (TID aTID, GMessage *aHeader)
Returns 0/1 if the record wasn't/was already sent
TableFieldQueue* Finder::CreateFwdTableDefinition ()
Creates definition of Finder fwd table
TableFieldQueue* Finder::CreateReplyTableDefinition ()
Creates definition of Finder reply table
Err Finder::DeleteForwardInfo (TID aTID)
Deletes forwarding information according to TID
Err Finder::DeleteRecordsByExpiration (ESTime currentTime)
Deletes records in tables according to expiration
Finder::Finder (LogFile *aLogFile, Eso *eso)
Finder constructor
Err Finder::GetForwardInfo (TID aTID, GMessage **anAC, TID *replyToTID)
Gets info about where to forward
Err Finder::SaveForwardInfo (TID aTID, GMessage *inMsg, const Int depth)
Saves info about where to forward the reply
Err Finder::SaveReplyInfo (TID aTID, GMessage *aHeader, const Int depth)
Saves info about what was forwarded
Finder::~Finder ()
Finder destructor

Public

methods
Finder (LogFile *aLogFile, Eso *eso)
Constructor.
~Finder ()
Destructor.
Err SaveForwardInfo (const TID aTID, GMessage *inMsg, const Int depth)
Save info about client.
Err SaveReplyInfo (const TID aTID, GMessage *aHeader, const Int depth)
Save info about sent file.
Err GetForwardInfo (const TID inReplyToTID, GMessage **anAC, TID *replyToTID)
Get forward info.
Int AlreadySent (const TID aTID, GMessage *aHeader)
Return 0/1 if such a record isn't/is in replyTable.
Err DeleteForwardInfo (TID aTID)
Delete fwd info according a TID.
Err DeleteRecordsByExpiration (ESTime currentTime)
Delete records with by expiration.

Protected

attributes
Table* fwdTable
Tables for forwarding transactions.
TableFieldQueue* CreateFwdTableDefinition ()
Method that creates fwdTable description.
TableFieldQueue* CreateReplyTableDefinition ()
Method that creates replyTable description.

Inherited from Debugable:

Public Methods

string* Debugable::CreateString(char *firstStr, int firstInt, int secondInt)
Debugable::Debugable(LogFile * debugLogFile)
int Debugable::SetDebugOptions(int newLogOptions)
void Debugable::SetLogFile(LogFile *aLogFile)
void Debugable::WriteString(LogLevel debugLevel, char * format, ...)
Debugable::~Debugable()

Public

attributes

int debugOptions
What messages should be logged
LogFile* logFile
Log file for debug messages

methods

virtual int SetDebugOptions(int newLogOptions)
Change what is debugged
virtual void WriteString(LogLevel debugLevel, char * format, ...)
Write message to log file
void SetLogFile(LogFile *aLogFile)
Change log file
Debugable(LogFile * debugLogFile = NULL)
constructor
virtual ~Debugable()
destructor
string* CreateString(char *firstStr, int firstInt, int secondInt)
Helper method

Inherited from SixOffspring:

Public Methods

SixOffspring::SixOffspring(Six * aSix)

Documentation

Manager of searching and downloading. Encapsulates the TransactionForwardTable and makes easier the operations associated with forwarding found files and headers.
attributes

Table* fwdTable
Tables for forwarding transactions.

TableFieldQueue* CreateFwdTableDefinition()
Method that creates fwdTable description.

TableFieldQueue* CreateReplyTableDefinition()
Method that creates replyTable description.

methods

Finder(LogFile *aLogFile, Eso *eso)
Constructor.

~Finder()
Destructor.

Err SaveForwardInfo(const TID aTID, GMessage *inMsg, const Int depth)
Save info about client.

Err SaveReplyInfo(const TID aTID, GMessage *aHeader, const Int depth)
Save info about sent file.

Err GetForwardInfo(const TID inReplyToTID, GMessage **anAC, TID *replyToTID)
Get forward info.

Int AlreadySent(const TID aTID, GMessage *aHeader)
Return 0/1 if such a record isn't/is in replyTable.

Err DeleteForwardInfo(TID aTID)
Delete fwd info according a TID.

Err DeleteRecordsByExpiration(ESTime currentTime)
Delete records with by expiration.

Int Finder::AlreadySent(TID aTID, GMessage *aHeader)
Returns 0/1 if the record wasn't/was already sent. Looks in the fwd table for the tuple [aTID, aHeader]. Returns 1/0 if found/found not.
Returns:
boolean value
Parameters:
aTID - transaction ID
aHeader -
Author:
Marek
See Also:

TableFieldQueue* Finder::CreateFwdTableDefinition()
Creates definition of Finder fwd table. Creates definition for fwd Table by putting all needed TableFields in it. Fwd table includes reply-to info [Reply-To-AC and Reply-To-TID] of requestor, TID of this Eso and time, when this information expires.
Returns:
TableFieldQueue *
Parameters:
void -
Author:
Marek
See Also:
TableFieldQueue, TableField

TableFieldQueue* Finder::CreateReplyTableDefinition()
Creates definition of Finder reply table. Creates definition for replyTable by putting all needed TableFields in it. Reply table includes the FFID together with ID of transaction, in which it was sent to requestor and time, in which this info can be deleted.
Returns:
TableFieldQueue *
Parameters:
void -
Author:
Marek
See Also:
TableFieldQueue, TableField

Err Finder::DeleteForwardInfo(TID aTID)
Deletes forwarding information according to TID. Finds the record in the fwd table and deletes it.
Returns:
error code
Parameters:
aTID - transaction ID
Author:
Marek
See Also:

Err Finder::DeleteRecordsByExpiration(ESTime currentTime)
Deletes records in tables according to expiration.
Looks in both tables for records with expiration 


Returns:
error code
Parameters:
currentTime -
Author:
Marek
See Also:

Finder::Finder(LogFile *aLogFile, Eso *eso)
Finder constructor. Creates fwd and reply Tables
Parameters:
aLogFile - Log file.
eso - Pointer to Eso object.
Author:
Marek
See Also:
Table, CreateFwdTableDefinition(), CreateReplyTableDefinition(), Six

Err Finder::GetForwardInfo(TID aTID, GMessage **anAC, TID *replyToTID)
Gets info about where to forward. According to TID gets the Reply-To-AC and Reply-To-TID.
Returns:
error code
Parameters:
aTID - transaction ID
anAC - AC got from fwd table
replyToTID - Reply-To-TID got from fwd Table
Author:
Marek
See Also:

Err Finder::SaveForwardInfo(TID aTID, GMessage *inMsg, const Int depth)
Saves info about where to forward the reply. Gets Reply-to-AC and Reply-to-TID fields from inMsg and saves them together with aTID and default search Time multiplied by depth of search..
Returns:
error code
Parameters:
aTID - transaction ID
inMsg - message storing the information
depth - depth of search
Author:
Marek
See Also:

Err Finder::SaveReplyInfo(TID aTID, GMessage *aHeader, const Int depth)
Saves info about what was forwarded. Gets the FFID from header and saves it together with ID of transaction and default expiration time multiplied by depth of search.
Returns:
error code
Parameters:
aTID - transaction ID
aHeader - a GMessage storing the header
depth - of search
Author:
Marek
See Also:

Finder::~Finder()
Finder destructor. Destroyes tables
Author:
Marek
See Also:


This class has no child classes.

alphabetic index hierarchy of classes


generated by doc++