mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-07-04 10:30:42 +00:00

git-subtree-dir: submodules/MtProtoKit git-subtree-mainline: 3b155750f5a4894ff3dedf1860a37e94e0ea9571 git-subtree-split: 14ab734b977fd4f1686a2a13415f6a4c9b9fdd6d
36 lines
1.4 KiB
Objective-C
36 lines
1.4 KiB
Objective-C
|
|
|
|
#import <Foundation/Foundation.h>
|
|
|
|
#if defined(MtProtoKitDynamicFramework)
|
|
# import <MTProtoKitDynamic/MTExportedAuthorizationData.h>
|
|
# import <MTProtoKitDynamic/MTDatacenterAddressListData.h>
|
|
# import <MTProtoKitDynamic/MTDatacenterVerificationData.h>
|
|
#elif defined(MtProtoKitMacFramework)
|
|
# import <MTProtoKitMac/MTExportedAuthorizationData.h>
|
|
# import <MTProtoKitMac/MTDatacenterAddressListData.h>
|
|
# import <MTProtoKitMac/MTDatacenterVerificationData.h>
|
|
#else
|
|
# import <MtProtoKit/MTExportedAuthorizationData.h>
|
|
# import <MtProtoKit/MTDatacenterAddressListData.h>
|
|
# import <MtProtoKit/MTDatacenterVerificationData.h>
|
|
#endif
|
|
|
|
typedef MTExportedAuthorizationData *(^MTExportAuthorizationResponseParser)(NSData *);
|
|
typedef MTDatacenterAddressListData *(^MTRequestDatacenterAddressListParser)(NSData *);
|
|
typedef MTDatacenterVerificationData *(^MTDatacenterVerificationDataParser)(NSData *);
|
|
typedef id (^MTRequestNoopParser)(NSData *);
|
|
|
|
@protocol MTSerialization <NSObject>
|
|
|
|
- (NSUInteger)currentLayer;
|
|
|
|
- (id)parseMessage:(NSData *)data;
|
|
|
|
- (MTExportAuthorizationResponseParser)exportAuthorization:(int32_t)datacenterId data:(__autoreleasing NSData **)data;
|
|
- (NSData *)importAuthorization:(int32_t)authId bytes:(NSData *)bytes;
|
|
- (MTRequestDatacenterAddressListParser)requestDatacenterAddressWithData:(__autoreleasing NSData **)data;
|
|
- (MTRequestNoopParser)requestNoop:(__autoreleasing NSData **)data;
|
|
|
|
@end
|