导航菜单

页面标题

页面副标题

夜猫麻将 v24.1.1 - TMGCallbackHelper.java 源代码

正在查看: 夜猫麻将 v24.1.1 应用的 TMGCallbackHelper.java JAVA 源代码文件

本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。


package com.gme.TMG;

import android.content.Intent;
import java.util.Map;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;

public class TMGCallbackHelper {
    static Intent GetCallBackIntent(int nRet, String strErrMsg) {
        Intent it = new Intent();
        it.putExtra("result", nRet);
        it.putExtra("error_info", strErrMsg);
        return it;
    }

    static Intent GetUpdateInfoIntent(int eventId, String[] identifierList) {
        Intent it = new Intent();
        it.putExtra("event_id", eventId);
        it.putExtra("user_list", identifierList);
        return it;
    }

    static Intent GetAudioDeviceIntent(boolean bStateOpen, int nErrCode) {
        Intent it = new Intent();
        it.putExtra("audio_state", bStateOpen);
        it.putExtra("audio_errcode", nErrCode);
        return it;
    }

    static Intent GetRequestVideoIntent(String[] identifierList, int nRet, String strErrMsg) {
        Intent it = new Intent();
        it.putExtra("result", nRet);
        it.putExtra("error_info", strErrMsg);
        it.putExtra("user_list", identifierList);
        return it;
    }

    static Intent GetPTTRecordIntent(int nRet, String strFilePath) {
        Intent it = new Intent();
        it.putExtra("result", nRet);
        it.putExtra("file_path", strFilePath);
        return it;
    }

    static Intent StreamingRecIntennt(int nRet, String strFilePath, String Voice_Url, String text) {
        Intent it = new Intent();
        it.putExtra("result", nRet);
        it.putExtra("file_path", strFilePath);
        it.putExtra("file_id", Voice_Url);
        it.putExtra("text", text);
        return it;
    }

    static Intent GetPTTUploadIntent(int nRet, String strFilePath, String strFileID) {
        Intent it = new Intent();
        it.putExtra("result", nRet);
        it.putExtra("file_path", strFilePath);
        it.putExtra("file_id", strFileID);
        return it;
    }

    static Intent GetPTTDownloadIntent(int nRet, String strFilePath, String strFileID, String auditResult) {
        Intent it = new Intent();
        it.putExtra("result", nRet);
        it.putExtra("file_path", strFilePath);
        it.putExtra("file_id", strFileID);
        it.putExtra("audit_result", auditResult);
        return it;
    }

    static Intent GetSpeechToTextIntent(int nRet, String strFilePath, String text, String auditResult, String targetText) {
        Intent it = new Intent();
        it.putExtra("result", nRet);
        it.putExtra("file_id", strFilePath);
        it.putExtra("text", text);
        it.putExtra("audit_result", auditResult);
        it.putExtra("target_result", targetText);
        return it;
    }

    static Intent GetTranslateTextIntent(int nRet, String translatedText) {
        Intent it = new Intent();
        it.putExtra("result", nRet);
        it.putExtra("translatedText", translatedText);
        return it;
    }

    static Intent GetAccompanyFinishIntent(int nRet, boolean is_finished, String filePath) {
        Intent it = new Intent();
        it.putExtra("result", nRet);
        it.putExtra("file_path", filePath);
        it.putExtra("is_finished", is_finished);
        return it;
    }

    static Intent GetCameraDeviceIntent(boolean bStateOpen, int nCamearID, int nErrCode) {
        Intent it = new Intent();
        it.putExtra("video_state", bStateOpen);
        it.putExtra("camera_id", nCamearID);
        it.putExtra("video_errcode", nErrCode);
        return it;
    }

    static Intent GetRoomTypeChangedEventIntent(int nRet, int subtype, int nNewRoomType, String strErrMsg) {
        Intent it = new Intent();
        it.putExtra("result", nRet);
        it.putExtra("sub_event_type", subtype);
        it.putExtra("new_room_type", nNewRoomType);
        it.putExtra("error_info", strErrMsg);
        return it;
    }

    static Intent GetBadQualityEventIntent(int nWeight, double fLoss, int nDelay) {
        Intent it = new Intent();
        it.putExtra("weight", nWeight);
        it.putExtra("loss", fLoss);
        it.putExtra("delay", nDelay);
        return it;
    }

    static Intent GetAudioStreamsEventIntent(int audioStreams) {
        Intent it = new Intent();
        it.putExtra("AudioStreams", audioStreams);
        return it;
    }

    static Intent GetRoomShareEventIntent(int audioStreams) {
        Intent it = new Intent();
        it.putExtra("result", audioStreams);
        return it;
    }

    static Intent GetNumeberOfUsersEventIntent(int AllUsers, int AccUsers, int ProxyUsers) {
        Intent it = new Intent();
        it.putExtra("AllUser", AllUsers);
        it.putExtra("AccUser", AccUsers);
        it.putExtra("ProxyUser", ProxyUsers);
        return it;
    }

    static Intent GetMapIntent(Map<String, Integer> map) {
        Intent it = new Intent();
        for (String key : map.keySet()) {
            int Value = map.get(key).intValue();
            it.putExtra(key, Value);
        }
        return it;
    }

    static Intent GetText2SpeechIntennt(int code, boolean isCos, String fileID) {
        Intent it = new Intent();
        it.putExtra("result", code);
        it.putExtra("is_cos", isCos);
        it.putExtra("file_id", fileID);
        return it;
    }

    static Intent GetFetchVoiceListJson(int retCode, String json) {
        Intent it = new Intent();
        it.putExtra("result", retCode);
        try {
            JSONObject root = new JSONObject(json);
            JSONArray voiceListJson = root.getJSONArray("voice_list");
            String[] voiceList = new String[voiceListJson.length()];
            for (int i = 0; i < voiceList.length; i++) {
                voiceList[i] = voiceListJson.getString(i);
            }
            it.putExtra("voiceList", voiceList);
        } catch (JSONException e) {
        }
        return it;
    }
}