| 1145 | } |
| 1146 | |
| 1147 | void Account::writeMtpData() { |
| 1148 | Expects(_localKey != nullptr); |
| 1149 | |
| 1150 | const auto serialized = _owner->serializeMtpAuthorization(); |
| 1151 | const auto size = sizeof(quint32) + Serialize::bytearraySize(serialized); |
| 1152 | |
| 1153 | FileWriteDescriptor mtp(ToFilePart(_dataNameKey), BaseGlobalPath()); |
| 1154 | EncryptedDescriptor data(size); |
| 1155 | data.stream << quint32(dbiMtpAuthorization) << serialized; |
| 1156 | mtp.writeEncrypted(data, _localKey); |
| 1157 | } |
| 1158 | |
| 1159 | void Account::readMtpData() { |
| 1160 | auto context = prepareReadSettingsContext(); |
no test coverage detected