You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
43 lines
1.5 KiB
43 lines
1.5 KiB
using CommunityToolkit.Mvvm.Input;
|
|
using MultiTerm.Protocols.Types;
|
|
|
|
namespace MultiTerm.Protocols;
|
|
|
|
public interface IProtocolSettingsViewModel
|
|
{
|
|
/// <summary>
|
|
/// Indicates the protocol type of the implementing SettingsViewModel.
|
|
/// </summary>
|
|
ProtocolType ProtocolType { get; }
|
|
|
|
/// <summary>
|
|
/// Indicates if the <see cref="IProtocolSettingsViewModel"/> displays ifself as if the protocol is connected.
|
|
/// </summary>
|
|
bool DisplaysConnected { get; }
|
|
|
|
/// <summary>
|
|
/// Indicates wether the settings can currently be edited.
|
|
/// </summary>
|
|
bool AreEditable { get; }
|
|
|
|
/// <summary>
|
|
/// Event that is thrown when the user requested to connect to the device with the entered settings.
|
|
/// Provides protocol settings to use for connection.
|
|
/// </summary>
|
|
event EventHandler<ConnectionRequestEventArgs> ConnectRequested;
|
|
|
|
/// <summary>
|
|
/// Event that is thrown when the user requested to disconnect from the device.
|
|
/// </summary>
|
|
event EventHandler? DisconnectRequested;
|
|
|
|
/// <summary>
|
|
/// Change the state from connected to disconnected or from disconnected to connected.
|
|
/// Does not throw <see cref="ConnectRequested"/> or <see cref="DisconnectRequested"/>.
|
|
/// </summary>
|
|
/// <param name="connected">
|
|
/// if true changes the state from disconnected to connected.
|
|
/// if false changes the state from connected to disconnected.
|
|
/// </param>
|
|
void ForceConnectedState(bool connected);
|
|
} |