Line data Source code
1 : import 'package:matrix/matrix.dart';
2 :
3 : /// UNSTABLE API WARNING
4 : /// The class herirachy is currently experimental and could have breaking changes
5 : /// often.
6 : sealed class MatrixRTCCallEvent {}
7 :
8 : sealed class ParticipantsChangeEvent implements MatrixRTCCallEvent {}
9 :
10 : final class ParticipantsJoinEvent implements ParticipantsChangeEvent {
11 : final List<CallParticipant> participants;
12 :
13 4 : ParticipantsJoinEvent({required this.participants});
14 : }
15 :
16 : final class ParticipantsLeftEvent implements ParticipantsChangeEvent {
17 : final List<CallParticipant> participants;
18 :
19 0 : ParticipantsLeftEvent({required this.participants});
20 : }
21 :
22 : sealed class CallReactionEvent implements MatrixRTCCallEvent {}
23 :
24 : final class CallReactionAddedEvent implements CallReactionEvent {
25 : final CallParticipant participant;
26 : final String reactionKey;
27 : final String membershipEventId;
28 : final String reactionEventId;
29 : final bool isEphemeral;
30 :
31 2 : CallReactionAddedEvent({
32 : required this.participant,
33 : required this.reactionKey,
34 : required this.membershipEventId,
35 : required this.reactionEventId,
36 : required this.isEphemeral,
37 : });
38 : }
39 :
40 : final class CallReactionRemovedEvent implements CallReactionEvent {
41 : final CallParticipant participant;
42 : final String redactedEventId;
43 :
44 2 : CallReactionRemovedEvent({
45 : required this.participant,
46 : required this.redactedEventId,
47 : });
48 : }
|