57 bool username_ =
false;
58 bool password_ =
true;
64 bool title()
const {
return title_; }
82 bool url()
const {
return url_; }
88 bool notes()
const {
return notes_; }
101 std::optional<std::time_t> last_modification_time_;
105 Field(std::string key, std::string value) : key_(std::move(key)), value_(std::move(value)) {}
109 : key_(other.key_), value_(other.value_),
110 last_modification_time_(other.last_modification_time_) {}
114 : key_(std::move(other.key_)), value_(std::move(other.value_)),
115 last_modification_time_(other.last_modification_time_) {}
118 const std::string&
key()
const {
return key_; }
121 const std::string&
value()
const {
return value_; }
125 return last_modification_time_;
131 last_modification_time_ = time;
139 key_ = std::move(other.key_);
140 value_ = std::move(other.value_);
141 last_modification_time_ = other.last_modification_time_;
156 std::array<uint8_t, 16> uuid_;
157 std::time_t deletion_time_ = 0;
161 DeletedObject(
const std::array<uint8_t, 16>& uuid, std::time_t deletion_time)
162 : uuid_(uuid), deletion_time_(deletion_time) {}
165 const std::array<uint8_t, 16>&
uuid()
const {
return uuid_; }
168 void set_uuid(
const std::array<uint8_t, 16>& uuid) { uuid_ = uuid; }
178 return uuid_ == other.uuid_ && deletion_time_ == other.deletion_time_;
186 std::string generator_;
190 uint32_t maintenance_hist_days_ = 365;
191 std::string database_color_;
192 std::time_t master_key_changed_ = 0;
193 int64_t master_key_change_rec_ = -1;
194 int64_t master_key_change_force_ = -1;
195 MemoryProtection memory_protection_;
196 std::shared_ptr<Group> recycle_bin_;
197 std::time_t recycle_bin_changed_;
198 std::shared_ptr<Group> entry_templates_;
199 std::time_t entry_templates_changed_;
200 int32_t history_max_items_ = -1;
201 int64_t history_max_size_ = -1;
202 std::weak_ptr<Group> last_selected_group_;
203 std::weak_ptr<Group> last_visible_group_;
205 std::vector<std::shared_ptr<Binary>> binaries_;
206 std::vector<std::shared_ptr<Icon>> icons_;
207 std::vector<Field> fields_;
208 std::vector<DeletedObject> deleted_objects_;
212 const std::string&
generator()
const {
return generator_; }
215 void set_generator(
const std::string& generator) { generator_ = generator; }
269 std::shared_ptr<Group>
recycle_bin()
const {
return recycle_bin_; }
285 entry_templates_ = std::move(entry_templates);
311 last_selected_group_ = std::move(group);
319 last_visible_group_ = std::move(group);
323 const std::vector<std::shared_ptr<Binary>>&
binaries()
const {
return binaries_; }
326 const std::vector<std::shared_ptr<Icon>>&
icons()
const {
return icons_; }
329 const std::vector<Field>&
fields()
const {
return fields_; }
332 const std::vector<DeletedObject>&
deleted_objects()
const {
return deleted_objects_; }
338 void AddIcon(
const std::shared_ptr<Icon>& icon);
341 void AddField(
const std::string& key,
const std::string& value);
Type representing a binary blob stored in a database.
Template class for keeping track of when a variable is modified.
Definition temporal.hh:35
Visibility/export macro for the shared library.
#define LIBKEEPASS_API
Marks a class, function or variable as part of the public ABI.
Definition export.hh:43
Type representing a custom database icon.
Template class for tracking modification timestamps of values.