|
|
@ -194,15 +194,18 @@ public:
|
|
|
|
|
|
|
|
|
|
|
|
bool isValid() const { return valid; }
|
|
|
|
bool isValid() const { return valid; }
|
|
|
|
|
|
|
|
|
|
|
|
// Copy operator and constructor transfer the context
|
|
|
|
// Copy constructor is disabled.
|
|
|
|
UnlockContext(const UnlockContext& obj) { CopyFrom(obj); }
|
|
|
|
UnlockContext(const UnlockContext&) = delete;
|
|
|
|
UnlockContext& operator=(const UnlockContext& rhs) { CopyFrom(rhs); return *this; }
|
|
|
|
// Move operator and constructor transfer the context
|
|
|
|
|
|
|
|
UnlockContext(UnlockContext&& obj) { CopyFrom(std::move(obj)); }
|
|
|
|
|
|
|
|
UnlockContext& operator=(UnlockContext&& rhs) { CopyFrom(std::move(rhs)); return *this; }
|
|
|
|
private:
|
|
|
|
private:
|
|
|
|
WalletModel *wallet;
|
|
|
|
WalletModel *wallet;
|
|
|
|
bool valid;
|
|
|
|
bool valid;
|
|
|
|
mutable bool relock; // mutable, as it can be set to false by copying
|
|
|
|
mutable bool relock; // mutable, as it can be set to false by copying
|
|
|
|
|
|
|
|
|
|
|
|
void CopyFrom(const UnlockContext& rhs);
|
|
|
|
UnlockContext& operator=(const UnlockContext&) = default;
|
|
|
|
|
|
|
|
void CopyFrom(UnlockContext&& rhs);
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
UnlockContext requestUnlock();
|
|
|
|
UnlockContext requestUnlock();
|
|
|
|