package cn.tee3.avd;

/**
 * Created by Administrator on 2015/9/17.
 */
public class ErrorCode {
    public static final int AVD_OK = 0;                             /* Standard "it worked" return value */
    public static final int Err_Base = 1000;

//client error code
/* Returned when a function fails */
    public static final int Err_Failure				 = Err_Base + 1;
/* Returned when an instance is not initialized */
    public static final int  Err_Not_Initialized		 = Err_Base + 2;
/* Returned when an instance is already initialized */
    public static final int  Err_Already_Initialized  = Err_Base + 3;
/* Returned by a not implemented function */
    public static final int  Err_Not_Implemented		 = Err_Base + 4;
/* Returned when null pointer occures */
    public static final int  Err_Null_Pointer		 = Err_Base + 5;
/* Returned when an unexpected error occurs */
    public static final int  Err_UnExpected			 = Err_Base + 6;
/* Returned when a memory allocation fails */
    public static final int  Err_Out_Of_Memory		 = Err_Base + 7;
/* Returned when an illegal value is passed */
    public static final int  Err_Invalid_Arg			 = Err_Base + 8;
/* Returned when an operation can't complete due to an unavailable resource */
    public static final int  Err_Not_Available		 = Err_Base + 9;
/* object cann't find */
    public static final int  Err_Not_Found			 = Err_Base + 11;
/* operation timeout */
    public static final int  Err_TimeOut				 = Err_Base + 14;
/* object in wrong status */
    public static final int  Err_Wrong_Status		 = Err_Base + 15;
/* network failure */
    public static final int  Err_Network_Failure		 = Err_Base + 16;
/* token is none */
    public static final int  Err_No_Token			 = Err_Base + 17;
/* video input: image convert failed. */
    public static final int  Err_ImageConvert_Failed	 = Err_Base + 18;
/* need more buff */
    public static final int  Err_Morebuff_Needed		 = Err_Base + 19;
/* device already occupied */
    public static final int  Err_DeviceOccupied		 = Err_Base + 20;
/* operation has done */
    public static final int  Err_Operation_Completed	 = Err_Base + 21;
/* function unauthorized */
    public static final int  Err_Function_Unauthorized = Err_Base + 25;
/* mcu_url is empty in Cluster version mcu*/
    public static final int  Err_Cluster_Invalid        = Err_Base + 26;
/* mcu connection failure*/
    public static final int  Err_McuConnection_Failure = Err_Base + 27;
/* publish or priview or setOption(eo_camera_capability_default) not support resolution */
    public static final int Err_Video_NotSupportResolution = Err_Base + 28;
/* room closed*/
   public static final int Err_Room_Close					= Err_Base + 29;
/* stream connection timeout */
   public static final int Err_Stream_Connection_TimeOut	= Err_Base + 30;
/* get_mcu failed in cluster server */
   public static final int Err_Rest_GetMcu_Failure			= Err_Base + 31;
/* room signal channel connect failed */
   public static final int Err_Net_ChannelSignal_Failure	= Err_Base + 32;
/* room data channel connect failed */
   public static final int Err_Net_ChannelData_Failure		= Err_Base + 33;
/* no data, wait for data ok.  */
   public static final int Err_Waiting_Data				    = Err_Base + 34;

   /* have no permission, need request permission first */
   public static final int Err_NO_PERMISSION				= Err_Base + 35;

   public static final int Err_Engine_DuplicateInit = Err_Base + 40;


//server error code
    public static final int Err_Base_Srv	=	0;
/* client is unauthorized */
    public static final int  Err_Unauthorized		 = Err_Base_Srv + 401;
/* client is rejoin error */
    public static final int Err_Rejoin				= Err_Base_Srv + 402;
/* room not found */
    public static final int  Err_Room_None			 = Err_Base_Srv + 404;
/* license expired */
    public static final int  Err_License_Expired		 = Err_Base_Srv + 405;
/* mcu not register */
    public static final int Err_Mcu_NoRegister		= Err_Base_Srv + 406;
/* http request param invalid */
   public static final int Err_Rest_InvalidParam	= Err_Base_Srv + 407;
/* http request not supported */
   public static final int Err_Rest_Notsupported	= Err_Base_Srv + 408;
/* http request timeout */
   public static final int Err_Rest_TimeOut		= Err_Base_Srv + 409;
/* none available server */
   public static final int Err_Server_NoAvailable	= Err_Base_Srv + 410;
/* server out of max user  */
   public static final int Err_Server_OutofMaxUser	= Err_Base_Srv + 411;
/* server is box version */
   public static final int Err_Server_BoxVersion	= Err_Base_Srv + 412;
/* room is in used */
   public static final int Err_Room_InUsed			= Err_Base_Srv + 413;
/* schedule service not available */
   public static final int Err_Schedule_Failed		= Err_Base_Srv + 414;
/* none mcu for roomId */
   public static final int Err_NoMcu_ByRoomId		= Err_Base_Srv + 415;
/* mcu not found room */
   public static final int Err_NoRoom_InMcu		= Err_Base_Srv + 416;
/* mcu is offline */
   public static final int Err_Mcu_Offline			= Err_Base_Srv + 417;
/* master rpc timeout */
   public static final int Err_Master_RpcTimeout	= Err_Base_Srv + 418;
/* cluster have no master */
   public static final int Err_Cluster_NoMaster	= Err_Base_Srv + 419;
/* cluster error */
   public static final int Err_Cluster_Error		= Err_Base_Srv + 420;
/* server is not leader */
   public static final int Err_Server_NotLeader	= Err_Base_Srv + 421;
/* mcu server is not exist */
   public static final int Err_Server_McuNone		= Err_Base_Srv + 422;
    /* too new version of sdk */
   public static final int Err_Not_Match_Version	= Err_Base_Srv + 436;
    /* room have no host */
    public static final int Err_Room_Have_No_Host		= Err_Base_Srv + 445;
/* service unavailable */
    public static final int  Err_Service_Unavailable	 = Err_Base_Srv + 503;
/* server time out */
    public static final int  Err_Server_TimeOut		 = Err_Base_Srv + 504;
/* version not support */
    public static final int  Err_Version_Invalid		 = Err_Base_Srv + 505;
/* server out of user */
    public static final int  Err_Server_OutofUser	 = Err_Base_Srv + 506;
/* room out of max user */
    public static final int  Err_Room_OutofUser		 = Err_Base_Srv + 507;
/* license out of max user */
    public static final int  Err_License_OutofUser	 = Err_Base_Srv + 508;
/* app room id invalid */
    public static final int  Err_RoomId_Invalid		 = Err_Base_Srv + 601;
/* authentication failed */
    public static final int  Err_Auth_Failed			 = Err_Base_Srv + 602;
/* get mcu not found room */
    public static final int Err_GetMcu_NoRoom		= Err_Base_Srv + 612;
/* mcu proxy connect up server failed */
   public static final int Err_Proxy_UpConn_Failed	= Err_Base_Srv + 613;
/* database error: data invalid */
    public static final int  Err_Database_Error		 = Err_Base_Srv + 700;
/* function no permission */
    public static final int Err_Server_NoPermition	= Err_Base_Srv + 701;
/* room out of max video */
    public static final int  Err_Room_OutofVideo		 = Err_Base_Srv + 800;
/* room out of max audio */
    public static final int  Err_Room_OutofAudio		 = Err_Base_Srv + 801;	
/* duplicate publish */
    public static final int  Err_Duplicate_Publish	 = Err_Base_Srv + 802;	
/* room token invalid */
    public static final int  Err_Room_ErrToken		 = Err_Base_Srv + 803;	
/* duplicate userid join, kick off prejoin user. */
    public static final int  Err_User_DuplicateJoin	 = Err_Base_Srv + 804;
/* server internal error. */
    public static final int Err_Server_InternalError	= Err_Base_Srv + 805;
/* server database connection timeout. */
   public static final int Err_Server_DBConnTimeout	= Err_Base_Srv + 806;
/* data connection connect failed, kick off user. */
   public static final int Err_User_DataConnection_Failed	= Err_Base_Srv + 807;
/* kick off user by someone. */
    public static final int Err_Room_KickoffBySomeone = Err_Base_Srv + 808;
/* out of license kick off user. */
    public static final int Err_Room_OutofLicense = Err_Base_Srv + 809;
/* closed room kick off user. */
    public static final int Err_Room_closed = Err_Base_Srv + 810;
/* closed room due to begin to server close. */
    public static final int Err_Room_server_close = Err_Base_Srv + 811;
/* kick off user while connection timeout. */
    public static final int Err_Room_Connection_Timeout = Err_Base_Srv + 812;
/* closed room by restful. */
    public static final int Err_Room_closedByRest = Err_Base_Srv + 815;
}
