1
0
mirror of https://github.com/danog/Telegram.git synced 2024-12-11 17:09:46 +01:00
Telegram/Telegraph/TGModernSendSecretMessageActor.h

58 lines
3.5 KiB
C
Raw Normal View History

2014-07-10 16:11:09 +02:00
/*
* 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 "TGModernSendMessageActor.h"
2015-10-01 18:19:52 +02:00
#import <MTProtoKit/MTMessageEncryptionKey.h>
2014-07-10 16:11:09 +02:00
#import "TL/TLMetaScheme.h"
2015-10-01 18:19:52 +02:00
#import "SecretLayer1.h"
#import "SecretLayer17.h"
#import "SecretLayer20.h"
#import "SecretLayer23.h"
2016-02-25 01:03:51 +01:00
#import "SecretLayer46.h"
2015-10-01 18:19:52 +02:00
@class TGStoredOutgoingMessageFileInfo;
2014-07-10 16:11:09 +02:00
@interface TGModernSendSecretMessageActor : TGModernSendMessageActor
2015-10-01 18:19:52 +02:00
+ (NSUInteger)currentLayer;
+ (MTMessageEncryptionKey *)generateMessageKeyData:(NSData *)messageKey incoming:(bool)incoming key:(NSData *)key;
+ (int32_t)enqueueOutgoingMessageForPeerId:(int64_t)peerId layer:(NSUInteger)layer keyId:(int64_t)keyId randomId:(int64_t)randomId messageData:(NSData *)messageData storedFileInfo:(TGStoredOutgoingMessageFileInfo *)storedFileInfo watcher:(id)watcher;
+ (int32_t)enqueueOutgoingServiceMessageForPeerId:(int64_t)peerId layer:(NSUInteger)layer keyId:(int64_t)keyId randomId:(int64_t)randomId messageData:(NSData *)messageData;
+ (void)enqueueOutgoingResendMessagesForPeerId:(int64_t)peerId fromSeq:(int32_t)fromSeq toSeq:(int32_t)toSeq;
+ (void)enqueueIncomingMessagesByPeerId:(NSDictionary *)messageByPeerId;
+ (void)enqueueIncomingEncryptedMessagesByPeerId:(NSDictionary *)messageByPeerId;
+ (void)beginIncomingQueueProcessingIfNeeded:(int64_t)peerId;
+ (void)beginOutgoingQueueProcessingIfNeeded:(int64_t)peerId;
+ (void)maybeRekeyPeerId:(int64_t)peerId;
2014-07-10 16:11:09 +02:00
+ (NSData *)encryptMessage:(NSData *)serializedMessage key:(NSData *)key keyId:(int64_t)keyId;
2015-10-01 18:19:52 +02:00
+ (NSData *)decryptedServiceMessageActionWithLayer:(NSUInteger)layer setTTL:(int32_t)ttl randomId:(int64_t)randomId;
+ (NSData *)decryptedServiceMessageActionWithLayer:(NSUInteger)layer deleteMessagesWithRandomIds:(NSArray *)randomIds randomId:(int64_t)randomId;
+ (NSData *)decryptedServiceMessageActionWithLayer:(NSUInteger)layer flushHistoryWithRandomId:(int64_t)randomId;
+ (NSData *)decryptedServiceMessageActionWithLayer:(NSUInteger)layer readMessagesWithRandomIds:(NSArray *)randomIds randomId:(int64_t)randomId;
+ (NSData *)decryptedServiceMessageActionWithLayer:(NSUInteger)layer screenshotMessagesWithRandomIds:(NSArray *)randomIds randomId:(int64_t)randomId;
+ (NSData *)decryptedServiceMessageActionWithLayer:(NSUInteger)layer notifyLayer:(NSUInteger)notifyLayer randomId:(int64_t)randomId;
+ (NSData *)decryptedServiceMessageActionWithLayer:(NSUInteger)layer resendMessagesFromSeq:(int32_t)fromSeq toSeq:(int32_t)toSeq randomId:(int64_t)randomId;
+ (NSData *)decryptedServiceMessageActionWithLayer:(NSUInteger)layer requestKey:(int64_t)exchangeId g_a:(NSData *)g_a randomId:(int64_t)randomId;
+ (NSData *)decryptedServiceMessageActionWithLayer:(NSUInteger)layer acceptKey:(int64_t)exchangeId g_b:(NSData *)g_b keyFingerprint:(int64_t)keyFingerprint randomId:(int64_t)randomId;
+ (NSData *)decryptedServiceMessageActionWithLayer:(NSUInteger)layer commitKey:(int64_t)exchangeId keyFingerprint:(int64_t)keyFingerprint randomId:(int64_t)randomId;
+ (NSData *)decryptedServiceMessageActionWithLayer:(NSUInteger)layer abortKey:(int64_t)exchangeId randomId:(int64_t)randomId;
+ (NSData *)decryptedServiceMessageActionWithLayer:(NSUInteger)layer noopRandomId:(int64_t)randomId;
2014-07-10 16:11:09 +02:00
- (void)sendEncryptedMessageSuccess:(int32_t)date encryptedFile:(TLEncryptedFile *)encryptedFile;
- (void)sendEncryptedMessageFailed;
2015-10-01 18:19:52 +02:00
- (bool)waitsForActionWithId:(int32_t)actionId;
2014-07-10 16:11:09 +02:00
@end