package com.mogo.cloud.socket;



import static com.mogo.cloud.passport.MoGoAiCloudClientConfig.HTTP_DNS_ENV_DEV;
import static com.mogo.cloud.passport.MoGoAiCloudClientConfig.HTTP_DNS_ENV_QA;

import androidx.annotation.Keep;

import com.mogo.cloud.passport.MoGoAiCloudClient;
import com.mogo.cloud.passport.MoGoAiCloudClientConfig;
import com.zhidao.socket.Environment;

public class SocketServicesConstants {

    public static String getTag() {
        if (MoGoAiCloudClient.getInstance().getAiCloudClientConfig().isUseOriginSocket()) {
            return "MoGoAiCloud_Origin_Socket";
        } else {
            return "MoGoAiCloud_New_Socket";
        }
    }

    /**
     * 建立长链的通道ID
     */
    @Keep
    public static final String SOCKET_CHANNEL_ID = "dataCrawler";

    public static Environment getEnvironment() {
        MoGoAiCloudClientConfig cloudClientConfig = MoGoAiCloudClient.getInstance().getAiCloudClientConfig();
        switch (cloudClientConfig.getNetMode()) {
            case HTTP_DNS_ENV_DEV:
                return Environment.dev;
            case HTTP_DNS_ENV_QA:
                return Environment.qa;
            default:
                return Environment.release;
        }
    }
}
