19#ifndef CORE_TRUST_REQUEST_H_
20#define CORE_TRUST_REQUEST_H_
57 typedef std::chrono::system_clock::duration
Duration;
59 typedef std::chrono::system_clock::time_point
Timestamp;
Abstracts user-prompting functionality.
Models read/write/query access to persisted trust requests.
Contains functionality for implementing Ubuntu's trust model.
CORE_TRUST_DLL_PUBLIC Request::Answer process_trust_request(const RequestParameters ¶ms)
Processes an incoming trust-request by an application, tries to lookup a previous reply before issuin...
CORE_TRUST_DLL_PUBLIC std::ostream & operator<<(std::ostream &out, const Request::Answer &a)
operator << pretty prints answers to the provided output stream.
TaggedInteger< tag::Feature, std::uint64_t > Feature
Our internal service-feature type.
TaggedInteger< tag::Uid, uid_t > Uid
Our internal user id type.
TaggedInteger< tag::Pid, pid_t > Pid
Our internal process id type.
CORE_TRUST_DLL_PUBLIC bool operator==(const Agent::RequestParameters &lhs, const Agent::RequestParameters &rhs)
Returns true iff lhs and rhs are equal.
Summarizes all parameters for processing a trust request.
std::shared_ptr< Store > store
The trust store to be used for caching purposes.
Feature feature
The service-specific feature identifier.
core::trust::Uid application_uid
The user id under which the requesting application runs.
std::string application_id
The id of the requesting application.
std::shared_ptr< Agent > agent
The Agent implementation to dispatch a request to the user.
core::trust::Pid application_pid
The process id of the requesting application.
std::string description
An extended description that should be presented to the user on prompting.
The Request struct encapsulates information about a trust request answered by the user.
std::chrono::system_clock::duration Duration
Duration in wallclock time.
static constexpr const unsigned int default_feature
Default feature identifier.
Answer
Enumerates the possible answers given by a user.
std::chrono::system_clock::time_point Timestamp
Requests are timestamped with wallclock time.
#define CORE_TRUST_DLL_PUBLIC