LCOV - code coverage report
Current view: top level - lib/src/voip/backend - call_backend_model.dart (source / functions) Coverage Total Hit
Test: merged.info Lines: 45.5 % 11 5
Test Date: 2025-10-13 02:23:18 Functions: - 0 0

            Line data    Source code
       1              : import 'dart:async';
       2              : 
       3              : import 'package:matrix/matrix.dart';
       4              : 
       5              : abstract class CallBackend {
       6              :   String type;
       7              : 
       8            6 :   CallBackend({
       9              :     required this.type,
      10              :   });
      11              : 
      12            6 :   factory CallBackend.fromJson(Map<String, Object?> json) {
      13            6 :     final String type = json['type'] as String;
      14            6 :     if (type == 'mesh') {
      15            6 :       return MeshBackend(
      16              :         type: type,
      17              :       );
      18            0 :     } else if (type == 'livekit') {
      19            0 :       return LiveKitBackend(
      20            0 :         livekitAlias: json['livekit_alias'] as String,
      21            0 :         livekitServiceUrl: json['livekit_service_url'] as String,
      22              :         type: type,
      23              :       );
      24              :     } else {
      25            0 :       throw MatrixSDKVoipException(
      26            0 :         'Invalid type: $type in CallBackend.fromJson',
      27              :       );
      28              :     }
      29              :   }
      30              : 
      31              :   Map<String, Object?> toJson();
      32              : 
      33              :   bool get e2eeEnabled;
      34              : 
      35              :   CallParticipant? get activeSpeaker;
      36              : 
      37              :   WrappedMediaStream? get localUserMediaStream;
      38              : 
      39              :   WrappedMediaStream? get localScreenshareStream;
      40              : 
      41              :   List<WrappedMediaStream> get userMediaStreams;
      42              : 
      43              :   List<WrappedMediaStream> get screenShareStreams;
      44              : 
      45              :   bool get isLocalVideoMuted;
      46              : 
      47              :   bool get isMicrophoneMuted;
      48              : 
      49              :   Future<WrappedMediaStream?> initLocalStream(
      50              :     GroupCallSession groupCall, {
      51              :     WrappedMediaStream? stream,
      52              :   });
      53              : 
      54              :   Future<void> updateMediaDeviceForCalls();
      55              : 
      56              :   Future<void> setupP2PCallsWithExistingMembers(GroupCallSession groupCall);
      57              : 
      58              :   Future<void> setupP2PCallWithNewMember(
      59              :     GroupCallSession groupCall,
      60              :     CallParticipant rp,
      61              :     CallMembership mem,
      62              :   );
      63              : 
      64              :   Future<void> dispose(GroupCallSession groupCall);
      65              : 
      66              :   Future<void> onNewParticipant(
      67              :     GroupCallSession groupCall,
      68              :     List<CallParticipant> anyJoined,
      69              :   );
      70              : 
      71              :   Future<void> onLeftParticipant(
      72              :     GroupCallSession groupCall,
      73              :     List<CallParticipant> anyLeft,
      74              :   );
      75              : 
      76              :   Future<void> preShareKey(GroupCallSession groupCall);
      77              : 
      78              :   Future<void> requestEncrytionKey(
      79              :     GroupCallSession groupCall,
      80              :     List<CallParticipant> remoteParticipants,
      81              :   );
      82              : 
      83              :   Future<void> onCallEncryption(
      84              :     GroupCallSession groupCall,
      85              :     String userId,
      86              :     String deviceId,
      87              :     Map<String, dynamic> content,
      88              :   );
      89              : 
      90              :   Future<void> onCallEncryptionKeyRequest(
      91              :     GroupCallSession groupCall,
      92              :     String userId,
      93              :     String deviceId,
      94              :     Map<String, dynamic> content,
      95              :   );
      96              : 
      97              :   Future<void> setDeviceMuted(
      98              :     GroupCallSession groupCall,
      99              :     bool muted,
     100              :     MediaInputKind kind,
     101              :   );
     102              : 
     103              :   Future<void> setScreensharingEnabled(
     104              :     GroupCallSession groupCall,
     105              :     bool enabled,
     106              :     String desktopCapturerSourceId,
     107              :   );
     108              : 
     109              :   List<Map<String, String>>? getCurrentFeeds();
     110              : 
     111              :   @override
     112              :   bool operator ==(Object other);
     113              :   @override
     114              :   int get hashCode;
     115              : }
        

Generated by: LCOV version 2.0-1