Skip to content

Commit

Permalink
feat!: use interface modifier for Scripting API definitions
Browse files Browse the repository at this point in the history
  • Loading branch information
JKRhb committed May 13, 2023
1 parent 5ef5148 commit e9aca81
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion lib/src/scripting_api/consumed_thing.dart
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ typedef ErrorListener = void Function(Exception data);
/// See [WoT Scripting API Specification, Section 8][spec link].
///
/// [spec link]: https://w3c.github.io/wot-scripting-api/#the-consumedthing-interface
abstract class ConsumedThing {
abstract interface class ConsumedThing {
/// Returns the [ThingDescription] that represents the consumed Thing.
ThingDescription get thingDescription;

Expand Down
2 changes: 1 addition & 1 deletion lib/src/scripting_api/discovery/thing_discovery.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import 'thing_filter.dart';
/// Note: This interface definition does not conform to the current Scripting
/// API specification, which is still a Work-in-Progress when it comes
/// to discovery.
abstract class ThingDiscovery implements Stream<ThingDescription> {
abstract interface class ThingDiscovery implements Stream<ThingDescription> {
/// The [thingFilter] that is applied during the discovery process.
ThingFilter? get thingFilter;

Expand Down
2 changes: 1 addition & 1 deletion lib/src/scripting_api/exposed_thing.dart
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ typedef EventListenerHandler = Future<InteractionInput> Function();
/// See [WoT Scripting API Specification, Section 9][spec link].
///
/// [spec link]: https://w3c.github.io/wot-scripting-api/#the-exposedthing-interface
abstract class ExposedThing {
abstract interface class ExposedThing {
/// The [ThingDescription] that represents this [ExposedThing].
ThingDescription get thingDescription;

Expand Down
2 changes: 1 addition & 1 deletion lib/src/scripting_api/interaction_options.dart
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import 'package:meta/meta.dart';
///
/// [spec link]: https://w3c.github.io/wot-scripting-api/#the-interactionoptions-dictionary
@immutable
class InteractionOptions {
final class InteractionOptions {
/// Constructor
const InteractionOptions({this.formIndex, this.uriVariables, this.data});

Expand Down
2 changes: 1 addition & 1 deletion lib/src/scripting_api/interaction_output.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import '../definitions/form.dart';
/// See [WoT Scripting API Specification, Section 7.2][spec link].
///
/// [spec link]: https://w3c.github.io/wot-scripting-api/#the-interactionoutput-interface
abstract class InteractionOutput {
abstract interface class InteractionOutput {
/// The raw payload of the [InteractionOutput] as a Byte [Stream].
Stream<List<int>>? get data;

Expand Down
2 changes: 1 addition & 1 deletion lib/src/scripting_api/subscription.dart
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ enum SubscriptionType {
}

/// Represents a subscription to Property change and Event interactions.
abstract class Subscription {
abstract interface class Subscription {
/// Denotes whether the subsciption is active, i.e. it is not stopped because
/// of an error or because of invocation of the [stop] method.
bool get active;
Expand Down
2 changes: 1 addition & 1 deletion lib/src/scripting_api/wot.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import 'types.dart';
///
/// See WoT Scripting API specification,
/// [section 5](https://w3c.github.io/wot-scripting-api/#the-wot-namespace)
abstract class WoT {
abstract interface class WoT {
/// Asynchronously creates a [ConsumedThing] from a [thingDescription].
///
/// This [ConsumedThing] can then be used to perform interactions with the
Expand Down

0 comments on commit e9aca81

Please sign in to comment.