unity.scopes.ActivationQueryBase
Base class for an activation request that is executed inside a scope. More...
#include <unity/scopes/ActivationQueryBase.h>
Inheritance diagram for unity::scopes::ActivationQueryBase:
src="https://assets.ubuntu.com/v1/54099959-classunity_1_1scopes_1_1_activation_query_base__inherit__graph.png" border="0" alt="Inheritance graph"/>
| 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... | |
| 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... | |
Detailed Description
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.
Constructor & Destructor Documentation
| unity::scopes::ActivationQueryBase::ActivationQueryBase | ( | Result const & | result, | 
| ActionMetadata const & | metadata | ||
| ) | 
Create ActivationQueryBase.
- Parameters
- 
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.
- Parameters
- 
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.
- Parameters
- 
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(). 
Member Function Documentation
| 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.
- Returns
- The action identifier passed to the constructor of this object.
| ActionMetadata unity::scopes::ActivationQueryBase::action_metadata | ( | ) | const | 
Get the metadata for this activation request handler.
- Returns
- The metadata passed to the constructor of this object.
| 
 | virtual | 
Return response to the activation request.
The response is received by the originator of the request. Default implementation returns ActivationResponse(ActivationResponse::Status::NotHandled.
- Returns
- The response to the activation request.
| Result unity::scopes::ActivationQueryBase::result | ( | ) | const | 
Get the result for this activation request handler.
- Returns
- The result passed to the constructor of this object.
| 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.
- Returns
- The widget identifier passed to the constructor of this object.