提交 | 用户 | 时间
|
149dd0
|
1 |
package com.iailab.netsdk.lib.enumeration; |
H |
2 |
|
|
3 |
/** |
|
4 |
* @author 47081 |
|
5 |
* @version 1.0 |
|
6 |
* @description 平台呼出类型 |
|
7 |
* @date 2021/2/22 |
|
8 |
*/ |
|
9 |
public enum NET_EM_OFFLINE_CALL_TYPE { |
|
10 |
/** 未知 */ |
|
11 |
NET_EM_OFFLINE_CALL_UNKNOWN(-1, "未知"), |
|
12 |
/** 在线呼出 */ |
|
13 |
NET_EM_OFFLINE_CALL_ONLINECALL(0, "在线呼出"), |
|
14 |
/** 断线呼出 */ |
|
15 |
NET_EM_OFFLINE_CALL_OFFLINECALL(1, "断线呼出"), |
|
16 |
/** 其他 */ |
|
17 |
NET_EM_OFFLINE_CALL_NONE(255, "其他"); |
|
18 |
private int type; |
|
19 |
private String desc; |
|
20 |
|
|
21 |
NET_EM_OFFLINE_CALL_TYPE(int type, String desc) { |
|
22 |
this.type = type; |
|
23 |
this.desc = desc; |
|
24 |
} |
|
25 |
|
|
26 |
public int getType() { |
|
27 |
return type; |
|
28 |
} |
|
29 |
|
|
30 |
public String getDesc() { |
|
31 |
return desc; |
|
32 |
} |
|
33 |
|
|
34 |
public static NET_EM_OFFLINE_CALL_TYPE getOfflineCallType(int type) { |
|
35 |
for (NET_EM_OFFLINE_CALL_TYPE offlineCall : NET_EM_OFFLINE_CALL_TYPE.values()) { |
|
36 |
if (offlineCall.type == type) { |
|
37 |
return offlineCall; |
|
38 |
} |
|
39 |
} |
|
40 |
return NET_EM_OFFLINE_CALL_UNKNOWN; |
|
41 |
} |
|
42 |
} |