Supports polling for updates
This commit is contained in:
30
kordophone/Bridge/MBIMUpdateQueue.h
Normal file
30
kordophone/Bridge/MBIMUpdateQueue.h
Normal file
@@ -0,0 +1,30 @@
|
||||
//
|
||||
// MBIMUpdateQueue.h
|
||||
// kordophoned
|
||||
//
|
||||
// Created by James Magahern on 11/16/18.
|
||||
// Copyright © 2018 James Magahern. All rights reserved.
|
||||
//
|
||||
|
||||
#import <IMCore/IMCore.h>
|
||||
#import <IMFoundation/IMFoundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface MBIMUpdateItem : NSObject
|
||||
@property (nonatomic, strong) IMChat *changedChat;
|
||||
@property (nonatomic, strong) IMMessage *message;
|
||||
@end
|
||||
|
||||
typedef void (^MBIMUpdateConsumer)(MBIMUpdateItem *item);
|
||||
|
||||
@interface MBIMUpdateQueue : NSObject
|
||||
|
||||
+ (instancetype)sharedInstance;
|
||||
|
||||
- (void)addConsumer:(MBIMUpdateConsumer)consumer;
|
||||
- (void)enqueueUpdateItem:(MBIMUpdateItem *)item;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
Reference in New Issue
Block a user