NetworkServiceProtocol.swift 659 B

12345678910111213141516171819
  1. import Foundation
  2. protocol NetworkServiceProtocol {
  3. func fetchSessions() async throws -> [RemoteSession]
  4. func syncSession(
  5. _ session: CelestiaSession,
  6. deletedEventClientIDs: [String]
  7. ) async throws -> RemoteSession
  8. func fetchStorageQuota() async throws -> StorageQuota
  9. func uploadAsset(
  10. sessionID: String,
  11. clientID: String,
  12. kind: String,
  13. fileURL: URL,
  14. progress: @escaping @Sendable (Double) -> Void
  15. ) async throws -> AssetUploadResult
  16. func downloadAsset(sessionID: String, asset: RemoteAsset, destinationURL: URL) async throws
  17. func recordSyncCheckpoint() async throws
  18. }