mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-09-02 10:50:11 +00:00
27 lines
811 B
Objective-C
27 lines
811 B
Objective-C
#import <Foundation/Foundation.h>
|
|
|
|
@class MTSignal;
|
|
@class MTNetworkUsageCalculationInfo;
|
|
|
|
typedef enum {
|
|
MTNetworkUsageManagerInterfaceWWAN,
|
|
MTNetworkUsageManagerInterfaceOther
|
|
} MTNetworkUsageManagerInterface;
|
|
|
|
typedef struct {
|
|
NSUInteger incomingBytes;
|
|
NSUInteger outgoingBytes;
|
|
} MTNetworkUsageManagerInterfaceStats;
|
|
|
|
@interface MTNetworkUsageManager : NSObject
|
|
|
|
- (instancetype)initWithInfo:(MTNetworkUsageCalculationInfo *)info;
|
|
|
|
- (void)addIncomingBytes:(NSUInteger)incomingBytes interface:(MTNetworkUsageManagerInterface)interface;
|
|
- (void)addOutgoingBytes:(NSUInteger)outgoingBytes interface:(MTNetworkUsageManagerInterface)interface;
|
|
|
|
- (void)resetKeys:(NSArray<NSNumber *> *)keys completion:(void (^)())completion;
|
|
- (MTSignal *)currentStatsForKeys:(NSArray<NSNumber *> *)keys;
|
|
|
|
@end
|