session-ios/SignalServiceKit/src/Messages/OWSBlockingManager.h
Matthew Chen 993df25f3f Respond to CR.
// FREEBIE
2017-09-20 11:48:37 -04:00

30 lines
800 B
Objective-C

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