Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
 
 
 
 

51 lignes
1.7 KiB

  1. using MQTTnet.Client.Connecting;
  2. using MQTTnet.Client.Disconnecting;
  3. using System;
  4. using System.Collections.Generic;
  5. using System.Threading;
  6. using System.Threading.Tasks;
  7. using MQTTnet.Client;
  8. namespace MQTTnet.Extensions.ManagedClient
  9. {
  10. public interface IManagedMqttClient : IApplicationMessageReceiver, IApplicationMessagePublisher, IDisposable
  11. {
  12. /// <summary>
  13. /// Gets the internally used MQTT client.
  14. /// This property should be used with caution because manipulating the internal client might break the managed client.
  15. /// </summary>
  16. IMqttClient InternalClient { get; }
  17. bool IsStarted { get; }
  18. bool IsConnected { get; }
  19. int PendingApplicationMessagesCount { get; }
  20. IManagedMqttClientOptions Options { get; }
  21. IMqttClientConnectedHandler ConnectedHandler { get; set; }
  22. IMqttClientDisconnectedHandler DisconnectedHandler { get; set; }
  23. IApplicationMessageProcessedHandler ApplicationMessageProcessedHandler { get; set; }
  24. IApplicationMessageSkippedHandler ApplicationMessageSkippedHandler { get; set; }
  25. IConnectingFailedHandler ConnectingFailedHandler { get; set; }
  26. ISynchronizingSubscriptionsFailedHandler SynchronizingSubscriptionsFailedHandler { get; set; }
  27. Task StartAsync(IManagedMqttClientOptions options);
  28. Task StopAsync();
  29. Task PingAsync(CancellationToken cancellationToken);
  30. Task SubscribeAsync(IEnumerable<MqttTopicFilter> topicFilters);
  31. Task UnsubscribeAsync(IEnumerable<string> topics);
  32. Task PublishAsync(ManagedMqttApplicationMessage applicationMessages);
  33. }
  34. }