ContentManager
public class ContentManager : NSObject, OrangeChatLoggable
extension ContentManager: URLSessionTaskDelegate
extension ContentManager: URLSessionDownloadDelegate
-
Declaration
Swift
public init( authentication: Authentication, configuration: OrangeChatConfiguration )
-
Download image from url with progress
Declaration
Swift
public func downloadImage(from url: URL) -> AnyPublisher<ContentDownloadState, ContentDownloadError>
Parameters
url
The url to download the image
-
Download the thumnail from the url
Declaration
Swift
public func downloadThumbnail(from url: URL) -> AnyPublisher<UIImage, ContentDownloadError>
Parameters
url
The url to download the thumnail
-
Declaration
Swift
public func upload(to roomId: String, _ image: UIImage, and thumbnail: UIImage? = nil) -> AnyPublisher<ContentUploadState, ContentUploadError>
-
Declaration
Swift
public func urlSession( _ session: URLSession, task: URLSessionTask, didSendBodyData bytesSent: Int64, totalBytesSent: Int64, totalBytesExpectedToSend: Int64 )
-
Declaration
Swift
public func urlSession( _ session: URLSession, task: URLSessionTask, didCompleteWithError error: Error? )
-
Declaration
Swift
public func urlSession( _ session: URLSession, downloadTask: URLSessionDownloadTask, didWriteData bytesWritten: Int64, totalBytesWritten: Int64, totalBytesExpectedToWrite: Int64 )
-
Declaration
Swift
public func urlSession( _ session: URLSession, downloadTask: URLSessionDownloadTask, didFinishDownloadingTo location: URL )