Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(core): create separate module for protocol_interfaces #161

Merged
merged 1 commit into from
May 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions lib/core.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ library core;
export "src/core/definitions.dart";
export "src/core/exceptions.dart";
export "src/core/implementation.dart";
export "src/core/protocol_interfaces.dart";
export "src/core/scripting_api.dart";
3 changes: 0 additions & 3 deletions lib/src/core/implementation.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,4 @@ export "implementation/codecs/content_codec.dart";
export "implementation/content.dart";
export "implementation/content_serdes.dart";
export "implementation/discovery/discovery_configuration.dart";
export "implementation/protocol_interfaces/protocol_client.dart";
export "implementation/protocol_interfaces/protocol_client_factory.dart";
export "implementation/protocol_interfaces/protocol_server.dart";
export "implementation/servient.dart" show Servient;
3 changes: 2 additions & 1 deletion lib/src/core/implementation/consumed_thing.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@

import "../definitions.dart";
import "../exceptions.dart";
import "../protocol_interfaces.dart";
import "../scripting_api.dart" as scripting_api;

import "augmented_form.dart";
import "content.dart";
import "interaction_output.dart";
import "protocol_interfaces/protocol_client.dart";
import "servient.dart";

/// Implementation of the [scripting_api.ConsumedThing] interface.
Expand Down
5 changes: 2 additions & 3 deletions lib/src/core/implementation/servient.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,13 @@ import "package:uuid/uuid.dart";
import "../definitions.dart";
import "../definitions/context.dart";
import "../exceptions.dart";
import "../protocol_interfaces.dart";
import "../scripting_api.dart" as scripting_api;

import "consumed_thing.dart";
import "content_serdes.dart";
import "discovery/discovery_configuration.dart";
import "exposed_thing.dart";
import "protocol_interfaces/protocol_client.dart";
import "protocol_interfaces/protocol_client_factory.dart";
import "protocol_interfaces/protocol_server.dart";
import "thing_discovery.dart";
import "wot.dart";

Expand Down
3 changes: 2 additions & 1 deletion lib/src/core/implementation/thing_discovery.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,11 @@ import "package:multicast_dns/multicast_dns.dart";

import "../definitions.dart";
import "../exceptions.dart";
import "../protocol_interfaces.dart";
import "../scripting_api.dart" as scripting_api;

import "content.dart";
import "discovery/discovery_configuration.dart";
import "protocol_interfaces/protocol_client.dart";
import "servient.dart";

/// Implementation of the [scripting_api.ThingDiscovery] interface.
Expand Down
9 changes: 9 additions & 0 deletions lib/src/core/protocol_interfaces.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// Copyright 2024 Contributors to the Eclipse Foundation. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
//
// SPDX-License-Identifier: BSD-3-Clause

export "protocol_interfaces/protocol_client.dart";
export "protocol_interfaces/protocol_client_factory.dart";
export "protocol_interfaces/protocol_server.dart";
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@
//
// SPDX-License-Identifier: BSD-3-Clause

import "../../scripting_api/subscription.dart";
import "../augmented_form.dart";
import "../content.dart";
import "../implementation.dart";
import "../scripting_api.dart";

/// Base class for a Protocol Client.
abstract interface class ProtocolClient {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import "package:meta/meta.dart";

import "../../definitions.dart";
import "../definitions.dart";
import "protocol_client.dart";

/// Base class for a factory that produces [ProtocolClient]s.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
//
// SPDX-License-Identifier: BSD-3-Clause

import "../../definitions/credentials/callbacks.dart";
import "../../scripting_api/exposed_thing.dart";
import "../definitions/credentials/callbacks.dart";
import "../scripting_api/exposed_thing.dart";

/// Base class for a Protocol Server.
abstract interface class ProtocolServer {
Expand Down
Loading