Skip to content

Commit

Permalink
fixup! Implement ExposedThing functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
JKRhb committed Jul 9, 2024
1 parent 2a88434 commit ac13ae0
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
19 changes: 13 additions & 6 deletions lib/src/core/implementation/exposed_thing.dart
Original file line number Diff line number Diff line change
Expand Up @@ -324,15 +324,22 @@ class ExposedThing implements scripting_api.ExposedThing, ExposableThing {

@override
Future<void> handleWriteMultipleProperties(
List<String> propertyNames,
Content input, {
PropertyContentMap inputs, {
int? formIndex,
Map<String, Object>? uriVariables,
Object? data,
}) {
// TODO: implement handleWriteMultipleProperties
throw UnimplementedError();
}
}) async =>
Future.wait(
inputs.entries.map(
(propertyContentMapEntry) => handleWriteProperty(
propertyContentMapEntry.key,
propertyContentMapEntry.value,
formIndex: formIndex,
uriVariables: uriVariables,
data: data,
),
),
);

@override
Future<void> handleObserveProperty(
Expand Down
3 changes: 1 addition & 2 deletions lib/src/core/protocol_interfaces/exposable_thing.dart
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,7 @@ abstract interface class ExposableThing {

/// Handles a `writemultipleproperties` operation triggered by a TD consumer.
Future<void> handleWriteMultipleProperties(
List<String> propertyNames,
Content input, {
PropertyContentMap inputs, {
int? formIndex,
Map<String, Object>? uriVariables,
Object? data,
Expand Down

0 comments on commit ac13ae0

Please sign in to comment.