Skip to content

Commit

Permalink
Formatted changed files
Browse files Browse the repository at this point in the history
  • Loading branch information
mauroa authored and kzu committed Jul 30, 2019
1 parent 8b75fdb commit 58daae9
Show file tree
Hide file tree
Showing 2 changed files with 310 additions and 256 deletions.
130 changes: 65 additions & 65 deletions src/Client/IMqttClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,26 +7,26 @@ namespace System.Net.Mqtt
/// </summary>
public interface IMqttClient : IDisposable
{
/// <summary>
/// Event raised when the Client gets disconnected.
/// The Client disconnection could be caused by a protocol disconnect,
/// an error or a remote disconnection produced by the Server.
/// See <see cref="MqttEndpointDisconnected"/> for more details on the disconnection information
/// </summary>
/// <summary>
/// Event raised when the Client gets disconnected.
/// The Client disconnection could be caused by a protocol disconnect,
/// an error or a remote disconnection produced by the Server.
/// See <see cref="MqttEndpointDisconnected"/> for more details on the disconnection information
/// </summary>
event EventHandler<MqttEndpointDisconnected> Disconnected;

/// <summary>
/// Id of the connected Client.
/// This Id correspond to the <see cref="MqttClientCredentials.ClientId"/> parameter passed to
/// <see cref="ConnectAsync (MqttClientCredentials, MqttLastWill, bool)"/> method
/// </summary>
/// <summary>
/// Id of the connected Client.
/// This Id correspond to the <see cref="MqttClientCredentials.ClientId"/> parameter passed to
/// <see cref="ConnectAsync (MqttClientCredentials, MqttLastWill, bool)"/> method
/// </summary>
string Id { get; }

/// <summary>
/// Indicates if the Client is connected by protocol.
/// This means that a CONNECT packet has been sent,
/// by calling <see cref="ConnectAsync (MqttClientCredentials, MqttLastWill, bool)"/> method
/// </summary>
/// <summary>
/// Indicates if the Client is connected by protocol.
/// This means that a CONNECT packet has been sent,
/// by calling <see cref="ConnectAsync (MqttClientCredentials, MqttLastWill, bool)"/> method
/// </summary>
bool IsConnected { get; }

/// <summary>
Expand Down Expand Up @@ -67,7 +67,7 @@ public interface IMqttClient : IDisposable
/// See <a href="http://docs.oasis-open.org/mqtt/mqtt/v3.1.1/mqtt-v3.1.1.html#_Toc442180841">MQTT Connect</a>
/// for more details about the protocol connection
/// </remarks>
Task<SessionState> ConnectAsync (MqttClientCredentials credentials, MqttLastWill will = null, bool cleanSession = false);
Task<SessionState> ConnectAsync(MqttClientCredentials credentials, MqttLastWill will = null, bool cleanSession = false);

/// <summary>
/// Represents the protocol connection, which consists of sending a CONNECT packet
Expand All @@ -88,7 +88,7 @@ public interface IMqttClient : IDisposable
/// See <a href="http://docs.oasis-open.org/mqtt/mqtt/v3.1.1/mqtt-v3.1.1.html#_Toc442180841">MQTT Connect</a>
/// for more details about the protocol connection
/// </remarks>
Task<SessionState> ConnectAsync (MqttLastWill will = null);
Task<SessionState> ConnectAsync(MqttLastWill will = null);

/// <summary>
/// Represents the protocol subscription, which consists of sending a SUBSCRIBE packet
Expand All @@ -108,55 +108,55 @@ public interface IMqttClient : IDisposable
/// See <a href="http://docs.oasis-open.org/mqtt/mqtt/v3.1.1/mqtt-v3.1.1.html#_Toc442180876">MQTT Subscribe</a>
/// for more details about the protocol subscription
/// </remarks>
Task SubscribeAsync (string topicFilter, MqttQualityOfService qos);
Task SubscribeAsync(string topicFilter, MqttQualityOfService qos);

/// <summary>
/// Represents the protocol publish, which consists of sending a PUBLISH packet
/// and awaiting the corresponding ACK packet, if applies, based on the QoS defined
/// </summary>
/// <param name="message">
/// The application message to publish to the Server.
/// See <see cref="MqttApplicationMessage" /> for more details about the application messages
/// </param>
/// <param name="qos">
/// The Quality Of Service (QoS) associated to the application message, which determines
/// the sequence of acknowledgements that Client and Server should send each other to consider the message as delivered
/// See <see cref="MqttQualityOfService" /> for more details about the QoS values
/// </param>
/// <param name="retain">
/// Indicates if the application message should be retained by the Server for future subscribers.
/// Only the last message of each topic is retained
/// </param>
/// <remarks>
/// See <a href="http://docs.oasis-open.org/mqtt/mqtt/v3.1.1/mqtt-v3.1.1.html#_Toc442180850">MQTT Publish</a>
/// for more details about the protocol publish
/// </remarks>
Task PublishAsync (MqttApplicationMessage message, MqttQualityOfService qos, bool retain = false);
/// <summary>
/// Represents the protocol publish, which consists of sending a PUBLISH packet
/// and awaiting the corresponding ACK packet, if applies, based on the QoS defined
/// </summary>
/// <param name="message">
/// The application message to publish to the Server.
/// See <see cref="MqttApplicationMessage" /> for more details about the application messages
/// </param>
/// <param name="qos">
/// The Quality Of Service (QoS) associated to the application message, which determines
/// the sequence of acknowledgements that Client and Server should send each other to consider the message as delivered
/// See <see cref="MqttQualityOfService" /> for more details about the QoS values
/// </param>
/// <param name="retain">
/// Indicates if the application message should be retained by the Server for future subscribers.
/// Only the last message of each topic is retained
/// </param>
/// <remarks>
/// See <a href="http://docs.oasis-open.org/mqtt/mqtt/v3.1.1/mqtt-v3.1.1.html#_Toc442180850">MQTT Publish</a>
/// for more details about the protocol publish
/// </remarks>
Task PublishAsync(MqttApplicationMessage message, MqttQualityOfService qos, bool retain = false);

/// <summary>
/// Represents the protocol unsubscription, which consists of sending an UNSUBSCRIBE packet
/// and awaiting the corresponding UNSUBACK packet from the Server
/// </summary>
/// <param name="topics">
/// The list of topics to unsubscribe from
/// Once the unsubscription completes, no more application messages for those topics will arrive to <see cref="MessageStream"/>
/// </param>
/// <exception cref="MqttClientException">MqttClientException</exception>
/// <remarks>
/// See <a href="http://docs.oasis-open.org/mqtt/mqtt/v3.1.1/mqtt-v3.1.1.html#_Toc442180885">MQTT Unsubscribe</a>
/// for more details about the protocol unsubscription
/// </remarks>
Task UnsubscribeAsync (params string[] topics);
/// <summary>
/// Represents the protocol unsubscription, which consists of sending an UNSUBSCRIBE packet
/// and awaiting the corresponding UNSUBACK packet from the Server
/// </summary>
/// <param name="topics">
/// The list of topics to unsubscribe from
/// Once the unsubscription completes, no more application messages for those topics will arrive to <see cref="MessageStream"/>
/// </param>
/// <exception cref="MqttClientException">MqttClientException</exception>
/// <remarks>
/// See <a href="http://docs.oasis-open.org/mqtt/mqtt/v3.1.1/mqtt-v3.1.1.html#_Toc442180885">MQTT Unsubscribe</a>
/// for more details about the protocol unsubscription
/// </remarks>
Task UnsubscribeAsync(params string[] topics);

/// <summary>
/// Represents the protocol disconnection, which consists of sending a DISCONNECT packet to the Server
/// No acknowledgement is sent by the Server on the disconnection
/// Once the client is successfully disconnected, the <see cref="Disconnected"/> event will be fired
/// </summary>
/// <remarks>
/// See <a href="http://docs.oasis-open.org/mqtt/mqtt/v3.1.1/mqtt-v3.1.1.html#_Toc442180903">MQTT Disconnect</a>
/// for more details about the protocol disconnection
/// </remarks>
Task DisconnectAsync ();
/// <summary>
/// Represents the protocol disconnection, which consists of sending a DISCONNECT packet to the Server
/// No acknowledgement is sent by the Server on the disconnection
/// Once the client is successfully disconnected, the <see cref="Disconnected"/> event will be fired
/// </summary>
/// <remarks>
/// See <a href="http://docs.oasis-open.org/mqtt/mqtt/v3.1.1/mqtt-v3.1.1.html#_Toc442180903">MQTT Disconnect</a>
/// for more details about the protocol disconnection
/// </remarks>
Task DisconnectAsync();
}
}
Loading

0 comments on commit 58daae9

Please sign in to comment.