using System; using System.Collections.Generic; using System.Threading.Tasks; using MQTTnet.Client; namespace MQTTnet.Extensions.ManagedClient { public interface IManagedMqttClient : IApplicationMessageReceiver, IApplicationMessagePublisher, IDisposable { bool IsStarted { get; } bool IsConnected { get; } int PendingApplicationMessagesCount { get; } event EventHandler Connected; event EventHandler Disconnected; event EventHandler ApplicationMessageProcessed; event EventHandler ConnectingFailed; event EventHandler SynchronizingSubscriptionsFailed; Task StartAsync(IManagedMqttClientOptions options); Task StopAsync(); Task SubscribeAsync(IEnumerable topicFilters); Task UnsubscribeAsync(IEnumerable topics); Task PublishAsync(ManagedMqttApplicationMessage applicationMessages); } }