package globals

type ErrCode int

const (
	ERR_SUCCESS ErrCode = 1000 + iota
	ERR_REQUEST_TOO_MUCH
	ERR_TIMESTAMP
	ERR_DECODE_ERR

	ERR_CODE_MAX
	ERR_SYSTEM = ErrCode(9999)

	ERR_YUNXIN_FAIL             ErrCode = 2001
	ERR_ACCOUNT_NOT_EXIST       ErrCode = 1003
	ERR_SERVER_ARGS_ERROR       ErrCode = 3000
	ERR_BIND_ACCOUNT_BEYOND_MAX ErrCode = 2000
	ERR_DEVICE_BOUNDED          ErrCode = 4100
	ERR_ACCOUNT_BOUNDED         ErrCode = 4101
)

type Cmd int

const (
	MSC_CMD_PLAY_MUSIC Cmd = 1001 + iota // 播放歌曲
	MSC_CMD_PLAY_LIST                    // 播放歌单
	MSC_CMD_PLAY_LISTS                   // 播放歌单列表 ，如播放我的歌单、收藏的歌单、通过艺人
	MSC_CMD_PLAY_RCMD                    // 播放推荐

	MSC_CMD_COLLECT_MUSIC   // 收藏音乐
	MSC_CMD_REMAIN_TIME     // 播报剩余时间
	MSC_CMD_UNCOLLECT_MUSIC // 取消音乐收藏
)

const (
	MSC_CMD_MUSIC_NO_COPYRIGHT_TOAST Cmd = 1008
)

const (
	MSC_CMD_TTS_TOAST Cmd = 2001 + iota
	MSC_CMD_ONLINE_PHONE
)

const (
	MSC_CMD_VOLUME_UP Cmd = 3001 + iota //exec vol=0
	MSC_CMD_VOLUME_DOWN
	MSC_CMD_PAUSE
	MSC_CMD_CONTINUE
	MSC_CMD_NEXT
	MSC_CMD_PRE
	MSC_CMD_CYCLE_LIST
	MSC_CMD_CYCLE_ONE_SONG
	MSC_CMD_CYCLE_RANDOM
)

const (
	MSC_CMD_REPEAT Cmd = 3017 + iota
	MSC_CMD_MUSIC_DENY
	MSC_CMD_VOL_MAX //exec vol=0
	MSC_CMD_VOL_MIN
	MSC_CMD_VOL_SET //exec vol=0
	MSC_CMD_REPEAT_MUSIC
)
const (
	MSC_CMD_QUERY_VOL   Cmd = 3025
	MSC_CMD_MODE_CHANGE Cmd = 3026
	MSC_CMD_ORDER_PLAY  Cmd = 3027 //顺序播放
)
const (
	MSC_CMD_LIGHT_ON Cmd = 3010 + iota
	MSC_CMD_LIGHT_OFF
	MSC_CMD_BT_ON
	MSC_CMD_BT_OFF
)
const (
	MSC_CMD_CONCERT_INFO Cmd = 3015
)
const (
	MSC_CMD_ALARM_ADD    Cmd = 3101
	MSC_CMD_ALARM_CANCLE Cmd = 3102
	MSC_CMD_ALARM_CLOSE  Cmd = 3103
	MSC_CMD_ALARM_QUERY  Cmd = 3104
)

const (
	MSC_CMD_REMIND_ADD    Cmd = 3200
	MSC_CMD_REMIND_CANCLE Cmd = 3201
	MSC_CMD_REMIND_CLOSE  Cmd = 3202
	MSC_CMD_REMIND_QUERY  Cmd = 3203
)

const (
	MSC_CMD_WHETHER    Cmd = 3205
	MSC_CMD_ENTERSCENE Cmd = 3400
	MSC_CMD_EXITSCENE  Cmd = 3401
)

const (
	MSC_CMD_IOTWIFIPARING Cmd = 3700
	MSC_CMD_BTONWIFIOFF   Cmd = 3701
)

const (
	MSC_CMD_CHAT Cmd = 3500
)

const (
	MSC_CONFIRM_YES   Cmd = 2002
	MSC_CONFIRM_NO    Cmd = 2003
	MSC_CONFIRM_DELAY Cmd = 2004
)

const (
	APP_CMD_MUSIC_PLAY Cmd = 5000 + iota
	APP_CMD_MUSIC_CONTINUE
	APP_CMD_MUSIC_PAUSE
	APP_CMD_MUSIC_NEXT
	APP_CMD_MUSIC_PRE
	APP_CMD_VOLUME //exec vol=0
	APP_CMD_SEEK
	APP_CMD_CYCLE_ONE_SONG
	APP_CMD_CYCLE_LIST
	APP_CMD_CYCLE_RANDOM
)

const (
	APP_CMD_VBOX_SYNC      Cmd = 5010 + iota //exec vol=0
	APP_CMD_VBOX_SYNC_RESP                   //exec vol=0
	APP_CMD_LIST_PLAY
)

const (
	APP_CMD_LIST_NO_CYCLE Cmd = 5030 + iota //音乐顺序播放，不循环
)

const (
	APP_CMD_UPGRADE            Cmd = 5101 //exec vol=0
	APP_CMD_CFGLIST_SET        Cmd = 5102 //exec vol=0
	APP_CMD_CFGLIST_SET_RSP    Cmd = 5104 //exec vol=0
	APP_CMD_CLOSEALARM         Cmd = 5103 //exec vol=0
	APP_CMD_WIFIPARING_SUCCESS Cmd = 5601 //exec vol=0

	APP_CMD_OTASTATUS    Cmd = 5150 //exec vol=0
	APP_CMD_DEVICE_EVENT Cmd = 5152 //exec vol=0

	APP_CMD_ENV_CHANGE Cmd = 5153

	APP_CMD_CFGLIST_GET     Cmd = 5998 //exec  vol=0
	APP_CMD_CFGLIST_GET_RSP Cmd = 5999 //exec vol=0
)

/* 注意: app下发的命令，需要小于APP_CMD_MAX*/
const (
	APP_CMD_MAX Cmd = 5999
)
const (
	VBOX_CMD_STATUS_SYNC Cmd = 5100 + iota
)

const (
	MSC_CMD_TTS_IDLE Cmd = 9994
)

const (
	MSC_CMD_TTS_UNKNOW0 Cmd = 9996 + iota
	MSC_CMD_TTS_UNKNOW1
	MSC_CMD_TTS_UNKNOW2
	MSC_CMD_TTS_UNKNOW3
)
