Home telegram - mtMessageService
Post
Cancel

telegram - mtMessageService

MTMessageService

protocol MTMessageService

// service will add to ptoto
- (void)mtProtoWillAddService:(MTProto *)mtProto;

// service added to proto
- (void)mtProtoDidAddService:(MTProto *)mtProto;

// service removed
- (void)mtProtoDidRemoveService:(MTProto *)mtProto;

// notify public keys updated
- (void)mtProtoPublicKeysUpdated:(MTProto *)mtProto datacenterId:(NSInteger)datacenterId publicKeys:(NSArray<NSDictionary *> *)publicKeys;

// session changed
- (void)mtProtoDidChangeSession:(MTProto *)mtProto;

// server did change session
- (void)mtProtoServerDidChangeSession:(MTProto *)mtProto firstValidMessageId:(int64_t)firstValidMessageId otherValidMessageIds:(NSArray *)otherValidMessageIds;

// received message
- (void)mtProto:(MTProto *)mtProto receivedMessage:(MTIncomingMessage *)message;

// received quick ack
- (void)mtProto:(MTProto *)mtProto receivedQuickAck:(int32_t)quickAckId;
// transactions with ids may have failed
- (void)mtProto:(MTProto *)mtProto transactionsMayHaveFailed:(NSArray *)transactionIds;

// all transactions may have failed
- (void)mtProtoAllTransactionsMayHaveFailed:(MTProto *)mtProto;

// message delievery failed
- (void)mtProto:(MTProto *)mtProto messageDeliveryFailed:(int64_t)messageId;

// message delivery confirmed
- (void)mtProto:(MTProto *)mtProto messageDeliveryConfirmed:(NSArray *)messageIds;

// message resent failed
- (void)mtProto:(MTProto *)mtProto messageResendRequestFailed:(int64_t)messageId;

// received protol error
- (void)mtProto:(MTProto *)mtProto protocolErrorReceived:(int32_t)errorCode;

// should generate a new request message with responseMessageId in response to message with messageId
// the (context of the request with messageId)'s responseMessageId will be responseMessageId
- (bool)mtProto:(MTProto *)mtProto shouldRequestMessageWithId:(int64_t)responseMessageId inResponseToMessageId:(int64_t)messageId currentTransactionId:(id)currentTransactionId;
// 
- (void)mtProto:(MTProto *)mtProto updateReceiveProgressForToken:(id)progressToken progress:(float)progress packetLength:(NSInteger)packetLength;
This post is licensed under CC BY 4.0 by the author.