SearchListenerBase

Abstract base interface for a client to receive the results of a query. More...

#include <unity/scopes/SearchListenerBase.h>

Inheritance diagram for unity::scopes::SearchListenerBase:
Inheritance graph
[legend]

Public Member Functions

virtual void push (Department::SCPtr const &parent)
 Called at most once by the scopes run time for a tree of departments returned by a query. More...
 
virtual void push (CategorisedResult result)=0
 Called once by the scopes run time for each result that is returned by a query().
 
virtual void push (experimental::Annotation annotation)
 Called once by the scopes run time for each annotation that is returned by a query(). More...
 
virtual void push (Category::SCPtr const &category)
 Called once by the scopes run time for each category that is returned by a query(). More...
 
virtual void push (Filters const &filters, FilterState const &filter_state)
 Called once by the scopes to send all the filters and their state. More...
 
- Public Member Functions inherited from unity::scopes::ListenerBase
virtual void finished (CompletionDetails const &details)=0
 Called once by the scopes run time after the final result for a request was sent. More...
 
virtual void info (OperationInfo const &op_info)
 Called by the scopes run time each time a scope reports additional information about the reply to a query. More...
 

Detailed Description

Abstract base interface for a client to receive the results of a query.

An instance of this interface must be passed to Scope::search(). Results for the query are delivered to the client by the scopes run time by invoking the appropriate push method.

If the implementation of a push method throws an exception, the scopes run time calls ListenerBase::finished() with an 'Error' status.

See also
ListenerBase

Member Function Documentation

virtual void unity::scopes::SearchListenerBase::push ( Department::SCPtr const &  parent)
virtual

Called at most once by the scopes run time for a tree of departments returned by a query.

The default implementation does nothing.

virtual void unity::scopes::SearchListenerBase::push ( experimental::Annotation  annotation)
virtual

Called once by the scopes run time for each annotation that is returned by a query().

The default implementation does nothing.

virtual void unity::scopes::SearchListenerBase::push ( Category::SCPtr const &  category)
virtual

Called once by the scopes run time for each category that is returned by a query().

Receipt of categories may be interleaved with the receipt of results, that is, there is no guarantee that the complete set of categories will be provided before the first query result.

The default implementation does nothing.

virtual void unity::scopes::SearchListenerBase::push ( Filters const &  filters,
FilterState const &  filter_state 
)
virtual

Called once by the scopes to send all the filters and their state.

The default implementation does nothing.