PreviewReply

Allows the results of a preview to be sent to the preview requester. More...

#include <unity/scopes/PreviewReply.h>

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

Public Member Functions

virtual bool register_layout (ColumnLayoutList const &layouts)=0
 Registers a list of column layouts for the current preview. More...
 
virtual bool push (PreviewWidgetList const &widget_list)=0
 Sends widget definitions to the sender of the preview query. More...
 
virtual bool push (std::string const &key, Variant const &value)=0
 Sends data for a preview widget attribute. More...
 
- Public Member Functions inherited from unity::scopes::Reply
virtual void finished ()=0
 Informs the source of a query that the query results are complete. More...
 
virtual void error (std::exception_ptr ex)=0
 Informs the source of a query that the query was terminated due to an error. More...
 
virtual void info (OperationInfo const &op_info)=0
 Informs the source of a query that additional information regarding the reply is available. More...
 
virtual ~Reply ()
 Destroys a Reply. More...
 
- Public Member Functions inherited from unity::scopes::Object
virtual std::string endpoint ()=0
 Returns the endpoint this proxy connects to. More...
 
virtual std::string identity ()=0
 Returns the identity of the target object of this proxy. More...
 
virtual std::string target_category ()=0
 Returns the category of the target object of this proxy. More...
 
virtual int64_t timeout ()=0
 Returns the timeout in milliseconds if this proxy is a twoway proxy. More...
 
virtual std::string to_string ()=0
 Converts a proxy into its string representation. More...
 

Detailed Description

Allows the results of a preview to be sent to the preview requester.

Member Function Documentation

virtual bool unity::scopes::PreviewReply::push ( PreviewWidgetList const &  widget_list)
pure virtual

Sends widget definitions to the sender of the preview query.

This method can be called mutiple times to send widgets in stages.

Returns
True if the query is still alive, false if the query failed or was cancelled.
virtual bool unity::scopes::PreviewReply::push ( std::string const &  key,
Variant const &  value 
)
pure virtual

Sends data for a preview widget attribute.

Returns
True if the query is still alive, false if the query failed or was cancelled.
virtual bool unity::scopes::PreviewReply::register_layout ( ColumnLayoutList const &  layouts)
pure virtual

Registers a list of column layouts for the current preview.

Layouts must be registered before pushing a unity::scopes::PreviewWidgetList, and must be registered only once.

Returns
True if the query is still alive, false if the query failed or was cancelled.
Exceptions
unity::LogicExceptionregister_layout() is called more than once.