19 #ifndef CORE_TRUST_STORE_H_
20 #define CORE_TRUST_STORE_H_
65 :
std::runtime_error(implementation_specific)
76 :
std::runtime_error(implementation_specific)
126 virtual ~
Query() =
default;
129 virtual Status status()
const = 0;
132 virtual void for_application_id(
const std::string&
id) = 0;
135 virtual void for_feature(
Feature feature) = 0;
144 virtual void all() = 0;
147 virtual void execute() = 0;
150 virtual void next() = 0;
153 virtual void erase() = 0;
163 virtual ~
Store() =
default;
171 virtual void reset() = 0;
176 virtual void add(
const Request& request) = 0;
181 virtual std::shared_ptr<Query> query() = 0;
216 #endif // CORE_TRUST_STORE_H_
Thrown if a store implementation could not reset state and drop all previously stored requests...
The ServiceNameMustNotBeEmpty is thrown if an empty service name is provided when creating a store...
The Request struct encapsulates information about a trust request answered by the user...
All Query-specific error/exception types go here.
Thrown if a store implementation could not access the persistence backend.
Answer
Enumerates the possible answers given by a user.
Models read/write/query access to persisted trust requests.
Thrown when trying to access the current result although the query status is not has_more_results.
ErrorOpeningStore(const char *implementation_specific)
CORE_TRUST_DLL_PUBLIC bool operator==(const Agent::RequestParameters &lhs, const Agent::RequestParameters &rhs)
Returns true iff lhs and rhs are equal.
Thrown if functionality of a query is accessed although the query is in error state.
Status
The state of the query.
All Store-specific error/exception types go here.
std::chrono::system_clock::time_point Timestamp
Requests are timestamped with wallclock time.
The Query class encapsulates queries against a trust store instance.
ErrorResettingStore(const char *implementation_specific)
All core::trust-specific error/exception types go here.
ServiceNameMustNotBeEmpty()
#define CORE_TRUST_DLL_PUBLIC
CORE_TRUST_DLL_PUBLIC std::shared_ptr< Store > create_default_store(const std::string &service_name)
Creates an instance for the default store implementation.