1
0
mirror of https://github.com/danog/Telegram.git synced 2025-01-22 05:52:06 +01:00
Telegram/Telegraph/TGPreparedLocalDocumentMessage.h

36 lines
1.6 KiB
C
Raw Normal View History

2014-07-10 18:11:09 +04: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 "TGPreparedMessage.h"
@class TGDocumentMediaAttachment;
@interface TGPreparedLocalDocumentMessage : TGPreparedMessage
@property (nonatomic) int64_t localDocumentId;
@property (nonatomic) int32_t size;
@property (nonatomic, strong) NSString *mimeType;
@property (nonatomic, strong) NSString *localThumbnailDataPath;
@property (nonatomic) CGSize thumbnailSize;
2015-10-01 19:19:52 +03:00
@property (nonatomic, strong) NSArray *attributes;
@property (nonatomic, strong) TGMessage *replyMessage;
2014-07-10 18:11:09 +04:00
- (NSString *)localDocumentDirectory;
- (NSString *)localDocumentFileName;
2015-10-01 19:19:52 +03:00
+ (instancetype)messageWithTempDocumentPath:(NSString *)tempDocumentPath size:(int32_t)size mimeType:(NSString *)mimeType thumbnailImage:(UIImage *)thumbnailImage thumbnailSize:(CGSize)thumbnailSize attributes:(NSArray *)attributes replyMessage:(TGMessage *)replyMessage;
+ (instancetype)messageByCopyingDataFromMessage:(TGPreparedLocalDocumentMessage *)source;
+ (instancetype)messageByCopyingDataFromMedia:(TGDocumentMediaAttachment *)media replyMessage:(TGMessage *)replyMessage;
+ (instancetype)messageWithLocalDocumentId:(int64_t)localDocumentId size:(int32_t)size mimeType:(NSString *)mimeType localThumbnailDataPath:(NSString *)localThumbnailDataPath thumbnailSize:(CGSize)localThumbnailSize attributes:(NSArray *)attributes;
2014-07-10 18:11:09 +04:00
+ (NSString *)localDocumentDirectoryForLocalDocumentId:(int64_t)localDocumentId;
+ (NSString *)localDocumentDirectoryForDocumentId:(int64_t)documentId;
@end