session-ios/Signal/src/Models/TSMessageAdapaters/AttachmentUploadView.h
Matthew Chen 539e665589 Respond to CR.
// FREEBIE
2017-03-20 12:55:35 -04:00

27 lines
764 B
Objective-C

//
// Copyright (c) 2017 Open Whisper Systems. All rights reserved.
//
NS_ASSUME_NONNULL_BEGIN
@class TSAttachmentStream;
typedef void (^AttachmentStateBlock)(BOOL isAttachmentReady);
// This entity is used by various attachment adapters to
// coordinate view state with attachment uploads.
// During attachment uploads we want to:
//
// * Dim the media view using a mask layer.
// * Show and update a progress bar.
// * Disable any media view controls using a callback.
@interface AttachmentUploadView : NSObject
- (instancetype)initWithAttachment:(TSAttachmentStream *)attachment
superview:(UIView *)superview
attachmentStateCallback:(AttachmentStateBlock _Nullable)attachmentStateCallback;
@end
NS_ASSUME_NONNULL_END