21 #include <unity/scopes/Variant.h>
22 #include <unity/util/DefinesPtrs.h>
23 #include <unity/scopes/ScopeProxyFwd.h>
33 class CategorisedResult;
54 UNITY_DEFINES_PTRS(
Result);
84 void store(
Result const& other,
bool intercept_activation =
false);
115 void set_art(std::string
const& image);
184 std::string
uri()
const noexcept;
192 std::string
title()
const noexcept;
200 std::string
art()
const noexcept;
208 std::string
dnd_uri()
const noexcept;
215 bool contains(std::string
const& key)
const;
246 explicit Result(internal::ResultImpl* impl);
249 std::unique_ptr<internal::ResultImpl> p;
251 friend class internal::ResultImpl;
252 friend class internal::ScopeImpl;
void set_uri(std::string const &uri)
Set the "uri" attribute of this result.
std::shared_ptr< Scope > ScopeProxy
Convenience type definition.
Definition: ScopeProxyFwd.h:34
void set_art(std::string const &image)
Set the "art" attribute of this result.
void set_dnd_uri(std::string const &dnd_uri)
Set the "dnd_uri" attribute of this result.
std::string art() const noexcept
Get the "art" property of this Result.
std::string title() const noexcept
Get the "title" property of this Result.
Simple variant class that can hold an integer, boolean, string, double, dictionary, array or null value.
Definition: Variant.h:57
void set_intercept_activation()
Indicates to the receiver that this scope should intercept activation requests for this result...
bool is_account_login_result() const
Check if this result is an online account login result.
Result retrieve() const
Get a stored result.
ScopeProxy target_scope_proxy() const
Get the proxy of a scope that handles activation and preview of this result.
Variant const & value(std::string const &key) const
Get the value of an attribute.
The attributes of a result returned by a Scope.
Definition: Result.h:50
std::string dnd_uri() const noexcept
Get the "dnd_uri" property of this Result.
bool contains(std::string const &key) const
Check if this Result has an attribute.
std::string uri() const noexcept
Get the "uri" property of this Result.
VariantMap serialize() const
Returns a dictionary of all attributes of this Result instance.
Top-level namespace for all things Unity-related.
Definition: Version.h:49
bool has_stored_result() const
Check if this Result instance has a stored result.
void set_title(std::string const &title)
Set the "title" attribute of this result.
std::map< std::string, Variant > VariantMap
A dictionary of (string, Variant) pairs.
Definition: Variant.h:38
Definition: ActionMetadata.h:31
void store(Result const &other, bool intercept_activation=false)
Stores a Result inside this Result instance.
Variant & operator[](std::string const &key)
Returns reference of a Result attribute.
bool direct_activation() const
Check if this result should be activated directly by the shell because the scope doesn't handle activ...
A result, including the category it belongs to.
Definition: CategorisedResult.h:41