19 #ifndef UNITY_SCOPES_RESULT_H
20 #define UNITY_SCOPES_RESULT_H
22 #include <unity/scopes/Variant.h>
23 #include <unity/util/DefinesPtrs.h>
24 #include <unity/scopes/ScopeProxyFwd.h>
34 class CategorisedResult;
55 UNITY_DEFINES_PTRS(
Result);
85 void store(
Result const& other,
bool intercept_activation =
false);
116 void set_art(std::string
const& image);
185 std::string
uri()
const noexcept;
193 std::string
title()
const noexcept;
201 std::string
art()
const noexcept;
209 std::string
dnd_uri()
const noexcept;
216 bool contains(std::string
const& key)
const;
236 explicit Result(internal::ResultImpl* impl);
240 std::unique_ptr<internal::ResultImpl> p;
242 friend class internal::ResultImpl;
243 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:35
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:58
void set_intercept_activation()
Indicates to the receiver that this scope should intercept activation requests for this 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:51
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.
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:39
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