AVChatExitCode.java 2.58 KB
Newer Older
konghaorui committed
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
package com.yidianling.avchatkit.constant;

/**
 * Created by hzxuwen on 2015/4/24.
 */
public class AVChatExitCode {
    public static final int PEER_HANGUP = 0;

    public static final int PEER_REJECT = 1;

    public static final int HANGUP = 2;

    public static final int NET_CHANGE = 4;

    public static final int REJECT = 5;

    public static final int PEER_BUSY = 6;

    public static final int NET_ERROR = 8;

    public static final int KICKED_OUT = 9;

    public static final int CONFIG_ERROR = 10;

    public static final int PROTOCOL_INCOMPATIBLE_SELF_LOWER = 12;

    public static final int PROTOCOL_INCOMPATIBLE_PEER_LOWER = 13;

    public static final int INVALIDE_CHANNELID = 14;

    public static final int OPEN_DEVICE_ERROR = 15;

    public static final int SYNC_REJECT = 16;

    public static final int SYNC_ACCEPT = 17;

    public static final int SYNC_HANGUP = 18;

    public static final int PEER_NO_RESPONSE = 19; //超时,无人接听

    public static final int CANCEL = 20; //取消

    public static final int LOCAL_CALL_BUSY = 21; // 正在进行本地通话

    public static String getExitString(int code) {
        switch (code) {
            case PEER_HANGUP:
                return "PEER_HANGUP";
            case PEER_REJECT:
                return "PEER_REJECT";
            case HANGUP:
                return "HANGUP";
            case NET_CHANGE:
                return "NET_CHANGE";
            case REJECT:
                return "REJECT";
            case PEER_BUSY:
                return "PEER_BUSY";
            case NET_ERROR:
                return "NET_ERROR";
            case KICKED_OUT:
                return "KICKED_OUT";
            case CONFIG_ERROR:
                return "CONFIG_ERROR";
            case PROTOCOL_INCOMPATIBLE_SELF_LOWER:
                return "PROTOCOL_INCOMPATIBLE_SELF_LOWER";
            case PROTOCOL_INCOMPATIBLE_PEER_LOWER:
                return "PROTOCOL_INCOMPATIBLE_PEER_LOWER";
            case INVALIDE_CHANNELID:
                return "INVALIDE_CHANNELID";
            case OPEN_DEVICE_ERROR:
                return "OPEN_DEVICE_ERROR";
            case SYNC_REJECT:
                return "SYNC_REJECT";
            case SYNC_ACCEPT:
                return "SYNC_ACCEPT";
            case SYNC_HANGUP:
                return "SYNC_HANGUP";
            case CANCEL:
                return "CANCEL";
            case PEER_NO_RESPONSE:
                return "PEER_NO_RESPONSE";
            case LOCAL_CALL_BUSY:
                return "LOCAL_CALL_BUSY";
            default:
                return "UNKNOWN";
        }
    }

}