mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
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 102
|
|
}
|
|
|
|
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
|
|
}
|
|
}
|
|
}
|