Private
Public Access
1
0

Batch updates, and fixing bug where daemon would crash when accessing IMCore stuff from different threads

This commit is contained in:
James Magahern
2018-11-21 15:51:51 -07:00
parent 3186f1948a
commit dba4910a82
10 changed files with 155 additions and 90 deletions

View File

@@ -18,13 +18,13 @@ NS_ASSUME_NONNULL_BEGIN
- (NSDictionary *)dictionaryRepresentation;
@end
typedef void (^MBIMUpdateConsumer)(MBIMUpdateItem *item);
typedef void (^MBIMUpdateConsumer)(NSArray<MBIMUpdateItem *> *items);
@interface MBIMUpdateQueue : NSObject
+ (instancetype)sharedInstance;
- (void)addConsumer:(MBIMUpdateConsumer)consumer;
- (void)addConsumer:(MBIMUpdateConsumer)consumer withLastSyncedMessageSeq:(NSInteger)messageSeq;
- (void)removeConsumer:(MBIMUpdateConsumer)consumer;
- (void)enqueueUpdateItem:(MBIMUpdateItem *)item;