<commit_before>﻿using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using TwixelChat.Constants;
using TwixelChat.Events;

namespace TwixelChat
{
    /// <summary>
    /// Chat client base class.
    /// Does everything except connect and disconnect from a server.
    /// </summary>
    public abstract class ChatClientBase
    {
        /// <summary>
        /// Server connection states.
        /// </summary>
        public enum ConnectionStates
        {
            /// <summary>
            /// Disconnected from server.
            /// </summary>
            Disconnected,
            /// <summary>
            /// Connecting to server.
            /// </summary>
            Connecting,
            /// <summary>
            /// Connected to server.
            /// </summary>
            Connected
        }

        /// <summary>
        /// Twitch chat logged in states.
        /// </summary>
        public enum LoggedInStates
        {
            /// <summary>
            /// Logged in to Twitch chat. Means a client can join a channel.
            /// </summary>
            LoggedIn,
            /// <summary>
            /// Not logged in to Twitch chat.
            /// Means a client must login first before they can join a channel.
            /// </summary>
            LoggedOut
        }

        // Probably going to remove this IDK
        public enum MessageType
        {
            Other,
            Number,
            Notice,
            PrivMsg
        }

        /// <summary>
        /// Raw unprocessed server message, used for all messages.
        /// </summary>
        public event EventHandler<RawMessageRecievedEventArgs> RawServerMessageRecieved;

        /// <summary>
        /// Raw message, does not include server messages.
        /// </summary>
        public event EventHandler<RawMessageRecievedEventArgs> RawMessageRecieved;

        /// <summary>
        /// Chat message.
        /// </summary>
        public event EventHandler<MessageRecievedEventArgs> MessageRecieved;

        /// <summary>
        /// Connection state change.
        /// </summary>
        public event EventHandler<ConnectionEventArgs> ConnectionStateChanged;

        /// <summary>
        /// Logged in state change.
        /// </summary>
        public event EventHandler<LoggedInEventArgs> LoggedInStateChanged;

        /// <summary>
        /// Log in attempt has failed.
        /// </summary>
        public event EventHandler LogInFailed;

        private ConnectionStates connectionState;
        /// <summary>
        /// Server connection state.
        /// </summary>
        public ConnectionStates ConnectionState
        {
            get
            {
                return connectionState;
            }
            protected internal set
            {<commit_msg>Removed LogInFailed event<commit_after>﻿using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using TwixelChat.Constants;
using TwixelChat.Events;

namespace TwixelChat
{
    /// <summary>
    /// Chat client base class.
    /// Does everything except connect and disconnect from a server.
    /// </summary>
    public abstract class ChatClientBase
    {
        /// <summary>
        /// Server connection states.
        /// </summary>
        public enum ConnectionStates
        {
            /// <summary>
            /// Disconnected from server.
            /// </summary>
            Disconnected,
            /// <summary>
            /// Connecting to server.
            /// </summary>
            Connecting,
            /// <summary>
            /// Connected to server.
            /// </summary>
            Connected
        }

        /// <summary>
        /// Twitch chat logged in states.
        /// </summary>
        public enum LoggedInStates
        {
            /// <summary>
            /// Logged in to Twitch chat. Means a client can join a channel.
            /// </summary>
            LoggedIn,
            /// <summary>
            /// Not logged in to Twitch chat.
            /// Means a client must login first before they can join a channel.
            /// </summary>
            LoggedOut
        }

        // Probably going to remove this IDK
        public enum MessageType
        {
            Other,
            Number,
            Notice,
            PrivMsg
        }

        /// <summary>
        /// Raw unprocessed server message, used for all messages.
        /// </summary>
        public event EventHandler<RawMessageRecievedEventArgs> RawServerMessageRecieved;

        /// <summary>
        /// Raw message, does not include server messages.
        /// </summary>
        public event EventHandler<RawMessageRecievedEventArgs> RawMessageRecieved;

        /// <summary>
        /// Chat message.
        /// </summary>
        public event EventHandler<MessageRecievedEventArgs> MessageRecieved;

        /// <summary>
        /// Connection state change.
        /// </summary>
        public event EventHandler<ConnectionEventArgs> ConnectionStateChanged;

        /// <summary>
        /// Logged in state change.
        /// </summary>
        public event EventHandler<LoggedInEventArgs> LoggedInStateChanged;

        private ConnectionStates connectionState;
        /// <summary>
        /// Server connection state.
        /// </summary>
        public ConnectionStates ConnectionState
        {
            get
            {
                return connectionState;
            }
            protected internal set
            {
{'fraction_non_alphanumeric': 0.10079667474887426, 'fraction_numerical': 0.0, 'mean_word_length': 1.3972602739726028, 'pattern_counts': {'":': 0, '<': 71, '<?xml version=': 0, '>': 71, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3817675', 'n_tokens_mistral': 1354, 'n_tokens_neox': 1334, 'n_words': 407}