# -*- coding: utf-8 -*-
"""
This source code file is licensed under the GNU General Public License Version 3.
For full details, please refer to the file "LICENSE.txt" which is provided as part of this source code package.
Copyright (C) 2020 THL A29 Limited, a Tencent company.  All rights reserved.
"""

# msg_id枚举

#与ASM消息
MSG_ID_REGISTER = 1
MSG_ID_UNREGISTER = 2
MSG_ID_REPORT = 3
MSG_ID_CONTROL_REP = 4
MSG_ID_AI_SERVICE_STATE = 5
MSG_ID_AI_TRAIN_SCHEDULE = 6

#与AI Client消息
MSG_ID_NEW_TASK = 1000
MSG_ID_CONTROL_REQ = 1001
MSG_ID_AI_ACTION = 2000
MSG_ID_UI_ACTION = 2001
MSG_ID_GAME_STATE = 2002
MSG_ID_AGENT_STATE = 2003
MSG_ID_RESTART_RESULT = 2004
MSG_ID_CLIENT_REP = 2100
MSG_ID_CLIENT_DATA = 3000
MSG_ID_CHANGE_GAME_STATE = 3001
MSG_ID_PAUSE = 3002
MSG_ID_RESTORE = 3003
MSG_ID_RESTART = 3004
MSG_ID_CLIENT_REQ = 3100

#与Http client消息
MSG_ID_CLIENT_UI_REQ = 3000

# UI识别的游戏状态game_state枚举，语义和原PB协议一致
GAME_STATE_NONE = 0
GAME_STATE_UI = 1
GAME_STATE_START = 2
GAME_STATE_OVER = 3
GAME_STATE_MATCH_WIN = 4

IO_SERVICE_STATE_NONE = -1
IO_SERVICE_STATE_READY = 0
IO_SERVICE_STATE_RUNNING = 1

TASK_STATUS_NONE = -1
TASK_STATUS_INIT_SUCCESS = 0
TASK_STATUS_INIT_FAILURE = 1

# frame_decode_type
RAW_IMG_SEND_TYPE = 0
BINARY_IMG_SEND_TYPE = 1
CV2_EN_DECODE_IMG_SEND_TYPE = 2
BASE_64_DECODE_IMG_SEND_TYPE = 3

ACTION_ID_NONE = -1
ACTION_ID_RESET = 0
ACTION_ID_DOWN = 1
ACTION_ID_UP = 2
ACTION_ID_MOVE = 3
ACTION_ID_CLICK = 4
ACTION_ID_SWIPE = 5
ACTION_ID_SWIPEDOWN = 6
ACTION_ID_SWIPEMOVE = 7

UI_ACTION_CONTACT = 0

CLIENT_REP_CODE_OK = 200
CLIENT_REP_CODE_INVALID_KEY = 300

RESTART_RESULT_SUCCESS = 0
RESTART_RESULT_FAILURE = 1
