HDSReportClient.h 2.21 KB
Newer Older
Han Ruisong's avatar
Han Ruisong committed
1
2
3
4
5
6
7
8
9
10
//
//  HDSReportClient.h
//  CCFuncTool
//
//  Created by Chenfy on 2020/2/7.
//  Copyright © 2020 com.class.chenfy. All rights reserved.
//

#import <Foundation/Foundation.h>

Hanruisong's avatar
Hanruisong committed
11
12
13
14
15
16
17
18
19
20
//日志类别
typedef NS_ENUM(int, CCErrorLevel) {
    CCErrorLevel_VERBOSE = 2,
    CCErrorLevel_DEBUG = 3,
    CCErrorLevel_INFO = 4,
    CCErrorLevel_WARN = 5,
    CCErrorLevel_ERROR = 6,
    CCErrorLevel_ASSERT = 7,
};

Han Ruisong's avatar
Han Ruisong committed
21
22
23
24
25
NS_ASSUME_NONNULL_BEGIN

#pragma mark -- 云课堂使用
@interface HDSReportInfo : NSObject
@property(nonatomic,assign)NSTimeInterval responseTime;
Hanruisong's avatar
Hanruisong committed
26
27
28
@property(nonatomic,assign)CCErrorLevel   level;
@property(nonatomic,copy)NSString         *socketUrl;

Han Ruisong's avatar
Han Ruisong committed
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
//基本数据
@property(nonatomic,copy)NSString       *var_business;
@property(nonatomic,copy)NSString       *var_appVer;

@property(nonatomic,copy)NSString       *var_cdn;
@property(nonatomic,copy)NSString       *var_appid;
@property(nonatomic,copy)NSDictionary   *var_device;
@property(nonatomic,assign)int          var_serviceplatform;

@property(nonatomic,copy)NSString       *var_roomid;
@property(nonatomic,copy)NSString       *var_role;
@property(nonatomic,copy)NSString       *var_userid;
@property(nonatomic,copy)NSString       *var_username;
//事件数据
@property(nonatomic,copy)NSString       *event_event;
@property(nonatomic,assign)int          event_code;
@property(nonatomic,copy)NSString       *event_msg;
//data
Hanruisong's avatar
Hanruisong committed
47
48
49
50
51
@property(nonatomic,strong)NSDictionary   *event_data_requestmsg;
@property(nonatomic,strong)NSDictionary   *event_data_responsemsg;
@property(nonatomic,strong)NSDictionary   *event_data_stream;
@property(nonatomic,strong)NSDictionary   *event_data_pusher;
@property(nonatomic,strong)NSDictionary   *event_data_heartBeat;
Han Ruisong's avatar
Han Ruisong committed
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

@end

@interface HDSReportClient : NSObject
#pragma mark -- 新版API
/**
 * @param business 业务类型
 * @param sdkVer sdk版本号
 */
- (void)envInit:(NSString *)business version:(NSString *)sdkVer;

/**
 * 设置基础参数
 * @param baseInfo 基础信息
 */
- (void)setBaseInfo:(NSDictionary *)baseInfo;

/**
 * 日志上报
 * @param extraInfo 业务信息
 */
- (void)logReport:(NSDictionary *)extraInfo;


#pragma mark -- 旧版API
/** 云课堂旧版本使用 */
- (void)reportLogInfo:(HDSReportInfo *)info;

@end

NS_ASSUME_NONNULL_END