|
Unity Scopes API
|
Base class for an activation request that is executed inside a scope. More...
#include <unity/scopes/ActivationQueryBase.h>

Public Member Functions | |
| ActivationQueryBase (Result const &result, ActionMetadata const &metadata) | |
| Create ActivationQueryBase. More... | |
| ActivationQueryBase (Result const &result, ActionMetadata const &metadata, std::string const &widget_id, std::string const &action_id) | |
| Create ActivationQueryBase. More... | |
| ActivationQueryBase (Result const &update_result, ActionMetadata const &metadata, std::string const &action_id) | |
| Create ActivationQueryBase. More... | |
| virtual void | cancelled () override |
| Called when the originator of the activation request cancelled it. | |
| virtual ActivationResponse | activate () |
| Return response to the activation request. More... | |
| Result | result () const |
| Get the result for this activation request handler. More... | |
| ActionMetadata | action_metadata () const |
| Get the metadata for this activation request handler. More... | |
| std::string | widget_id () const |
| Get the widget identifier for this activation request handler. More... | |
| std::string | action_id () const |
| Get the action identifier for this activation request handler. More... | |
Public Member Functions inherited from unity::scopes::QueryBase | |
| bool | valid () const |
| Check whether this query is still valid. More... | |
| unity::scopes::VariantMap | settings () const |
| Returns a dictionary with the scope's current settings. More... | |
Base class for an activation request that is executed inside a scope.
The default implementation responds with ActivationResponse(ActivationResponse::Status::NotHandled). Reimplement this class and return an instance from ScopeBase::activate method for custom activation handling.
| unity::scopes::ActivationQueryBase::ActivationQueryBase | ( | Result const & | result, |
| ActionMetadata const & | metadata | ||
| ) |
Create ActivationQueryBase.
| result | The result received by ScopeBase::activate(). |
| metadata | The metadata received by ScopeBase::activate(). |
| unity::scopes::ActivationQueryBase::ActivationQueryBase | ( | Result const & | result, |
| ActionMetadata const & | metadata, | ||
| std::string const & | widget_id, | ||
| std::string const & | action_id | ||
| ) |
Create ActivationQueryBase.
| result | The result received by ScopeBase::perform_action(). |
| metadata | The metadata received by ScopeBase::perform_action(). |
| widget_id | The widget identifier receiver of ScopeBase::perform_action(). |
| action_id | The action identifier receiver of ScopeBase::perform_action(). |
| unity::scopes::ActivationQueryBase::ActivationQueryBase | ( | Result const & | update_result, |
| ActionMetadata const & | metadata, | ||
| std::string const & | action_id | ||
| ) |
Create ActivationQueryBase.
| update_result | The result received by ScopeBase::activate_result_action(). |
| metadata | The metadata received by ScopeBase::activate_result_action(). |
| action_id | The action identifier received by ScopeBase::activate_result_action(). |
| std::string unity::scopes::ActivationQueryBase::action_id | ( | ) | const |
Get the action identifier for this activation request handler.
Action identifier is empty when using the unity::scopes::ActivationQueryBase(Result const& result, ActionMetadata const& metadata) constructor.
| ActionMetadata unity::scopes::ActivationQueryBase::action_metadata | ( | ) | const |
Get the metadata for this activation request handler.
|
virtual |
Return response to the activation request.
The response is received by the originator of the request. Default implementation returns ActivationResponse(ActivationResponse::Status::NotHandled.
| Result unity::scopes::ActivationQueryBase::result | ( | ) | const |
Get the result for this activation request handler.
| std::string unity::scopes::ActivationQueryBase::widget_id | ( | ) | const |
Get the widget identifier for this activation request handler.
Widget identifier is empty when using the unity::scopes::ActivationQueryBase(Result const& result, ActionMetadata const& metadata) constructor.