DatabaseApi class abstract

Implementers

Constructors

DatabaseApi()

Properties

hashCode → int
The hash code for this object.
no setterinherited
maxFileSize → int
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
supportsFileStoring → bool
no setter

Methods

addSeenDeviceId(String userId, String deviceId, String publicKeys) → Future<void>
addSeenPublicKey(String publicKey, String deviceId) → Future<void>
cacheCustomObject(String cacheKey, Map<String, Object?> object) → Future<void>
clear() → Future<void>
clearCache() → Future<void>
clearSSSSCache() → Future
close() → Future
delete() → Future<void>
Deletes the whole database. The database needs to be created again after this.
deleteFile(Uri mxcUri) → Future<bool>
deleteFromToDeviceQueue(int id) → Future
deleteOldFiles(int savedAt) → Future
deleteTimelineForRoom(String roomId) → Future<void>
deviceIdSeen(String userId, String deviceId) → Future<String?>
exportDump() → Future<String>
forgetRoom(String roomId) → Future<void>
getAccountData() → Future<Map<String, BasicEvent>>
getAllInboundGroupSessions() → Future<List<StoredInboundGroupSession>>
getAllOlmSessions() → Future<Map<String, Map>>
getClient(String name) → Future<Map<String, dynamic>?>
getCustomCacheObject(String cacheKey) → Future<({Map<String, Object?> content, DateTime savedAt})?>
getEventById(String eventId, Room room) → Future<Event?>
getEventIdList(Room room, {int start = 0, bool includeSending = false, int? limit}) → Future<List<String>>
getEventList(Room room, {int start = 0, bool onlySending = false, int? limit}) → Future<List<Event>>
getFile(Uri mxcUri) → Future<Uint8List?>
Get a file from the app's file cache which is usually an mxcUri. This is also used for caching not-yet-sent files. Those are cached under an Uri with this format: cache://file/<TRANSACTION_ID> or cache://thumbnail/<TRANSACTION_ID>
getInboundGroupSession(String roomId, String sessionId) → Future<StoredInboundGroupSession?>
getInboundGroupSessionsToUpload() → Future<List<StoredInboundGroupSession>>
getLastSentMessageUserDeviceKey(String userId, String deviceId) → Future<List<String>>
getOlmSessions(String identityKey, String userId) → Future<List<OlmSession>>
getOlmSessionsForDevices(List<String> identityKeys, String userId) → Future<List<OlmSession>>
getOutboundGroupSession(String roomId, String userId) → Future<OutboundGroupSession?>
getPresence(String userId) → Future<CachedPresence?>
getRoomList(Client client) → Future<List<Room>>
getSingleRoom(Client client, String roomId, {bool loadImportantStates = true}) → Future<Room?>
getSSSSCache(String type) → Future<SSSSCache?>
getToDeviceEventQueue() → Future<List<QueuedToDeviceEvent>>
getUnimportantRoomEventStatesForRoom(List<String> events, Room room) → Future<List<Event>>
getUser(String userId, Room room) → Future<User?>
getUserDeviceKeys(Client client) → Future<Map<String, DeviceKeysList>>
getUserProfile(String userId) → Future<CachedProfileInformation?>
getUsers(Room room) → Future<List<User>>
importDump(String export) → Future<bool>
insertClient(String name, String homeserverUrl, String token, DateTime? tokenExpiresAt, String? refreshToken, String userId, String? deviceId, String? deviceName, String? prevBatch, String? olmAccount, String? oidcClientId) → Future
insertIntoToDeviceQueue(String type, String txnId, String content) → Future
Please do jsonEncode(content) in your code to stay compatible with auto generated methods here.
markInboundGroupSessionAsUploaded(String roomId, String sessionId) → Future
markInboundGroupSessionsAsNeedingUpload() → Future
markUserProfileAsOutdated(String userId) → Future<void>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
publicKeySeen(String publicKey) → Future<String?>
removeEvent(String eventId, String roomId) → Future
removeOutboundGroupSession(String roomId) → Future
removeUserCrossSigningKey(String userId, String publicKey) → Future
removeUserDeviceKey(String userId, String deviceId) → Future
setBlockedUserCrossSigningKey(bool blocked, String userId, String publicKey) → Future
setBlockedUserDeviceKey(bool blocked, String userId, String deviceId) → Future
setLastActiveUserDeviceKey(int lastActive, String userId, String deviceId) → Future
setLastSentMessageUserDeviceKey(String lastSentMessage, String userId, String deviceId) → Future
setRoomPrevBatch(String? prevBatch, String roomId, Client client) → Future
setVerifiedUserCrossSigningKey(bool verified, String userId, String publicKey, {DateTime? trustOnFirstUseSince}) → Future
setVerifiedUserDeviceKey(bool verified, String userId, String deviceId) → Future
storeAccountData(String type, Map<String, Object?> content) → Future
storeEventUpdate(String roomId, StrippedStateEvent event, EventUpdateType type, Client client) → Future<void>
Stores an EventUpdate object in the database. Must be called inside of transaction.
storeFile(Uri mxcUri, Uint8List bytes, int time) → Future
storeInboundGroupSession(String roomId, String sessionId, String pickle, String content, String indexes, String allowedAtIndex, String senderKey, String senderClaimedKey) → Future
storeLatestReceiptState(String roomId, LatestReceiptState receiptState) → Future<void>
storeOlmSession(String identityKey, String sessionId, String pickle, int lastReceived) → Future
storeOutboundGroupSession(String roomId, String pickle, String deviceIds, int creationTime) → Future
storePresence(String userId, CachedPresence presence) → Future<void>
storePrevBatch(String prevBatch) → Future
storeRoomAccountData(String roomId, BasicEvent event) → Future
storeRoomUpdate(String roomId, SyncRoomUpdate roomUpdate, Event? lastEvent, Client client) → Future<void>
Stores a RoomUpdate object in the database. Must be called inside of transaction.
storeSSSSCache(String type, String keyId, String ciphertext, String content) → Future
storeSyncFilterId(String syncFilterId) → Future
storeUserCrossSigningKey(String userId, String publicKey, String content, bool verified, bool blocked, {DateTime? trustOnFirstUseSince}) → Future
storeUserDeviceKey(String userId, String deviceId, String content, bool verified, bool blocked, int lastActive) → Future
storeUserDeviceKeysInfo(String userId, bool outdated) → Future
storeUserProfile(String userId, CachedProfileInformation profile) → Future<void>
toString() → String
A string representation of this object.
inherited
transaction(Future<void> action()) → Future<void>
updateClient(String homeserverUrl, String token, DateTime? tokenExpiresAt, String? refreshToken, String userId, String? deviceId, String? deviceName, String? prevBatch, String? olmAccount, String? oidcClientId) → Future
updateClientKeys(String olmAccount) → Future
updateInboundGroupSessionAllowedAtIndex(String allowedAtIndex, String roomId, String sessionId) → Future
updateInboundGroupSessionIndexes(String indexes, String roomId, String sessionId) → Future

Operators

operator ==(Object other) → bool
The equality operator.
inherited