mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00

Refactor animated sticker playback Move playback work to background Cache animated stickers' first frame previews Introduce cache lifetime classes
47 lines
1.2 KiB
Swift
47 lines
1.2 KiB
Swift
import Foundation
|
|
#if BUCK
|
|
import MtProtoKit
|
|
#else
|
|
import MtProtoKitDynamic
|
|
#endif
|
|
|
|
public class BoxedMessage: NSObject {
|
|
public let body: Any
|
|
public init(_ body: Any) {
|
|
self.body = body
|
|
}
|
|
}
|
|
|
|
public class Serialization: NSObject, MTSerialization {
|
|
public func currentLayer() -> UInt {
|
|
return 103
|
|
}
|
|
|
|
public func parseMessage(_ data: Data!) -> Any! {
|
|
return nil
|
|
}
|
|
|
|
public func exportAuthorization(_ datacenterId: Int32, data: AutoreleasingUnsafeMutablePointer<NSData?>) -> MTExportAuthorizationResponseParser!
|
|
{
|
|
return { data -> MTExportedAuthorizationData? in
|
|
return nil
|
|
}
|
|
}
|
|
|
|
public func importAuthorization(_ authId: Int32, bytes: Data!) -> Data! {
|
|
return Data()
|
|
}
|
|
|
|
public func requestDatacenterAddress(with data: AutoreleasingUnsafeMutablePointer<NSData?>) -> MTRequestDatacenterAddressListParser! {
|
|
return { response -> MTDatacenterAddressListData? in
|
|
return nil
|
|
}
|
|
}
|
|
|
|
public func requestNoop(_ data: AutoreleasingUnsafeMutablePointer<NSData?>!) -> MTRequestNoopParser! {
|
|
return { response -> AnyObject? in
|
|
return nil
|
|
}
|
|
}
|
|
}
|