session-ios/SignalServiceKit/src/Messages/OWSMessageManager.h
2018-12-02 17:30:31 -05:00

32 lines
886 B
Objective-C

//
// Copyright (c) 2018 Open Whisper Systems. All rights reserved.
//
#import "OWSMessageHandler.h"
NS_ASSUME_NONNULL_BEGIN
@class OWSPrimaryStorage;
@class SSKProtoEnvelope;
@class TSThread;
@class YapDatabaseReadWriteTransaction;
@interface OWSMessageManager : OWSMessageHandler
- (instancetype)init NS_UNAVAILABLE;
+ (instancetype)sharedManager;
- (instancetype)initWithPrimaryStorage:(OWSPrimaryStorage *)primaryStorage NS_DESIGNATED_INITIALIZER;
// processEnvelope: can be called from any thread.
- (void)throws_processEnvelope:(SSKProtoEnvelope *)envelope
plaintextData:(NSData *_Nullable)plaintextData
wasReceivedByUD:(BOOL)wasReceivedByUD
transaction:(YapDatabaseReadWriteTransaction *)transaction;
// This should be invoked by the main app when the app is ready.
- (void)startObserving;
@end
NS_ASSUME_NONNULL_END