BBASMHostDownloadBridge.h 2.74 KB
//
//  BBASMHostDownloadBridge.h
//  BBAMNP
//
//  Created by baidu on 2021/6/1.
//

#import <BBAMNP/BBAMNP.h>

NS_ASSUME_NONNULL_BEGIN

@protocol BBASMHostDownloadBridgeExports <JSExport>

/**
 * 描  述: 小程序宿主下载能力-下载文件
 * 示  例: _naSwan.bridge.hostDownloadBridge.download(params)
 * 文  档: http://es.baidu-int.com/index#/apidetail/1532
 * 备  注:
 * ********** description ************
 * @name:      hostDownloadManager.download
 * @authority: swanAPI
 * @path:      /hostDownloadManager/download
 * @args:      [{"name": "cb", "value": "string"}, {"name": "url", "value": "string"}, {"name": "header", "value": "Object="}, {"name": "name", "value": "string="}]
 * @config:    {"swan": {"jsc": {"invoke": "swan.method.json", "method": "_naSwan.bridge.hostDownloadBridge.download"}}}
 */
- (NSDictionary *)download:(JSValue *)params;

/**
 * 描  述: 小程序宿主下载能力-查询下载任务状态
 * 示  例: _naSwan.bridge.hostDownloadBridge.query(params)
 * 文  档: http://es.baidu-int.com/index#/apidetail/1533
 * 备  注:
 * ********** description ************
 * @name:      hostDownloadManager.query
 * @authority: swanAPI
 * @path:      /hostDownloadManager/query
 * @args:      [{"name": "cb", "value": "string"}, {"name": "taskID", "value": "string"}]
 * @config:    {"swan": {"jsc": {"invoke": "swan.method.json", "method": "_naSwan.bridge.hostDownloadBridge.query"}}}
 */
- (NSDictionary *)query:(JSValue *)params;

/**
 * 描  述: 小程序宿主下载能力-打开宿主下载中心页面
 * 示  例: _naSwan.bridge.hostDownloadBridge.openDownloadCenter(params)
 * 文  档: http://es.baidu-int.com/index#/apidetail/1534
 * 备  注:
 * ********** description ************
 * @name:      hostDownloadManager.openDownloadCenter
 * @authority: swanAPI
 * @path:      /hostDownloadManager/openDownloadCenter
 * @args:      []
 * @config:    {"swan": {"jsc": {"invoke": "swan.method.json", "method": "_naSwan.bridge.hostDownloadBridge.openDownloadCenter"}}}
 */
- (NSDictionary *)openDownloadCenter:(JSValue *)params;

/**
 * 描  述: 小程序宿主下载能力-下载文件
 * 示  例: _naSwan.bridge.hostDownloadBridge.openFile(params)
 * 文  档: http://es.baidu-int.com/index#/apidetail/1535
 * 备  注:
 * ********** description ************
 * @name:      hostDownloadManager.openFile
 * @authority: swanAPI
 * @path:      /hostDownloadManager/openFile
 * @args:      [{"name": "cb", "value": "string"}, {"name": "taskID", "value": "string"}]
 * @config:    {"swan": {"jsc": {"invoke": "swan.method.json", "method": "_naSwan.bridge.hostDownloadBridge.openFile"}}}
 */
- (NSDictionary *)openFile:(JSValue *)params;

@end

@interface BBASMHostDownloadBridge : BBASMBaseAPIBridge <BBASMHostDownloadBridgeExports>

@end

NS_ASSUME_NONNULL_END