MCPcopy Create free account
hub / github.com/TDesktop-x64/tdesktop / writeMtpData

Method writeMtpData

Telegram/SourceFiles/storage/storage_account.cpp:1147–1157  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1145}
1146
1147void 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
1159void Account::readMtpData() {
1160 auto context = prepareReadSettingsContext();

Callers 4

createSessionMethod · 0.80
startMtpMethod · 0.80
destroyMtpKeysMethod · 0.80

Calls 5

bytearraySizeFunction · 0.85
ToFilePartFunction · 0.85
writeEncryptedMethod · 0.80
BaseGlobalPathFunction · 0.70

Tested by

no test coverage detected