BBASMPlugin+GlobalStorage.h
5.83 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
121
122
123
124
125
126
127
128
129
130
131
132
133
//
// BBASMPlugin+GlobalStorage.h
// BBAMNP
//
// Created by baidu on 2020/10/16.
//
#import "BBASMPlugin.h"
@interface BBASMPlugin (GlobalStorage)
/**
* 描 述: 将 data 存储在本地缓存中指定的 key 中
* 示 例: baiduboxapp://swanAPI/setGlobalStorage?params=\$params&callback=\$callback
* 文 档: http://ft.baidu.com/#/scheme/swan_setglobalstorage
* 备 注:
* ********** description ************
* @name: boxjs.setGlobalStorage
* @authority: swanAPI
* @path: /setGlobalStorage
* @args: [{"name": "key", "value": "string"}, {"name": "data", "value": "*"}]
* @config: {"swan": {"web": {"invoke": "swan.message.url", "handler": "bridge"}, "jsc": {"invoke": "swan.method.json", "method": "_naSwan.bridge.globalStorage.setGlobalStorage"}}}
*/
- (void)setGlobalStorage:(BBASchemeDispatcher *)dispatcher;
/**
* 描 述: 将 data 存储在本地缓存中指定的 key 中
* 示 例: baiduboxapp://swanAPI/setGlobalStorageSync?params=\$params&callback=\$callback
* 文 档: http://ft.baidu.com/#/scheme/swan_setglobalstoragesync
* 备 注:
* ********** description ************
* @name: boxjs.setGlobalStorageSync
* @authority: swanAPI
* @path: /setGlobalStorageSync
* @args: [{"name": "key", "value": "string"}, {"name": "data", "value": "*"}]
* @config: {"swan": {"web": {"invoke": "swan.prompt"}, "jsc": {"invoke": "swan.method.json", "method": "_naSwan.bridge.setGlobalStorageSync"}}}
*/
- (void)setGlobalStorageSync:(BBASchemeDispatcher *)dispatcher;
/**
* 描 述: 从本地缓存中异步获取指定 key 对应的内容
* 示 例: baiduboxapp://swanAPI/getGlobalStorage?params=\$params&callback=\$callback
* 文 档: http://ft.baidu.com/#/scheme/swan_getglobalstorage
* 备 注:
* ********** description ************
* @name: boxjs.getGlobalStorage
* @authority: swanAPI
* @path: /getGlobalStorage
* @args: [{"name": "key", "value": "string"}]
* @config: {"swan": {"web": {"invoke": "swan.message.url", "handler": "bridge"}, "jsc": {"invoke": "swan.method.json", "method": "_naSwan.bridge.globalStorage.getGlobalStorage"}}}
*/
- (void)getGlobalStorage:(BBASchemeDispatcher *)dispatcher;
/**
* 描 述: 从本地缓存中同步获取指定 key 对应的内容
* 示 例: baiduboxapp://swanAPI/getGlobalStorageSync?params=\$params&callback=\$callback
* 文 档: http://ft.baidu.com/#/scheme/swan_getglobalstoragesync
* 备 注:
* ********** description ************
* @name: boxjs.getGlobalStorageSync
* @authority: swanAPI
* @path: /getGlobalStorageSync
* @args: [{"name": "key", "value": "string"}]
* @config: {"swan": {"web": {"invoke": "swan.prompt"}, "jsc": {"invoke": "swan.method.json", "method": "_naSwan.bridge.getGlobalStorageSync"}}}
*/
- (void)getGlobalStorageSync:(BBASchemeDispatcher *)dispatcher;
/**
* 描 述: 异步获取当前storage的相关信息
* 示 例: baiduboxapp://swanAPI/getStorageInfo?params=\$params&callback=\$callback
* 文 档: http://ft.baidu.com/#/scheme/swan_getglobalstorageinfo
* 备 注:
* ********** description ************
* @name: boxjs.getGlobalStorageInfo
* @authority: swanAPI
* @path: /getGlobalStorageInfo
* @args: []
* @config: {"swan": {"web": {"invoke": "swan.message.url", "handler": "bridge"}, "jsc": {"invoke": "swan.method.json", "method": "_naSwan.bridge.globalStorage.getGlobalStorageInfo"}}}
*/
- (void)getGlobalStorageInfo:(BBASchemeDispatcher *)dispatcher;
/**
* 描 述: 同步获取当前storage的相关信息
* 示 例: baiduboxapp://swanAPI/getGlobalStorageInfoSync?params=\$params&callback=\$callback
* 文 档: http://ft.baidu.com/#/scheme/swan_getglobalstorageinfosync
* 备 注:
* ********** description ************
* @name: boxjs.getGlobalStorageInfoSync
* @authority: swanAPI
* @path: /getGlobalStorageInfoSync
* @args: []
* @config: {"swan": {"web": {"invoke": "swan.prompt"}, "jsc": {"invoke": "swan.method.json", "method": "_naSwan.bridge.getGlobalStorageInfoSync"}}}
*/
- (void)getGlobalStorageInfoSync:(BBASchemeDispatcher *)dispatcher;
/**
* 描 述: 从本地缓存中异步移除指定 key
* 示 例: baiduboxapp://swanAPI/removeGlobalStorage?params=\$params&callback=\$callback
* 文 档: http://ft.baidu.com/#/scheme/swan_removeglobalstorage
* 备 注:
* ********** description ************
* @name: boxjs.removeGlobalStorage
* @authority: swanAPI
* @path: /removeGlobalStorage
* @args: [{"name": "key", "value": "string"}]
* @config: {"swan": {"web": {"invoke": "swan.message.url", "handler": "bridge"}, "jsc": {"invoke": "swan.method.json", "method": "_naSwan.bridge.globalStorage.removeGlobalStorage"}}}
*/
- (void)removeGlobalStorage:(BBASchemeDispatcher *)dispatcher;
/**
* 描 述: 从本地缓存中同步移除指定 key
* 示 例: baiduboxapp://swanAPI/removeGlobalStorageSync?params=\$params&callback=\$callback
* 文 档: http://ft.baidu.com/#/scheme/swan_removeglobalstoragesync
* 备 注:
* ********** description ************
* @name: boxjs.removeGlobalStorageSync
* @authority: swanAPI
* @path: /removeGlobalStorageSync
* @args: [{"name": "key", "value": "string"}]
* @config: {"swan": {"web": {"invoke": "swan.prompt"}, "jsc": {"invoke": "swan.method.json", "method": "_naSwan.bridge.removeGlobalStorageSync"}}}
*/
- (void)removeGlobalStorageSync:(BBASchemeDispatcher *)dispatcher;
#pragma mark - not API
+ (NSDictionary *)getGlobalStorageWithAppID:(NSString *)appID param:(NSDictionary *)param actionName:(NSString *)action;
+ (NSDictionary *)setGlobalStorageWithAppID:(NSString *)appID param:(NSDictionary *)param actionName:(NSString *)action;
+ (NSDictionary *)removeGlobalStorageWithAppID:(NSString *)appID param:(NSDictionary *)param actionName:(NSString *)action;
+ (NSDictionary *)getGlobalStorageInfoWithAppID:(NSString *)appID actionName:(NSString *)action;
@end