|
|
@ -75,22 +75,26 @@ abstract class KdbxNode with Changeable<KdbxNode> { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
abstract class KdbxObject extends KdbxNode { |
|
|
|
abstract class KdbxObject extends KdbxNode { |
|
|
|
KdbxObject.create( |
|
|
|
KdbxObject.create(this.ctx, this.file, String nodeName, KdbxGroup parent) |
|
|
|
KdbxReadWriteContext ctx, this.file, String nodeName, KdbxGroup parent) |
|
|
|
: assert(ctx != null), |
|
|
|
: times = KdbxTimes.create(ctx), |
|
|
|
times = KdbxTimes.create(ctx), |
|
|
|
_parent = parent, |
|
|
|
_parent = parent, |
|
|
|
super.create(nodeName) { |
|
|
|
super.create(nodeName) { |
|
|
|
_uuid.set(KdbxUuid.random()); |
|
|
|
_uuid.set(KdbxUuid.random()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
KdbxObject.read(KdbxReadWriteContext ctx, KdbxGroup parent, XmlElement node) |
|
|
|
KdbxObject.read(this.ctx, KdbxGroup parent, XmlElement node) |
|
|
|
: times = KdbxTimes.read(node.findElements('Times').single, ctx), |
|
|
|
: assert(ctx != null), |
|
|
|
|
|
|
|
times = KdbxTimes.read(node.findElements('Times').single, ctx), |
|
|
|
_parent = parent, |
|
|
|
_parent = parent, |
|
|
|
super.read(node); |
|
|
|
super.read(node); |
|
|
|
|
|
|
|
|
|
|
|
/// the file this object is part of. will be set AFTER loading, etc. |
|
|
|
/// the file this object is part of. will be set AFTER loading, etc. |
|
|
|
|
|
|
|
/// TODO: We should probably get rid of this `file` reference. |
|
|
|
KdbxFile file; |
|
|
|
KdbxFile file; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
final KdbxReadWriteContext ctx; |
|
|
|
|
|
|
|
|
|
|
|
final KdbxTimes times; |
|
|
|
final KdbxTimes times; |
|
|
|
|
|
|
|
|
|
|
|
KdbxUuid get uuid => _uuid.get(); |
|
|
|
KdbxUuid get uuid => _uuid.get(); |
|
|
|