session-ios/Signal/src/view controllers/TSAttachmentAdapter.h
Christine Corbett f5848365f7 Deliberate handling of MIME types for video, audio, and images.
• rejects unhandled media with unsupported attachment message
• for supported media, handling of MIME type/file extension conversion in a single place
• groundwork for future handling of additional types via e.g. conversion
2015-01-29 08:30:50 -10:00

23 lines
482 B
Objective-C

//
// TSAttachementAdapter.h
// Signal
//
// Created by Frederic Jacobs on 17/12/14.
// Copyright (c) 2014 Open Whisper Systems. All rights reserved.
//
#import <JSQMessagesViewController/JSQMediaItem.h>
#import "TSAttachmentStream.h"
#import <Foundation/Foundation.h>
@interface TSAttachmentAdapter : JSQMediaItem
- (instancetype)initWithAttachment:(TSAttachmentStream*)attachment;
- (BOOL)isImage;
- (BOOL)isAudio;
- (BOOL)isVideo;
@property NSString *attachmentId;
@end