// Copyright (c) 2026 Tencent. All rights reserved.

#ifndef __TC_IOT_ERR_H__
#define __TC_IOT_ERR_H__

#ifdef __cplusplus
extern "C" {
#endif

typedef enum {
  TC_IOT_ERR_SUCCESS = 0,
  TC_IOT_ERR_FAILURE = -1,
  TC_IOT_ERR_OUT_OF_MEMORY = -2,
  TC_IOT_ERR_INVALID_ARGUMENT = -3,
  TC_IOT_ERR_NOT_INITIALIZED = -4,
  TC_IOT_ERR_ALREADY_INITIALIZED = -5,
  TC_IOT_ERR_NOT_CONNECTED = -6,
  TC_IOT_ERR_ALREADY_CONNECTED = -7,
  TC_IOT_ERR_CONNECT_FAILED = -8,
  TC_IOT_ERR_POST_TASK_FAILED = -9,

  TC_IOT_ERR_AV_ON_IDLE = -10,
  TC_IOT_ERR_AV_ON_OUTGOING = -11,
  TC_IOT_ERR_AV_ON_RINGING = -12,
  TC_IOT_ERR_AV_ON_CALLING = -13,
  TC_IOT_ERR_AV_ON_IPC_MONITOR = -14,

  TC_IOT_ERR_DYNAMIC_REGISTER_BUSY = -20,
  TC_IOT_ERR_DYNAMIC_REGISTER_REQUEST_FAILED = -21,
  TC_IOT_ERR_DYNAMIC_REGISTER_RESPONSE_INVALID = -22,

  TC_IOT_ERR_NTP_TIME_NOT_READY = -30,

  TC_IOT_ERR_CLOUD_STORAGE_CHANNEL_NOT_FOUND = -100,
  TC_IOT_ERR_CLOUD_STORAGE_PLANS_QUERY_FAILED = -101,
  TC_IOT_ERR_CLOUD_STORAGE_NO_PLAN = -102,
  TC_IOT_ERR_CLOUD_STORAGE_EVENT_NOT_FOUND = -103,
  TC_IOT_ERR_CLOUD_STORAGE_REPORT_FAILED = -104,
  TC_IOT_ERR_CLOUD_STORAGE_PIC_UPLOAD_FAILED = -105,
  TC_IOT_ERR_CLOUD_STORAGE_EVENT_CANCELLED = -106,

  TC_IOT_ERR_AITALK_NOT_SUPPORT = -200,
  TC_IOT_ERR_AITALK_BOT_LEAVED = -201,
  TC_IOT_ERR_AITALK_INVALID_PARAM = -202,
  TC_IOT_ERR_AITALK_INTERNAL_ERROR = -203,
  TC_IOT_ERR_AITALK_NOT_ACTIVATED = -204,
  TC_IOT_ERR_AITALK_SERVICE_EXPIRED = -205,
  TC_IOT_ERR_AITALK_ASR_ERROR = -206,
  TC_IOT_ERR_AITALK_TTS_ERROR = -207,
  TC_IOT_ERR_AITALK_LLM_ERROR = -208,

  TC_IOT_ERR_CONNECT_UNACCEPTABLE_PROTOCOL_VERSION = -301,
  TC_IOT_ERR_CONNECT_IDENTIFIER_REJECTED = -302,
  TC_IOT_ERR_CONNECT_SERVER_UNAVAILABLE = -303,
  TC_IOT_ERR_CONNECT_BAD_USERNAME_OR_PASSWORD = -304,
  TC_IOT_ERR_CONNECT_NOT_AUTHORIZED = -305,
} tc_iot_error_e;

#ifdef __cplusplus
}
#endif

#endif
