2017-09-17 00:30:26 +02:00
|
|
|
|
//
|
|
|
|
|
// AccountDelegate.swift
|
|
|
|
|
// Account
|
|
|
|
|
//
|
|
|
|
|
// Created by Brent Simmons on 9/16/17.
|
|
|
|
|
// Copyright © 2017 Ranchero Software, LLC. All rights reserved.
|
|
|
|
|
//
|
|
|
|
|
|
|
|
|
|
import Foundation
|
2017-10-08 02:20:19 +02:00
|
|
|
|
import RSWeb
|
2017-09-17 00:30:26 +02:00
|
|
|
|
|
2019-05-05 14:21:26 +02:00
|
|
|
|
protocol AccountDelegate {
|
2017-09-17 00:30:26 +02:00
|
|
|
|
|
2017-09-28 22:16:47 +02:00
|
|
|
|
// Local account does not; some synced accounts might.
|
|
|
|
|
var supportsSubFolders: Bool { get }
|
2019-05-04 18:48:48 +02:00
|
|
|
|
var server: String? { get }
|
2019-05-05 10:25:21 +02:00
|
|
|
|
var credentials: Credentials? { get set }
|
2019-05-05 14:49:59 +02:00
|
|
|
|
var accountMetadata: AccountMetadata? { get set }
|
2017-10-07 23:40:14 +02:00
|
|
|
|
|
2017-10-08 02:43:10 +02:00
|
|
|
|
var refreshProgress: DownloadProgress { get }
|
2017-09-17 00:30:26 +02:00
|
|
|
|
|
2019-04-26 21:21:17 +02:00
|
|
|
|
func refreshAll(for: Account)
|
2017-10-19 04:14:40 +02:00
|
|
|
|
|
2017-12-20 02:48:30 +01:00
|
|
|
|
// Called at the end of account’s init method.
|
|
|
|
|
|
|
|
|
|
func accountDidInitialize(_ account: Account)
|
|
|
|
|
|
2019-05-05 10:25:21 +02:00
|
|
|
|
static func validateCredentials(transport: Transport, credentials: Credentials, completionHandler handler: @escaping (Result<Bool, Error>) -> Void)
|
|
|
|
|
|
2017-09-17 00:30:26 +02:00
|
|
|
|
}
|