Files
keyboard/Pods/LookinServer/Src/Main/Server/Connection/RequestHandler/LKS_HierarchyDetailsHandler.h
2025-10-28 10:18:10 +08:00

31 lines
960 B
Objective-C
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#ifdef SHOULD_COMPILE_LOOKIN_SERVER
//
// LKS_HierarchyDetailsHandler.h
// LookinServer
//
// Created by Li Kai on 2019/6/20.
// https://lookin.work
//
#import <Foundation/Foundation.h>
@class LookinDisplayItemDetail, LookinStaticAsyncUpdateTasksPackage;
typedef void (^LKS_HierarchyDetailsHandler_ProgressBlock)(NSArray<LookinDisplayItemDetail *> *details);
typedef void (^LKS_HierarchyDetailsHandler_FinishBlock)(void);
@interface LKS_HierarchyDetailsHandler : NSObject
/// packages 会按照 idx 从小到大的顺序被执行
/// 全部任务完成时finishBlock 会被调用
/// 如果调用了 cancel则 finishBlock 不会被执行
- (void)startWithPackages:(NSArray<LookinStaticAsyncUpdateTasksPackage *> *)packages block:(LKS_HierarchyDetailsHandler_ProgressBlock)progressBlock finishedBlock:(LKS_HierarchyDetailsHandler_FinishBlock)finishBlock;
/// 取消所有任务
- (void)cancel;
@end
#endif /* SHOULD_COMPILE_LOOKIN_SERVER */