BBAJSConsole.h
1.3 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
//
// BBAJSConsole.h
// SWAN
//
// Created by baidu on 2018/8/9.
// Copyright © 2018年 baidu. All rights reserved.
//
#import <JavaScriptCore/JavaScriptCore.h>
/**
* 控制台输出协议,函数调用方法为console.xxxxxxxx
*/
@protocol BBAMNPJSConsoleExports <JSExport>
/**
* @brief log输出
*
* @param message 输出信息
*/
- (JSValue *)log:(JSValue *)message;
/**
* @brief info信息输出
*
* @param message 输出信息
*/
- (JSValue *)info:(JSValue *)message;
/**
* @brief debug信息输出
*
* @param message 输出信息
*/
- (JSValue *)debug:(JSValue *)message;
/**
* @brief warn信息输出
*
* @param message 输出信息
*/
- (JSValue *)warn:(JSValue *)message;
/**
* @brief error信息输出
*
* @param message 输出信息
*/
- (JSValue *)error:(JSValue *)message;
- (JSValue *)group:(JSValue *)message;
- (JSValue *)groupEnd:(JSValue *)message;
/**
* @brief 启动计时器
*
* @param timerId 计时器id
*/
- (NSString *)time:(JSValue *)timerId;
/**
* @brief 停止计时器,返回对应计时器id的计时时间
*
* @param timerId 计时器id
* @return 成功返回计时时间,失败返回-1
*/
- (NSString *)timeEnd:(JSValue *)timerId;
@end
/**
* 封装控制台log
*
*/
@interface BBAJSConsole : NSObject <BBAMNPJSConsoleExports>
@end