﻿namespace ChatSDK
{
     /**
    * The data types.
    */
    public enum DataType
    {
        Bool,
        String,
        Group,
        Room,
        CursorResult,
        ListOfString,
        ListOfMessage,
        ListOfConversation,
        ListOfGroup,
        ListOfGroupSharedFile,
    };

    /**
    * The message types.
    */
    public enum MessageBodyType
    {
        /**
          * The text message.
          */
        TXT,

        /**
          * The image message.
          */
        IMAGE,

        /**
          * The video message.
          */
        VIDEO,

        /**
          * The location message.
          */
        LOCATION,

        /**
          * The voice message.
          */
        VOICE,

        /**
         * The file message.
         */
        FILE,

        /**
          * The command message.
          */
        CMD,

        /**
          * The custom message.
          */
        CUSTOM
    };

    /**
    * The chat types.
    */
    public enum MessageType
    {
        /**
        * The one-to-one chat.
        */
        Chat = 0,

        /**
        * The group chat.
        */
        Group,

        /**
        * The chat room.
        */
        Room,
    }

    /**
    * The message status.
    */
    public enum MessageStatus
    {
        /**
        * The message is created.
        */
        CREATE,

        /**
        * The message is being delivered.
        */
        PROGRESS,

        /**
        * The message is successfully delivered.
        */
        SUCCESS,

        /**
        * The message fails to be delivered.
        */
        FAIL, 
    }

    /**
    * The message directions.
    */
    public enum MessageDirection
    {
        /**
        * This message is sent from the current user.
        */
        SEND,

        /**
        * The message is received by the current user.
        */
        RECEIVE, 
    }

    /**
    * The chat types.
    */
    public enum ConversationType
    {
        /**
        * The one-to-one chat.
        */
        Chat,

        /**
        * The group chat.
        */
        Group,

        /**
        * The chat room.
        */
        Room,
    }

    /**
    * The message query directions. 
    */
    public enum MessageSearchDirection
    {
        /**
        * Messages are retrieved in the reverse chronological order of their Unix timestamp ({@link SortMessageByServerTime}). 
        */
        UP,

        /**
        * Messages are retrieved in the chronological order of their Unix timestamp ({@link SortMessageByServerTime}). 
        */
        DOWN
    }

    namespace MessageBody
    {
        /**
        * The message download status.
        */
        public enum DownLoadStatus
        {
            /**
            * The message is being downloaded.
            */
            DOWNLOADING,

            /**
            * The message is successfully downloaded.
            */
            SUCCESS,

            /**
            * The message fails to be downloaded.
            */
            FAILED,

            /**
            * The download is pending.
            */
            PENDING
        };
    }

    /**
	 * The group styles.
     */
    public enum GroupStyle
    {
        /**
		 * Private groups where only the group owner can invite users to join.
		 */
        PrivateOnlyOwnerInvite,

        /**
		 * Private groups where each group member can invite users to join.
		 */
        PrivateMemberCanInvite,

        /**
		 * Public groups where only the owner can invite users to join. 
         * 
		 * A user can join a group only after getting approval from the group owner or admins.
		 */
        PublicJoinNeedApproval,

        /**
		 * Public groups where a user can join a group without the approval from the group owner or admins.
		 */
        PublicOpenJoin,
    }

    /**
     * The group member roles.
     *
     */
    public enum GroupPermissionType
    {
        /**
         * The regular group member.
         */
        Member,

        /**
         * The group admin.
         */
        Admin,

        /**
         * The group owner.
         */
        Owner,

        /**
         * Unknown.
         */
        Unknown = -1,
        Default=Unknown,
        None=Unknown
    }

    /**
     *  The chat room member roles.
     */
    public enum RoomPermissionType
    {
        /**
         * The regular chat room member.
         */
        Member,

        /**
         * The chat room admin.
         */
        Admin,

        /**
         * The chat room owner.
         */
        Owner,

        /**
         * Unknown.
         */
        Unknown = -1,
        Default = Unknown,
        None = Unknown
    }

    /**
     *  The display styles of push notifications.
     */
    public enum PushStyle : byte {

        /**
         *  Displays "You have a new message".
         */
        Simple,

        /**
         *  Displays the content of the offline message.
         */
        Summary, 
    }

    /**
     *  The extension attribute types of messages.
     */
    public enum AttributeValueType : byte
    {
        /**
         *  Bool.
         */
        BOOL = 0,

        /**
         *  Signed 32-bit int.
         */
        INT32,

        /**
         *  Unsigned 32-bit int.
         */
        UINT32,

        /**
         *  Signed 64-bit int.
         */
        INT64,

        /**
         *  Float.
         */
        FLOAT,

        /**
         *  Double.
         */
        DOUBLE,

        /**
         *  String.
         */
        STRING,
        //STRVECTOR,
        /**
         *  JSON string.
         */
        JSONSTRING,
        //ATTRIBUTEVALUE,
        NULLOBJ
    }

    /**
     *  The multi-device operation types.
     */
    public enum MultiDevicesOperation
    {
        UNKNOWN = -1,
        /**
         * The current user removed a contact on another device.
         */
        CONTACT_REMOVE = 2,

        /**
         * The current user accepted a friend request on another device.
         */
        CONTACT_ACCEPT = 3,

        /**
         * The current user declined a friend request on another device.
         */
        CONTACT_DECLINE = 4,

        /**
         * The current user added a contact to the block list on another device.
         */
        CONTACT_BAN = 5,

        /**
         * The current user removed a contact from the block list on another device.
         */
        CONTACT_ALLOW = 6,

        /**
         * The current user created a group on another device.
         */
        GROUP_CREATE = 10,

        /**
         * The current user destroyed a group on another device.
         */
        GROUP_DESTROY = 11,

        /**
         * The current user joined a group on another device.
         */
        GROUP_JOIN = 12,

        /**
         * The current user left a group on another device.
         */
        GROUP_LEAVE = 13,

        /**
         * The current user requested to join a group on another device.
         */
        GROUP_APPLY = 14,

        /**
         * The current user accepted a group request on another device.
         */
        GROUP_APPLY_ACCEPT = 15,

        /**
         * The current user declined a group request on another device.
         */
        GROUP_APPLY_DECLINE = 16,

        /**
         * The current user invited a user to join the group on another device.
         */
        GROUP_INVITE = 17,

        /**
         * The current user accepted a group invitation on another device.
         */
        GROUP_INVITE_ACCEPT = 18,

        /**
         * The current user declined a group invitation on another device.
         */
        GROUP_INVITE_DECLINE = 19,

        /**
         * The current user kicked a member out of a group on another device.
         */
        GROUP_KICK = 20,

        /**
         * The current user added a member to a group block list on another device.
         */
        GROUP_BAN = 21,

        /**
         * The current user removed a member from a group block list on another device.
         */
        GROUP_ALLOW = 22,

        /**
         * The current user blocked a group on another device.
         */
        GROUP_BLOCK = 23,

        /**
         * The current user unblocked a group on another device.
         */
        GROUP_UNBLOCK = 24,

        /**
         * The current user transferred the group ownership on another device.
         */
        GROUP_ASSIGN_OWNER = 25,

        /**
         * The current user added an admin on another device.
         */
        GROUP_ADD_ADMIN = 26,

        /**
         * The current user removed an admin on another device.
         */
        GROUP_REMOVE_ADMIN = 27,

        /**
         * The current user muted a member on another device.
         */
        GROUP_ADD_MUTE = 28,

        /**
         * The current user unmuted a member on another device.
         */
        GROUP_REMOVE_MUTE = 29,

        /**
         * The current user added a group member to the allow list on another device.
         */
        GROUP_ADD_USER_WHITE_LIST = 30,

        /**
         * The current user removed a group member from the allow list on another device.
         */
        GROUP_REMOVE_USER_WHITE_LIST = 31,

        /**
         * The current user added all other group members to the group mute list on another device.
         */
        GROUP_ALL_BAN = 32,

        /**
         * The current user removed all other group members from the group mute list on another device.
         */
        GROUP_REMOVE_ALL_BAN = 33,

        /**
         * A thread was created on another device.
         */
        THREAD_CREATE  = 40,

		 /**
         * A thread was destoryed on another device.
         */
        THREAD_DESTROY = 41,

		 /**
         * Joined thread on another device.
         */
        THREAD_JOIN = 42,

		 /**
         * Left thread on another device.
         */
        THREAD_LEAVE = 43,

		 /**
         * Thread updated on another device.
         */
        THREAD_UPDATE = 44,

		 /**
         * Kicked from thread on another device.
         */
        THREAD_KICK = 45,
    }

    public enum SilentModeParamType
    {
        /**
        * The push notification mode.
        */
        RemindType = 0,
        /**
        * The duration of the do-not-disturb mode, in minutes.
        */
        Duration,
        /**
        *  The time frame of the do-not-disturb mode. This parameter type is valid only at the app level, but not for conversations.
        */
        Interval,
    }

    public enum PushRemindType
    {
         /**
         * ～chinese
         * 缺省接收全部离线消息的推送通知。
         *
         * ~english
         * Default: Receives push notifications for all offline messages.
         * */
        Default = 0,
        /**
         * ～chinese
         * 接收全部离线消息的推送通知。
         *
         * ~english
         * Receives push notifications for all offline messages.
         * */
        All,
        /** ～chinese
         * 只接收提及当前用户的离线消息的推送通知。
         *
         * ~english
         * Only receives push notifications for mentioned messages.
         */
        MentionOnly,
       /**
        * ～chinese
        * 不接收离线消息的推送通知。
        *
        ~english
        * Receives no push notification for offline messages.
        */
        None,
    }

    public enum ChatThreadOperation
    {
	    /**
        * ～chinese
        * 未知操作，缺省值。
        *
        ~english
        * Unkonw operation, default value.
        */	
		UnKnown = 0,
	    /**
        * ～chinese
        * 创建子区。
        *
        ~english
        * Create thread.
        */
        Create,
	    /**
        * ～chinese
        * 更新子区。
        *
        ~english
        * Update thread.
        */
        Update,
	    /**
        * ～chinese
        * 删除子区。
        *
        ~english
        * Delete thread.
        */
        Delete,
	    /**
        * ～chinese
        * 子区消息更新。
        *
        ~english
        * Thread message updated.
        */		
		Update_Msg,
    }
}
