// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.

namespace Microsoft.Terminal.TerminalConnection
{
    enum ConnectionState
    {
        NotConnected = 0,
        Connecting,
        Connected,
        Closing,
        Closed,
        Failed
    };

    delegate void TerminalOutputHandler(Char[] output);

    interface ITerminalConnection
    {
        void Initialize(Windows.Foundation.Collections.ValueSet settings);

        void Start();
        void WriteInput(Char[] data);
        void Resize(UInt32 rows, UInt32 columns);
        void Close();

        event TerminalOutputHandler TerminalOutput;
        event Windows.Foundation.TypedEventHandler<ITerminalConnection, Object> StateChanged;

        Guid SessionId { get; };
        ConnectionState State { get; };
    };
}
