BBASchemeDispatcher+BBASMPluginCallBack.h
2.82 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
//
// BBASchemeDispatcher+BBASMPluginCallBack.h
// SWAN
//
// Created by baidu on 2018/5/11.
// Copyright © 2018年 baidu. All rights reserved.
//
#import <BBASchemeDispatcher/BBASchemeDispatcher.h>
@interface BBASchemeDispatcher (BBASMPluginCallBack)
/**
参数错误 一级
*/
- (void)bbasm_callBackForParamsError;
/**
* @brief shceme 和 jsbanding 下的一级回调错误 dict,抽取公共方法
*
* @return 级回调错误 dict
*/
+ (NSDictionary *)callBackResultErrorInfo;
/**
* @brief 兼容 11.15之前 shecme 没有下发二级回调 的情况,有二级回调的情况下,回调一级和二级回调;没有的情况下,使用老的 shceme 方式回调一级回调
*
* @param dispatcher 分发器
* @param completionData 完成回调数据
*/
+ (void)dispatcher:(BBASchemeDispatcher *)dispatcher callBackCompletionData:(NSDictionary *)completionData;
/**
参数错误 非空参数没传 一级
*/
- (void)bbasm_callBackForParamsErrorKeyNotNull:(NSString *)key;
/**
参数错误 值不合法 一级
*/
- (void)bbasm_callBackForParamsErrorValueNotLegal:(NSString*)key;
/**
调用成功无业务数据返回 一级
*/
- (void)bbasm_callBackForSuccess;
/**
调用成功且有业务数据返回 一级
@param data 业务数据
*/
- (void)bbasm_callBackForSuccess:(NSDictionary *)data;
/**
一级回调 设备不支持
*/
- (void)bbasm_callBackForDeviceNotSupport;
/**
调用失败 一级
@param status 错误码
@param message 错误描述
*/
- (void)bbasm_callBackForFailWithStatus:(NSString *)status
message:(NSString *)message;
/**
调用失败 二级
@param status 错误码
@param message 错误描述
*/
- (void)bbasm_secondCallBackForFailWithStatus:(NSString *)status
message:(NSString *)message;
/**
* @brief 调用失败 二级,可以传递data
*
* @param status 错误码
* @param message 错误描述
* @param data 业务数据
*/
- (void)secondCallBackForFailWithStatus:(NSString *)status
message:(NSString *)message
data:(NSDictionary *)data;
/**
调用成功 二级回调
@param data 业务数据
*/
- (void)bbasm_secondCallBackForSuccessWithData:(NSDictionary *)data;
/**
调用成功 二级回调
@param data 业务数据
@param jsMethod js方法名
*/
- (void)bbasm_secondCallBackForSuccessWithData:(NSDictionary *)data
callBackMethod:(NSString *)jsMethod;
/**
调用成功无业务数据返回 二级
*/
- (void)bbasm_secondCallBackForSuccess;
/**
二级回调 无业务数据
@param status 状态码
@param messag 描述
@param jsMethod 回调方法名
*/
- (void)bbasm_secondCallBackWithStatus:(NSString *)status
message:(NSString *)messag
jsMethod:(NSString *)jsMethod;
@end