1
0
mirror of https://github.com/opa334/TrollStore.git synced 2025-07-07 00:38:46 +08:00

Create TSModuleManager.h

This commit is contained in:
a1109471307 2025-07-03 18:03:30 +08:00 committed by GitHub
parent d11c04666a
commit f11348499b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

25
Modules/TSModuleManager.h Normal file
View File

@ -0,0 +1,25 @@
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
typedef NS_ENUM(NSUInteger, TSModuleType) {
TSModuleTypeExploit,
TSModuleTypeInstallation,
TSModuleTypePersistence,
TSModuleTypeSecurity
};
@protocol TSModuleProtocol <NSObject>
- (BOOL)executeWithParameters:(NSDictionary *)params;
- (void)cleanupResources;
@property (nonatomic, readonly) TSModuleType moduleType;
@end
@interface TSModuleManager : NSObject
+ (instancetype)sharedManager;
- (void)registerModule:(id<TSModuleProtocol>)module forType:(TSModuleType)type;
- (nullable id<TSModuleProtocol>)moduleForType:(TSModuleType)type;
- (BOOL)executeModule:(TSModuleType)type parameters:(NSDictionary *)params;
@end
NS_ASSUME_NONNULL_END