2017-03-31 02:04:19 +02:00
|
|
|
//
|
|
|
|
// Copyright (c) 2017 Open Whisper Systems. All rights reserved.
|
|
|
|
//
|
|
|
|
|
|
|
|
NS_ASSUME_NONNULL_BEGIN
|
|
|
|
|
|
|
|
@class TSStorageManager;
|
|
|
|
@class OWSMessageSender;
|
|
|
|
|
2017-04-03 20:42:04 +02:00
|
|
|
extern NSString *const kNSNotificationName_BlockedPhoneNumbersDidChange;
|
2017-03-31 02:04:19 +02:00
|
|
|
|
|
|
|
// This class can be safely accessed and used from any thread.
|
2017-04-03 20:42:04 +02:00
|
|
|
@interface OWSBlockingManager : NSObject
|
2017-03-31 02:04:19 +02:00
|
|
|
|
|
|
|
- (instancetype)init NS_UNAVAILABLE;
|
|
|
|
|
|
|
|
+ (instancetype)sharedManager;
|
|
|
|
|
|
|
|
- (void)addBlockedPhoneNumber:(NSString *)phoneNumber;
|
|
|
|
|
|
|
|
- (void)removeBlockedPhoneNumber:(NSString *)phoneNumber;
|
|
|
|
|
2017-03-31 03:58:05 +02:00
|
|
|
// When updating the block list from a sync message, we don't
|
|
|
|
// want to fire a sync message.
|
2017-03-31 19:43:05 +02:00
|
|
|
- (void)setBlockedPhoneNumbers:(NSArray<NSString *> *)blockedPhoneNumbers sendSyncMessage:(BOOL)sendSyncMessage;
|
2017-03-31 02:04:19 +02:00
|
|
|
|
|
|
|
- (NSArray<NSString *> *)blockedPhoneNumbers;
|
|
|
|
|
|
|
|
@end
|
|
|
|
|
|
|
|
NS_ASSUME_NONNULL_END
|