3.0
Last change
on this file since 71:415b45c71663 was
71:415b45c71663,
checked in by Sämy Zehnder <saemy.zehnder@…>, 12 years ago
|
- Reorganized all the libraries. libinterfaces and libgateways are removed now and libdatatypes contains now all these files.
|
File size:
826 bytes
|
Line | |
---|
1 | #include "abstractloginaccountstorageofficer.h" |
---|
2 | |
---|
3 | |
---|
4 | void AbstractLoginAccountStorageOfficer::readFromStorage() { |
---|
5 | AbstractAccountStorageOfficer::readFromStorage(); |
---|
6 | |
---|
7 | account()->setUsername(storage()->readString(getNamespace(), "username")); |
---|
8 | account()->setPassword(storage()->readEncryptedString(getNamespace(), "password", ENCRYPTION_PWD)); |
---|
9 | } |
---|
10 | |
---|
11 | void AbstractLoginAccountStorageOfficer::writeToStorage() const { |
---|
12 | AbstractAccountStorageOfficer::writeToStorage(); |
---|
13 | |
---|
14 | storage()->writeString(getNamespace(), "username", account()->username()); |
---|
15 | storage()->writeEncryptedString(getNamespace(), "password", ENCRYPTION_PWD, account()->password()); |
---|
16 | } |
---|
17 | |
---|
18 | |
---|
19 | AbstractLoginAccount* AbstractLoginAccountStorageOfficer::account() const { |
---|
20 | return static_cast<AbstractLoginAccount*>(AbstractAccountStorageOfficer::account()); |
---|
21 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.