﻿namespace AgoraChat
{
    /**
     * The connection callback interface.
     */
    public interface IConnectionDelegate
    {
        /**
         * Occurs when the SDK successfully connects to the chat server.
         */
        void OnConnected();

        /**
         * Occurs when the SDK disconnects from the chat server.
         * 
         * The SDK disconnects from the chat server when you log out of the app or a network interruption occurs.
         * 
         */
        void OnDisconnected();

        /**
         *  Occurs when the current user account is logged in to another device.
         */
        void OnLoggedOtherDevice();

        /**
         *  Occurs when the current chat user is removed from the server.
         */
        void OnRemovedFromServer();

        /**
         *  The delegate method will be invoked when the User account is forbidden.
         */
        void OnForbidByServer();

        /**
         *  The delegate method will be invoked when current IM account password is modified to logout.
         */
        void OnChangedIMPwd();

        /**
         *  The delegate method will be invoked when current IM account logged in too many devices to logout.
         */
        void OnLoginTooManyDevice();

        /**
         *  The delegate method will be invoked when kicked offline by another device.
         */
        void OnKickedByOtherDevice();

        /**
         *  The delegate method will be invoked when current device account is forcibly logged out due to authentication failure.
         */
        void OnAuthFailed();


        /**
         * Occurs when the token has expired.
         */
        void OnTokenExpired();

        /**
         * Occurs when the token is about to expire.
         */
        void OnTokenWillExpire();

    }

}
