2017-03-30 18:09:59 +02:00
|
|
|
//
|
|
|
|
// Copyright (c) 2017 Open Whisper Systems. All rights reserved.
|
|
|
|
//
|
2015-12-07 03:31:43 +01:00
|
|
|
|
|
|
|
#import "TSIncomingMessage.h"
|
|
|
|
#import "TSInvalidIdentityKeySendingErrorMessage.h"
|
|
|
|
#import "TSOutgoingMessage.h"
|
2016-07-28 01:58:49 +02:00
|
|
|
|
2016-10-05 17:42:44 +02:00
|
|
|
NS_ASSUME_NONNULL_BEGIN
|
|
|
|
|
2016-09-23 22:55:56 +02:00
|
|
|
@class TSNetworkManager;
|
2016-10-05 17:42:44 +02:00
|
|
|
@class TSStorageManager;
|
2016-08-22 22:09:58 +02:00
|
|
|
@class OWSSignalServiceProtosEnvelope;
|
|
|
|
@class OWSSignalServiceProtosDataMessage;
|
2016-09-23 22:55:56 +02:00
|
|
|
@class ContactsUpdater;
|
2016-10-14 23:00:29 +02:00
|
|
|
@class OWSMessageSender;
|
2016-10-01 20:42:39 +02:00
|
|
|
@protocol ContactsManagerProtocol;
|
2016-12-18 22:08:26 +01:00
|
|
|
@protocol OWSCallMessageHandler;
|
2015-12-07 03:31:43 +01:00
|
|
|
|
2017-04-14 19:37:04 +02:00
|
|
|
typedef void (^MessageManagerCompletionBlock)();
|
|
|
|
|
2015-12-07 03:31:43 +01:00
|
|
|
@interface TSMessagesManager : NSObject
|
|
|
|
|
2016-10-14 23:00:29 +02:00
|
|
|
- (instancetype)init NS_UNAVAILABLE;
|
2015-12-07 03:31:43 +01:00
|
|
|
+ (instancetype)sharedManager;
|
|
|
|
|
2016-10-05 17:42:44 +02:00
|
|
|
@property (nonatomic, readonly) YapDatabaseConnection *dbConnection;
|
|
|
|
@property (nonatomic, readonly) TSNetworkManager *networkManager;
|
|
|
|
@property (nonatomic, readonly) ContactsUpdater *contactsUpdater;
|
2015-12-07 03:31:43 +01:00
|
|
|
|
2017-07-25 00:05:26 +02:00
|
|
|
- (void)processEnvelope:(OWSSignalServiceProtosEnvelope *)envelope
|
|
|
|
completion:(nullable MessageManagerCompletionBlock)completion;
|
2016-10-05 17:42:44 +02:00
|
|
|
|
2015-12-07 03:31:43 +01:00
|
|
|
- (NSUInteger)unreadMessagesCount;
|
|
|
|
- (NSUInteger)unreadMessagesCountExcept:(TSThread *)thread;
|
|
|
|
- (NSUInteger)unreadMessagesInThread:(TSThread *)thread;
|
|
|
|
|
|
|
|
@end
|
2016-10-05 17:42:44 +02:00
|
|
|
|
|
|
|
NS_ASSUME_NONNULL_END
|