// Copyright (c) 2023, AgiBot Inc.
// All rights reserved.

#pragma once

#ifdef __cplusplus
extern "C" {
#endif

/// Log level definition
typedef enum {
  AIMRT_RPC_STATUS_OK = 0,
  AIMRT_RPC_STATUS_UNKNOWN = 1,
  AIMRT_RPC_STATUS_TIMEOUT = 2,

  // svr side
  AIMRT_RPC_STATUS_SVR_UNKNOWN = 1000,
  AIMRT_RPC_STATUS_SVR_BACKEND_INTERNAL_ERROR = 1001,
  AIMRT_RPC_STATUS_SVR_NOT_IMPLEMENTED = 1002,
  AIMRT_RPC_STATUS_SVR_NOT_FOUND = 1003,
  AIMRT_RPC_STATUS_SVR_INVALID_SERIALIZATION_TYPE = 1004,
  AIMRT_RPC_STATUS_SVR_SERIALIZATION_FAILED = 1005,
  AIMRT_RPC_STATUS_SVR_INVALID_DESERIALIZATION_TYPE = 1006,
  AIMRT_RPC_STATUS_SVR_DESERIALIZATION_FAILED = 1007,
  AIMRT_RPC_STATUS_SVR_HANDLE_FAILED = 1008,

  // cli side
  AIMRT_RPC_STATUS_CLI_UNKNOWN = 2000,
  AIMRT_RPC_STATUS_CLI_FUNC_NOT_REGISTERED = 2001,
  AIMRT_RPC_STATUS_CLI_BACKEND_INTERNAL_ERROR = 2002,
  AIMRT_RPC_STATUS_CLI_INVALID_CONTEXT = 2003,
  AIMRT_RPC_STATUS_CLI_INVALID_ADDR = 2004,
  AIMRT_RPC_STATUS_CLI_INVALID_SERIALIZATION_TYPE = 2005,
  AIMRT_RPC_STATUS_CLI_SERIALIZATION_FAILED = 2006,
  AIMRT_RPC_STATUS_CLI_INVALID_DESERIALIZATION_TYPE = 2007,
  AIMRT_RPC_STATUS_CLI_DESERIALIZATION_FAILED = 2008,
  AIMRT_RPC_STATUS_CLI_NO_BACKEND_TO_HANDLE = 2009,
  AIMRT_RPC_STATUS_CLI_SEND_REQ_FAILED = 2010,
} aimrt_rpc_status_code_t;

#ifdef __cplusplus
}
#endif
