package com.tenlionsoft.baselib.constant;

import android.os.Environment;


import com.tenlionsoft.baselib.app.BaseAppContext;
import com.tenlionsoft.baselib.core.beans.SubtitleLanguage;

import java.io.File;


/**
 * @Time: 2021/5/31
 * @Author: isoftstone
 * @Description:页面相关常规
 */
public class ConstantsV2 {
    /***
     *魔法int值：
     */
    public static final int NUMBER_0 = 0;
    public static final int NUMBER_1 = 1;
    public static final int NUMBER_2 = 2;
    public static final int NUMBER_3 = 3;
    public static final int NUMBER_4 = 4;
    public static final int NUMBER_6 = 6;
    public static final int NUMBER_7 = 7;
    public static final int NUMBER_8 = 8;
    public static final int NUMBER_10 = 10;
    public static final int NUMBER_13 = 13;
    public static final int NUMBER_15 = 15;
    public static final int NUMBER_21 = 21;
    public static final int NUMBER_30 = 30;
    public static final int NUMBER_32 = 32;
    public static final int NUMBER_127 = 127;
    public static final int NUMBER_128 = 128;
    public static final int NUMBER_192 = 192;
    public static final int NUMBER_255 = 255;
    public static final int NUMBER_256 = 256;
    public static final int NUMBER_350 = 350;
    public static final int NUMBER_500 = 500;
    public static final int NUMBER_2000 = 2000;

    /**
     * SplashActivityV2闪屏页相关常量
     */
    public static final String RINGING_FILE = "ringing.wav";
    public static final String RING_BACK_FILE = "ring_back.wav";
    public static final String BMP_FILE = "CameraBlack.BMP";
    public static final String CLOUNDLINK = "HWCloudLink";
    public static final String ANNOT_FILE = "annotImages";
    public static final int REQUEST_IGNORE_BATTERY_OPTIMIZATIONS = 102;

    /**
     * MainActivity页面相关常量
     */
    public static final String MAIN_SITE_URL = "site_url";
    public static final String MAIN_SITE_RANDOM = "random";
    /**
     * 会议fragment tag
     */
    public static final String MEETING_FRAGMENT = "meeting_fragment";
    /**
     * 联系人fragment tag
     */
    public static final String CONTACT_FRAGMENT = "contact_fragment";
    /**
     * 我的fragment tag
     */
    public static final String MINE_FRAGMENT = "mine_fragment";
    /**
     * 会议索引
     */
    public static final int FRAGMENT_MEETING = 0;
    /**
     * 联系人索引
     */
    public static final int FRAGMENT_CONTACTS = 1;
    /**
     * 我的索引
     */
    public static final int FRAGMENT_MINE = 2;

    /**
     * 邮箱正则表达式
     */
    public static final String EMAIL_REGULAR =
        "^([a-z0-9A-Z]+[-|\\.]?)+[a-z0-9A-Z]@([a-z0-9A-Z]+(-[a-z0-9A-Z]+)?\\.)+[a-zA-Z]{2,}$";

    /**
     * 联系人添加方式
     */
    public static final String CONTACT_ADD_TYPE = "LocalContact";

    /**
     * 我的页面相关常量
     */
    public static final String USER_DISPLAY_NAME = "GetUserInfo_DisplayName";
    public static final String USER_TERMINAL = "GetUserInfo_Terminal";
    public static final String SYMBOL_AT = "@";

    /**
     * 查询会议列表结束时间，大于这个时间，底层时间转换失败
     */
    public static final String QUERY_END_TIME = "2037-12-31 23:59:59";

    public static final int CONSTANTSV2_ZERO = 0;
    public static final int CONSTANTSV2_ONE = 1;
    public static final int CONSTANTSV2_TWO = 2;
    public static final int CONSTANTSV2_THREE = 3;
    public static final int CONSTANTSV2_FOUR = 4;
    public static final int CONSTANTSV2_FIVE = 5;
    public static final int CONSTANTSV2_SIX = 6;
    public static final int CONSTANTSV2_SEVEN = 7;
    public static final int CONSTANTSV2_EIGHT = 8;
    public static final int CONSTANTSV2_NINE = 9;
    public static final int CONSTANTSV2_TEN = 10;
    /**
     * 登录页面相关常量
     */
    public static final int PASSWORD_MAX_LENGTH = 32;
    public static final int VIDEO_DEFINITION_POLICY = 2;
    public static final int LOGIN_STATUS_CODE_255 = 255;
    public static final int LOGIN_STATUS_CODE_5 = 5;
    public static final String LOGIN_STATUS_CODE_0 = "0";
    public static final String LOGIN_STATUS_CODE_1 = "1";
    public static final String LOGIN_LOWER_BAR = "_";
    public static final int LOGIN_SERVER_PORT_5061 = 5061;
    public static final int CERT_TYPE_1 = 1;
    public static final int CERT_TYPE_2 = 2;

    /**
     * 延迟处理时间相关常量
     */
    public static final int DELAY_MILLIS_100 = 100;
    public static final int DELAY_MILLIS_500 = 500;
    public static final int DELAY_MILLIS_600 = 600;
    public static final int DELAY_MILLIS_1000 = 1000;
    public static final int DELAY_MILLIS_1500 = 1500;
    public static final int DELAY_MILLIS_2000 = 2000;

    /**
     * 链接入会传递参数key
     */
    public static final String KEY_SITE_URL = "site_url";
    public static final String KEY_RANDOM = "random";
    /**
     * 本地存储帐号key
     */
    public static final String KEY_ACCOUNT = "account";
    /**
     * 本地账号存储文件名
     */
    public static final String PREFS_ACCOUNT = "prefs_account";
    /**
     * 企业通讯录跳转参数key
     */
    public static final String PARAM_ENTERPRISE_ADDRESS_BOOK = "param_enterprise_address_book";
    /**
     * 搜索页面跳转参数key
     */
    public static final String PARAM_SEARCH_CONTACT = "param_search_contact";

    /**
     * 隐私说明页面相关常量
     */
    public static final String PRIVACY_STATEMENT_CHINESE = "file:///android_asset/privacy.html";
    public static final String PRIVACY_STATEMENT_EN = "file:///android_asset/privacy_en.html";
    /**
     * 登录设置页面相关常量
     */
    public static final String LOGIN_SET_BEFORE_LOGIN = "before_login";
    public static final String SERVER_PORT_5060 = "5060";
    public static final String SERVER_PORT_5061 = "5061";
    public static final String SERVER_HTTP_PORT_443 = "443";
    public static final int MAX_SERVER_PORT = 65535;
    public static final String MAX_SERVER_PORT_STR = "65535";
    public static final int SERVER_ADDRESS_LENGTH = 256;
    public static final int SERVER_PORT_LENGTH = 5;
    /**
     * 意见反馈页面相关常量
     */
    public static final String LOG_ZIP_FILES = Environment.getExternalStorageDirectory() +
        "/Zip_CloudLink_Log/";
    public static final String LOG_OLD_FILES = Environment.getExternalStorageDirectory() +
        "/CloudLink_Log";
    public static final String BMP_FILE_PATH = BaseAppContext.getInstance().getFilesDir() +
        File.separator + BMP_FILE;
    public static final String CLOUD_LINK_AUTHORITY = "com.isoftstone.cloundlink";
    public static final int REQUEST_CODE_CHOOSE_PHOTO_ALBUM = 233;
    public static final int REQUEST_CODE_TAKE_PICTURE = 234;
    public static final double LOG_MAX_SIZE = 600.0;
    public static final String SIMPLE_DATE_FORMAT = "yyyy-MM-dd";
    public static final String CONTENT_LENGTH_LIMIT = "/200";
    public static final String STRING_NULL = "null";
    /**
     * 设置新密码界面相关常量
     */
    public static final String RULE_COMMA = ",";
    public static final String RULE_COLON = " ";
    public static final String RULE_UPPERCASE_LETTER = ".*[A-Z]+.*";
    public static final String RULE_LOWER_CASE_LETTERS = ".*[a-z]+.*";
    public static final String RULE_DIGITAL = ".*[0-9]+.*";
    public static final String RULE_SPECIAL_CHARACTERS =
        ".*[`~!@#$%^&*()+=|{}':;',\\\\[\\\\].<>/?~！{}【】‘；：”“’。，、？\\\\\\\\]+.*";

    /**
     * 修改密码返回状态值: 系统不支持修改密码
     */
    public static final int CHANG_PWD_0X2000018 = 0x2000018;
    /**
     * 修改密码返回状态值: 旧密码错误
     */
    public static final int CHANG_PWD_0X2000019 = 0x2000019;
    /**
     * 修改密码返回状态值: 新密码长度非法
     */
    public static final int CHANG_PWD_0X200001A = 0x200001A;
    /**
     * 修改密码返回状态值: 新密码复杂度不满足要求
     */
    public static final int CHANG_PWD_0X200001B = 0x200001B;
    /**
     * 修改密码返回状态值: 新密码不能与最近旧密码相同
     */
    public static final int CHANG_PWD_0X200001C = 0x200001C;
    /**
     * 修改密码返回状态值: 新密码不能包含3个以上重复字符
     */
    public static final int CHANG_PWD_0X200001D = 0x200001D;
    /**
     * 修改密码返回状态值: 上次修改密码后5分钟内不能更新密码
     */
    public static final int CHANG_PWD_0X200001E = 0x200001E;
    /**
     * 修改密码返回状态值: 密码不能包含帐号或其逆序帐号
     */
    public static final int CHANG_PWD_0X200001F = 0x200001F;
    /**
     * 修改密码返回状态值: 新密码相较于旧密码至少要有两个不同的字符
     */
    public static final int CHANG_PWD_0X2000020 = 0x2000020;
    /**
     * 修改密码返回状态值: 用户名或者密码错误
     */
    public static final int CHANG_PWD_0X2000022 = 0x2000022;
    /**
     * 修改密码返回状态值: 用户已被锁定
     */
    public static final int CHANG_PWD_0X2000023 = 0x2000023;
    /**
     * 修改密码返回状态值: 新密码不能和旧密码相同
     */
    public static final int CHANG_PWD_0X2000035 = 0x2000035;
    /**
     * 修改密码返回状态值: 密码过于简单或不安全
     */
    public static final int CHANG_PWD_0X2000041 = 0x2000041;

    /**
     * 增加40秒后自动隐藏dialog机制，避免服务端丢失某个请求结果
     */
    public static final long LOAD_OVER_TIME = 40;

    /**
     * 清晰度设置：高清
     */
    public static final String VIDEO_DEFINITION_1 = "1";
    /**
     * 清晰度设置：普清
     */
    public static final String VIDEO_DEFINITION_2 = "2";

    /**
     * 帮助与反馈页面传值
     */
    public static final String PARAMS_HELP_TITLE = "params_help_title";

    /**
     * 发起、加入会议
     */
    public static final String VIDEO = "_VIDEO";
    public static final String AUDIO = "_AUDIO";
    public static final String SUBTITLE = "_SUBTITLE";
    public static final String IS_VIDEO = "isVideo";
    public static final String IS_AUDIO = "isAudio";
    public static final String ACTION = "action";

    /**
     * 最大分钟，秒钟数
     */
    public static final int MAX_MINUTE_VALUE = 59;
    /**
     * 分钟数
     */
    public static final int MINUTE_VALUE = 60;
    /**
     * 会议显示最大小时数
     */
    public static final int MAX_HOUR_VALUE = 99;

    /**
     * 会议字幕相关常量
     */
    public static final String MEETING_HIGH_SETTING_SUBTITLE = "isSubtitle";
    public static final String MEETING_HIGH_SETTING_SUBTITLE_LANGUAGE = "subtitle_language";
    public static final String MEETING_CAPTION_ENABLE = "isSubtitleEnable";
    public static final String MEETING_CONF_CAPTION_ENABLE = "isConfSubtitleEnable";
    public static final String MEETING_CONF_CAPTION_SHOWING = "isSubtitleShowing";
    /**
     * 默认0值
     */
    public static final int ERO_VALUE = 0;
    /**
     * 默认北京时间时区
     */
    public static final String DEFAULT_TIME_ZONE_ID = "58";

    /**
     * SMC3.0 区分会议室和与会人 1 会议室
     */
    public static final String ATTENDEE_TYPE_CONF_ROOM = "1";

    /**
     * SMC3.0 区分会议室和与会人 5 与会人
     */
    public static final String ATTENDEE_TYPE_ATTENDEES = "5";
    /**
     * 默认时区偏移值
     */
    public static final int DEFAULT_TIME_OFFSET = 28800000;

    /**
     * 会议主题最大长度
     */
    public static final int SUBJECT_MAX_LENGTH = 64;

    /**
     * 密码最小长度
     */
    public static final int PASSWORD_MIN_LENGTH = 6;
    /**
     * 3.0 预约会议人数限制512
     */
    public static final int BOOK_MAX_NUMBER_3 = 512;
    /**
     * 2.0 预约会议人数限制30
     */
    public static final int BOOK_MAX_NUMBER_2 = 30;

    /**
     * 预约会议默认小时
     */
    public static final String MEETING_DEFAULT_TIME = "1 ";

    /**
     * 是否视频会议
     */
    public static final String IS_VIDEO_CONF = "isVideoConf";
    /**
     * 时区id
     */
    public static final String TIME_ZINE_ID = "timeZoneId";
    /**
     * 判断是否是Vmr标志
     */
    public static final String IS_VMR = "isVmr";
    /**
     * 判断是否是Vmr开启标志
     */
    public static final String IS_SWITCH_VMR = "isSwitchVmr";
    /**
     * 时区间隔时间
     */
    public static final String TIME_OFFSET = "timeOffset";


    public static final String MEETING_TYPE = "type";

    /**
     * 是否查询会议列表
     */
    public static final String IS_QUERY_MEETING_LIST = "isqueryMeetingList";

    public static final SubtitleLanguage[] LANGUAGE_LIST_DATA = {
        new SubtitleLanguage(1, "中文"),
        new SubtitleLanguage(0, "English")};

    /**
     * 会议高级设置请求码
     */
    public static final int MEETING_HIGH_SETTING_CODE = 10005;
    /**
     * 会议管理员
     */
    public static final String CONF_ADMIN = "confAdmin";

    /**
     * 是否支持会议字幕
     */
    public static final String IS_SUPPORT_SUBTITLE = "_isSupportSubtitle";

    /**
     * 会议控制->与会人员相关
     */
    public static final int MEMBER_LIST_TYPE_MAIN = 0;
    public static final int MEMBER_LIST_TYPE_SPEC = 1;
    public static final int MEMBER_LIST_TYPE_NUM = 2;
    public static final int MEMBER_LIST_TYPE_EN = 3;
    public static final String MEMBER_LIST_SORT_FIRST = "-1";
    public static final String MEMBER_LIST_SORT_SECOND = "-2";
    public static final String MEMBER_LIST_SORT_THIRD = "-3";
    public static final String MEMBER_LIST_SORT_FOURTH = "-4";
    public static final String MEMBER_LIST_SORT_FIFTH = "-5";
    public static final String MEMBER_LIST_GENDER_3 = "3";
    public static final String MEMBER_LIST_GENDER_6 = "6";
    public static final String MEMBER_LIST_GENDER_7 = "7";
    public static final long MEMBER_LIST_LOAD_DELAY = 500L;

    /**
     * 举手失败
     */
    public static final int PARTICIPANTS_ERROR_CODE_HAND_UP = 67109039;

    /**
     * 申请主持人失败
     */
    public static final int PARTICIPANTS_ERROR_CODE_REQUEST_CHAIRMAN = 67109022;

    /**
     * 申请主持人失败,需要密码
     */
    public static final int PARTICIPANTS_REQUEST_CHAIRMAN_NEED_PWD = 67109017;

    /**
     * 联系人列表->联系人分组显示相关
     */
    public static final int CONTACT_LIST_TYPE_ITEM = 0;
    public static final int CONTACT_LIST_TYPE_TITLE = 1;
    public static final int CONTACT_LIST_TYPE_GROUP = 2;
    public static final int CONTACT_LIST_TYPE_LOOK_MORE = 3;
    public static final int CONTACT_LIST_TYPE_LOAD_MORE = 4;
    public static final int CONTACT_LIST_FIRST_LOAD_LIMIT = 5;
    public static final int CONTACT_LIST_LOAD_MAX_SIZE = 50;
    public static final long CONTACT_LIST_LOAD_DELAY = 500L;
    public static final long CONTACT_LIST_SEARCH_DELAY = 1000L;
    public static final float CONTACT_LIST_FLOAT_0_5 = 0.5F;
}
