mv-experiment #1
44
ConversationsClassic/AppData/Model/OMEMO.swift
Normal file
44
ConversationsClassic/AppData/Model/OMEMO.swift
Normal file
|
@ -0,0 +1,44 @@
|
|||
import Foundation
|
||||
import GRDB
|
||||
import Martin
|
||||
|
||||
// MARK: - Session
|
||||
struct OMEMOSession: Codable & Equatable, DatabaseValueConvertible {
|
||||
static let databaseTableName = "omemo_sessions"
|
||||
|
||||
let account: String
|
||||
let name: String
|
||||
let deviceId: Int
|
||||
let key: String
|
||||
}
|
||||
|
||||
// MARK: - Identity
|
||||
struct OMEMOIdentity: Codable & Equatable, DatabaseValueConvertible {
|
||||
static let databaseTableName = "omemo_identities"
|
||||
|
||||
let account: String
|
||||
let name: String
|
||||
let deviceId: Int
|
||||
let fingerprint: String
|
||||
let key: Data
|
||||
let own: Bool
|
||||
let status: Int
|
||||
}
|
||||
|
||||
// MARK: - PreKey
|
||||
struct OMEMOPreKey: Codable & Equatable, DatabaseValueConvertible {
|
||||
static let databaseTableName = "omemo_pre_keys"
|
||||
|
||||
let account: String
|
||||
let id: Int
|
||||
let key: Data
|
||||
}
|
||||
|
||||
// MARK: - SignedPreKey
|
||||
struct OMEMOSignedPreKey: Codable & Equatable, DatabaseValueConvertible {
|
||||
static let databaseTableName = "omemo_signed_pre_keys"
|
||||
|
||||
let account: String
|
||||
let id: Int
|
||||
let key: Data
|
||||
}
|
Loading…
Reference in a new issue