Skip to content

Commit ef92005

Browse files
authored
chore: fix missing @internal annotations (#993)
Fix missing @internal annotations
1 parent 08b12d6 commit ef92005

8 files changed

Lines changed: 17 additions & 2 deletions

File tree

.changes/mark-internal-symbols

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
patch type="chore" "Mark internal-only symbols with @internal"

example/lib/pages/prejoin.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ class _PreJoinPageState extends State<PreJoinPage> {
268268
if (!context.mounted) return;
269269
await Navigator.push<void>(
270270
context,
271-
MaterialPageRoute(builder: (_) => RoomPage(room, listener)),
271+
MaterialPageRoute(builder: (_) => RoomPage(room, listener, fastConnection: true)),
272272
);
273273
} catch (error) {
274274
print('Could not connect $error');

example/lib/pages/room.dart

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,12 @@ import '../widgets/participant_info.dart';
1414
class RoomPage extends StatefulWidget {
1515
final Room room;
1616
final EventsListener<RoomEvent> listener;
17+
final bool fastConnection;
1718

1819
const RoomPage(
1920
this.room,
2021
this.listener, {
22+
this.fastConnection = false,
2123
super.key,
2224
});
2325

@@ -28,7 +30,7 @@ class RoomPage extends StatefulWidget {
2830
class _RoomPageState extends State<RoomPage> {
2931
List<ParticipantTrack> participantTracks = [];
3032
EventsListener<RoomEvent> get _listener => widget.listener;
31-
bool get fastConnection => widget.room.engine.fastConnectOptions != null;
33+
bool get fastConnection => widget.fastConnection;
3234
@override
3335
void initState() {
3436
super.initState();

lib/src/core/engine.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ const defaultRetryDelaysInMs = [
6868
class Engine extends Disposable with EventsEmittable<EngineEvent> {
6969
static const _lossyDCLabel = '_lossy';
7070
static const _reliableDCLabel = '_reliable';
71+
@internal
7172
final SignalClient signalClient;
7273

7374
final PeerConnectionCreate _peerConnectionCreate;
@@ -978,6 +979,7 @@ class Engine extends Disposable with EventsEmittable<EngineEvent> {
978979
}
979980
}
980981

982+
@internal
981983
Future<void> handleReconnect(ClientDisconnectReason reason) async {
982984
if (_isClosed) {
983985
logger.fine('handleReconnect: engine is closed, skip');

lib/src/core/room.dart

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ class Room extends DisposableChangeNotifier with EventsEmittable<RoomEvent> {
109109
UnmodifiableListView<Participant> get activeSpeakers => UnmodifiableListView<Participant>(_activeSpeakers);
110110
List<Participant> _activeSpeakers = [];
111111

112+
@internal
112113
final Engine engine;
113114
// suppport for multiple event listeners
114115
late final EventsListener<EngineEvent> _engineListener;
@@ -1293,6 +1294,7 @@ extension DataStreamRoomMethods on Room {
12931294
_byteStreamHandlers.remove(topic);
12941295
}
12951296

1297+
@internal
12961298
Future<void> handleStreamHeader(
12971299
lk_models.DataStream_Header streamHeader, String participantIdentity, EncryptionType encryptionType) async {
12981300
if (streamHeader.hasByteHeader()) {
@@ -1382,6 +1384,7 @@ extension DataStreamRoomMethods on Room {
13821384
}
13831385
}
13841386

1387+
@internal
13851388
void handleStreamChunk(lk_models.DataStream_Chunk chunk, EncryptionType encryptionType) {
13861389
final fileBuffer = _byteStreamControllers[chunk.streamId];
13871390

@@ -1419,6 +1422,7 @@ extension DataStreamRoomMethods on Room {
14191422
}
14201423
}
14211424

1425+
@internal
14221426
Future<void> handleStreamTrailer(lk_models.DataStream_Trailer trailer, EncryptionType encryptionType) async {
14231427
final textBuffer = _textStreamControllers[trailer.streamId];
14241428
if (textBuffer != null) {
@@ -1464,6 +1468,7 @@ extension DataStreamRoomMethods on Room {
14641468
}
14651469
}
14661470

1471+
@internal
14671472
Future<void> validateParticipantHasNoActiveDataStreams(String participantIdentity) async {
14681473
// Terminate any in flight data stream receives from the given participant
14691474
final textStreamsBeingSentByDisconnectingParticipant = _textStreamControllers.values

lib/src/participant/local.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -996,6 +996,7 @@ extension RPCMethods on LocalParticipant {
996996
await room.engine.sendDataPacket(packet, reliability: Reliability.reliable);
997997
}
998998

999+
@internal
9991000
void handleIncomingRpcAck(String requestId) {
10001001
final handler = _pendingAcks[requestId];
10011002
if (handler != null) {
@@ -1006,6 +1007,7 @@ extension RPCMethods on LocalParticipant {
10061007
}
10071008
}
10081009

1010+
@internal
10091011
void handleIncomingRpcResponse(
10101012
String requestId,
10111013
String? payload,
@@ -1020,6 +1022,7 @@ extension RPCMethods on LocalParticipant {
10201022
}
10211023
}
10221024

1025+
@internal
10231026
Future<void> handleIncomingRpcRequest(
10241027
String callerIdentity,
10251028
String requestId,

lib/src/publication/track_publication.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ abstract class TrackPublication<T extends Track> extends Disposable {
8686
/// True when the track is published with source [TrackSource.screenShareVideo].
8787
bool get isScreenShare => kind == TrackType.VIDEO && source == TrackSource.screenShareVideo;
8888

89+
@internal
8990
void updateFromInfo(lk_models.TrackInfo info) {
9091
// ignore: deprecated_member_use_from_same_package
9192
_simulcasted = info.simulcast;

lib/src/track/local/video.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -362,6 +362,7 @@ extension LocalVideoTrackExt on LocalVideoTrack {
362362
return newCodecs;
363363
}
364364

365+
@internal
365366
Future<void> updatePublishingLayers(
366367
LocalTrack? track,
367368
List<lk_rtc.SubscribedQuality> layers,

0 commit comments

Comments
 (0)