From 913afa397790d0100cb42db47a843d2aa0265f7c Mon Sep 17 00:00:00 2001 From: Christian Kratky Date: Fri, 17 May 2019 20:57:40 +0200 Subject: [PATCH] Add connack properties to authenticate result. --- Build/MQTTnet.nuspec | 2 + .../MqttClientAuthenticateResult.cs | 40 ++++++++++++++++++- 2 files changed, 40 insertions(+), 2 deletions(-) diff --git a/Build/MQTTnet.nuspec b/Build/MQTTnet.nuspec index cd49b7f..3a8585f 100644 --- a/Build/MQTTnet.nuspec +++ b/Build/MQTTnet.nuspec @@ -13,6 +13,8 @@ * [Core] Fixed issues in MQTTv5 message encoding and decoding. * [Client] Added support for extended authentication exchange. +* [Client] Exposed MQTTv5 CONNACK values to client. +* [Client] Added _MqttClientSubscribeOptionsBuilder_. Copyright Christian Kratky 2016-2019 MQTT Message Queue Telemetry Transport MQTTClient MQTTServer Server MQTTBroker Broker NETStandard IoT InternetOfThings Messaging Hardware Arduino Sensor Actuator M2M ESP Smart Home Cities Automation Xamarin diff --git a/Source/MQTTnet/Client/Connecting/MqttClientAuthenticateResult.cs b/Source/MQTTnet/Client/Connecting/MqttClientAuthenticateResult.cs index db6e5be..21d646b 100644 --- a/Source/MQTTnet/Client/Connecting/MqttClientAuthenticateResult.cs +++ b/Source/MQTTnet/Client/Connecting/MqttClientAuthenticateResult.cs @@ -1,9 +1,45 @@ -namespace MQTTnet.Client.Connecting +using System.Collections.Generic; +using MQTTnet.Packets; + +namespace MQTTnet.Client.Connecting { + // TODO: Consider renaming this to _MqttClientConnectResult_ public class MqttClientAuthenticateResult { + public MqttClientConnectResultCode ResultCode { get; set; } + public bool IsSessionPresent { get; set; } - public MqttClientConnectResultCode ResultCode { get; set; } + public bool? WildcardSubscriptionAvailable { get; set; } + + public bool? RetainAvailable { get; set; } + + public string AssignedClientIdentifier { get; set; } + + public string AuthenticationMethod { get; set; } + + public byte[] AuthenticationData { get; set; } + + public uint? MaximumPacketSize { get; set; } + + public string ReasonString { get; set; } + + public ushort? ReceiveMaximum { get; set; } + + public string ResponseInformation { get; set; } + + public ushort? TopicAliasMaximum { get; set; } + + public string ServerReference { get; set; } + + public ushort? ServerKeepAlive { get; set; } + + public uint? SessionExpiryInterval { get; set; } + + public bool? SubscriptionIdentifiersAvailable { get; set; } + + public bool? SharedSubscriptionAvailable { get; set; } + + public List UserProperties { get; set; } } }