feat: (for now android only!) dscp retrieval and configuration methods
This commit is contained in:
parent
02cc6ad612
commit
fa4207dbee
6 changed files with 104 additions and 6 deletions
|
|
@ -3,6 +3,7 @@ import 'package:flutter/services.dart';
|
|||
|
||||
import 'liblinphone_flutter_platform_interface.dart';
|
||||
import 'models/call_type.dart';
|
||||
import 'models/dscp_values.dart';
|
||||
|
||||
/// An implementation of [LiblinphoneFlutterPlatform] that uses method channels.
|
||||
class MethodChannelLiblinphoneFlutter extends LiblinphoneFlutterPlatform {
|
||||
|
|
@ -143,4 +144,22 @@ class MethodChannelLiblinphoneFlutter extends LiblinphoneFlutterPlatform {
|
|||
Future<double> getPlaybackGain() async {
|
||||
return (await methodChannel.invokeMethod<double>('getPlaybackGain'))!;
|
||||
}
|
||||
|
||||
@override
|
||||
Future<bool> setDscp(int sipDscp, int audioDscp, int videoDscp) async {
|
||||
return (await methodChannel.invokeMethod<bool>('setDscp', <String, dynamic>{
|
||||
'sipDscp': sipDscp,
|
||||
'audioDscp': audioDscp,
|
||||
'videoDscp': videoDscp,
|
||||
}))!;
|
||||
}
|
||||
|
||||
@override
|
||||
Future<DscpValues> getDscp() async {
|
||||
final data = (await methodChannel.invokeMethod<Map<dynamic, dynamic>>(
|
||||
'getDscp',
|
||||
))!;
|
||||
final values = DscpValues.fromJson(data);
|
||||
return values;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue