phizclip-uniapp-demo/finclip-uniapp-test/nativeplugins/MopSdk/ios/FinApplet.framework/Headers/FATWebExtension.h

51 lines
1.4 KiB
C
Raw Normal View History

2022-06-08 11:57:35 +08:00
//
// FATWebExtension.h
// FinApplet
//
// Created by Haley on 2019/11/20.
// Copyright © 2019 finogeeks. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "FATConstant.h"
2022-10-19 12:51:03 +08:00
@class FATAppletInfo;
typedef void (^FATWebExtensionApiHandler)(FATAppletInfo *appletInfo, id param, FATExtensionApiCallback callback);
typedef void (^FATWebExtensionApiDeprecatedHandler)(id param, FATExtensionApiCallback callback);
@interface FATWebExtensionApiHandlerModel : NSObject
@property (nonatomic, assign) BOOL isOld;
@property (nonatomic, copy) FATWebExtensionApiHandler handler;
@property (nonatomic, copy) FATWebExtensionApiDeprecatedHandler deprecatedHandler;
@end
2022-06-08 11:57:35 +08:00
@interface FATWebExtension : NSObject
/**
JSAPI
宿API
@param api API
@param handler
*/
2022-10-19 12:51:03 +08:00
+ (BOOL)registerExtensionApi:(NSString *)api handler:(FATWebExtensionApiHandler)handler;
/**
JSAPI(sdk)
宿API
@param api API
@param handler
*/
+ (BOOL)registerInnerExtensionApi:(NSString *)api handler:(FATWebExtensionApiHandler)handler;
+ (BOOL)registerDeprecatedExtensionApi:(NSString *)api handler:(FATWebExtensionApiDeprecatedHandler)handler;
+ (NSDictionary<NSString *, FATWebExtensionApiHandlerModel *> *)webExtensionApis;
2022-06-08 11:57:35 +08:00
2022-10-19 12:51:03 +08:00
+ (NSMutableArray<NSString *> *)innerApiWhiteList;
2022-06-08 11:57:35 +08:00
@end