Skip to content

Commit

Permalink
feat!: use base instead of interface for ProtocolClient class
Browse files Browse the repository at this point in the history
  • Loading branch information
JKRhb committed May 29, 2024
1 parent 9e1ac1f commit 26a8075
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/src/binding_coap/coap_client.dart
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ coap.PskCredentialsCallback? _createPskCallback(
}

/// A [ProtocolClient] for the Constrained Application Protocol (CoAP).
final class CoapClient implements ProtocolClient {
final class CoapClient extends ProtocolClient {
/// Creates a new [CoapClient] based on an optional [CoapConfig].
CoapClient({
CoapConfig? coapConfig,
Expand Down
2 changes: 1 addition & 1 deletion lib/src/binding_http/http_client.dart
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const _authorizationHeader = "Authorization";
/// [RFC 7616]: https://datatracker.ietf.org/doc/html/rfc7616
/// [RFC 6750]: https://datatracker.ietf.org/doc/html/rfc6750
/// [`ComboSecurityScheme`]: https://w3c.github.io/wot-thing-description/#combosecurityscheme
final class HttpClient implements ProtocolClient {
final class HttpClient extends ProtocolClient {
/// Creates a new [HttpClient].
HttpClient({
AsyncClientSecurityCallback<BasicCredentials>? basicCredentialsCallback,
Expand Down
2 changes: 1 addition & 1 deletion lib/src/binding_mqtt/mqtt_client.dart
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import "mqtt_subscription.dart";
/// [ProtocolClient] for supporting the MQTT protocol.
///
/// Currently, only MQTT version 3.1.1 is supported.
final class MqttClient implements ProtocolClient {
final class MqttClient extends ProtocolClient {
/// Constructor.
MqttClient({
MqttConfig? mqttConfig,
Expand Down
2 changes: 1 addition & 1 deletion lib/src/core/protocol_interfaces/protocol_client.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import "../implementation.dart";
import "../scripting_api.dart";

/// Base class for a Protocol Client.
abstract interface class ProtocolClient {
abstract base class ProtocolClient {
/// Starts this [ProtocolClient].
Future<void> start();

Expand Down
2 changes: 1 addition & 1 deletion test/core/discovery_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ const invalidTestThingDescription2 = '''
{"foo": "bar"}
''';

class _MockedProtocolClient implements ProtocolClient {
final class _MockedProtocolClient extends ProtocolClient {
@override
Stream<DiscoveryContent> discoverWithCoreLinkFormat(Uri uri) {
// TODO: implement discoverWithCoreLinkFormat
Expand Down

0 comments on commit 26a8075

Please sign in to comment.