2019-05-03 00:29:04 +02:00
|
|
|
|
// Copyright (c) Microsoft Corporation.
|
|
|
|
|
// Licensed under the MIT license.
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include "EchoConnection.g.h"
|
|
|
|
|
|
2019-11-25 23:22:29 +01:00
|
|
|
|
#include "../cascadia/inc/cppwinrt_utils.h"
|
|
|
|
|
|
2019-05-03 00:29:04 +02:00
|
|
|
|
namespace winrt::Microsoft::Terminal::TerminalConnection::implementation
|
|
|
|
|
{
|
|
|
|
|
struct EchoConnection : EchoConnectionT<EchoConnection>
|
|
|
|
|
{
|
2020-01-03 19:44:27 +01:00
|
|
|
|
EchoConnection() noexcept;
|
2019-05-03 00:29:04 +02:00
|
|
|
|
|
2020-01-03 19:44:27 +01:00
|
|
|
|
void Start() noexcept;
|
2019-05-03 00:29:04 +02:00
|
|
|
|
void WriteInput(hstring const& data);
|
2020-01-03 19:44:27 +01:00
|
|
|
|
void Resize(uint32_t rows, uint32_t columns) noexcept;
|
|
|
|
|
void Close() noexcept;
|
2019-05-03 00:29:04 +02:00
|
|
|
|
|
2019-11-25 23:22:29 +01:00
|
|
|
|
ConnectionState State() const noexcept { return ConnectionState::Connected; }
|
|
|
|
|
|
|
|
|
|
WINRT_CALLBACK(TerminalOutput, TerminalOutputHandler);
|
|
|
|
|
TYPED_EVENT(StateChanged, ITerminalConnection, IInspectable);
|
2019-05-03 00:29:04 +02:00
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
namespace winrt::Microsoft::Terminal::TerminalConnection::factory_implementation
|
|
|
|
|
{
|
|
|
|
|
struct EchoConnection : EchoConnectionT<EchoConnection, implementation::EchoConnection>
|
|
|
|
|
{
|
|
|
|
|
};
|
|
|
|
|
}
|