LeechCraft Azoth  0.6.70-15082-g543737046d
Modular multiprotocol IM plugin for LeechCraft
LC::Azoth::ISearchSession Class Referenceabstract

Interface for search sessions. More...

#include "ihavesearch.h"

Public Member Functions

virtual ~ISearchSession ()
 
virtual void RestartSearch (QString server)=0
 Sets the search server used and restarts the search. More...
 
virtual QAbstractItemModel * GetRepresentationModel () const =0
 Returns the model with the results. More...
 

Detailed Description

Interface for search sessions.

This interface is expected to be implemented by the objects returned from IHaveSearch::CreateSearchSession() representing search sessions.

The search server string is the via the RestartSearch() method, which also should automatically restart the search and fetch any search form, for example.

The model representing service discovery results is obtained via GetRepresentationModel() method.

See also
IHaveServiceDiscovery

Definition at line 36 of file ihavesearch.h.

Constructor & Destructor Documentation

◆ ~ISearchSession()

virtual LC::Azoth::ISearchSession::~ISearchSession ( )
inlinevirtual

Definition at line 39 of file ihavesearch.h.

Member Function Documentation

◆ GetRepresentationModel()

virtual QAbstractItemModel* LC::Azoth::ISearchSession::GetRepresentationModel ( ) const
pure virtual

Returns the model with the results.

This function should return the model containing the search results. The returned model should be the same object for each call to this function during the lifetime of this object.

Returns
Model with the results.

◆ RestartSearch()

virtual void LC::Azoth::ISearchSession::RestartSearch ( QString  server)
pure virtual

Sets the search server used and restarts the search.

This function should initiate searching on the given server, if applicable, or "in general", if search server concept is not applicable to this protocol/account.

This function should initiate fetching the corresponding search form and, when it's fetched (asynchronously, of course), show it to the user, and then, after user's input, perform the search itself.

The representation model (see GetRepresentationModel()) should be filled with the search results, if any.

Parameters
[in]serverThe search server which should be used for search.

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