/* * This is the source code of Telegram for iOS v. 1.1 * It is licensed under GNU GPL v. 2 or later. * You should have received a copy of the license in this archive (see LICENSE). * * Copyright Peter Iakovlev, 2013. */ #import @class MTContext; @class MTTransport; @class MTDatacenterAddress; @protocol MTTransportDelegate; @class MTNetworkUsageCalculationInfo; @interface MTTransportScheme : NSObject @property (nonatomic, strong, readonly) Class transportClass; @property (nonatomic, strong, readonly) MTDatacenterAddress *address; @property (nonatomic, readonly) bool media; - (instancetype)initWithTransportClass:(Class)transportClass address:(MTDatacenterAddress *)address media:(bool)media; - (BOOL)isEqualToScheme:(MTTransportScheme *)other; - (BOOL)isOptimal; - (NSComparisonResult)compareToScheme:(MTTransportScheme *)other; - (MTTransport *)createTransportWithContext:(MTContext *)context datacenterId:(NSInteger)datacenterId delegate:(id)delegate usageCalculationInfo:(MTNetworkUsageCalculationInfo *)usageCalculationInfo; @end