Home telegram-accountmanager
Post
Cancel

telegram-accountmanager

AccountManagerImpl

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
private let queue: Queue
private var recordsViews = Bag<(MutableAccountRecordsView, ValuePipe<AccountRecordsView>)>()
private var sharedDataViews = Bag<(MutableAccountSharedDataView, ValuePipe<AccountSharedDataView>)>()
private var noticeEntryViews = Bag<(MutableNoticeEntryView, ValuePipe<NoticeEntryView>)>()
private var accessChallengeDataViews = Bag<(MutableAccessChallengeDataView, ValuePipe<AccessChallengeDataView>)>()


private var currentRecordOperations: [AccountManagerRecordOperation] = []
private var currentMetadataOperations: [AccountManagerMetadataOperation] = []

private var currentUpdatedSharedDataKeys = Set<ValueBoxKey>()
private var currentUpdatedNoticeEntryKeys = Set<NoticeEntryKey>()
private var currentUpdatedAccessChallengeData: PostboxAccessChallengeData?

let noticeTable: NoticeTable
let sharedDataTable: AccountManagerSharedDataTable
private let legacyRecordTable: AccountManagerRecordTable
private let legacyMetadataTable: AccountManagerMetadataTable

private var tables: [Table] = []
private let valueBox: ValueBox
private let guardValueBox: ValueBox?

private let atomicStatePath: String
private var currentAtomicState: AccountManagerAtomicState
private let temporarySessionId: Int64

AccountManagerAtomicState

1
2
3
var records: [AccountRecordId: AccountRecord]
var currentRecordId: AccountRecordId?
var currentAuthRecord: AuthAccountRecord?

AuthAccountRecord

1
2
public let id: AccountRecordId
public let attributes: [AccountRecordAttribute]

AccountRecord

1
2
3
public let id: AccountRecordId
public let attributes: [AccountRecordAttribute]
public let temporarySessionId: Int64?
This post is licensed under CC BY 4.0 by the author.