// 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(String output);

    interface ITerminalConnection
    {
        void Start();
        void WriteInput(String data);
        void Resize(UInt32 rows, UInt32 columns);
        void Close();

        event TerminalOutputHandler TerminalOutput;

        event Windows.Foundation.TypedEventHandler<ITerminalConnection, Object> StateChanged;
        ConnectionState State { get; };
    };
}
