mirror of
https://github.com/rustdesk/rustdesk.git
synced 2025-12-12 19:17:58 +00:00
@@ -141,6 +141,16 @@ class AbModel with ChangeNotifier {
|
||||
}
|
||||
}
|
||||
|
||||
void setPeerOption(String id, String key, String value) {
|
||||
final it = peers.where((p0) => p0['id'] == id);
|
||||
if (it.isEmpty) {
|
||||
debugPrint("${id} is not exists");
|
||||
return;
|
||||
} else {
|
||||
it.first[key] = value;
|
||||
}
|
||||
}
|
||||
|
||||
void clear() {
|
||||
peers.clear();
|
||||
tags.clear();
|
||||
|
||||
@@ -1010,6 +1010,14 @@ class FFI {
|
||||
return bind.mainSetLocalOption(key: key, value: value);
|
||||
}
|
||||
|
||||
Future<String> getPeerOption(String id, String key) {
|
||||
return bind.mainGetPeerOption(id: id, key: key);
|
||||
}
|
||||
|
||||
Future<void> setPeerOption(String id, String key, String value) {
|
||||
return bind.mainSetPeerOption(id: id, key: key, value: value);
|
||||
}
|
||||
|
||||
void setOption(String name, String value) {
|
||||
Map<String, String> res = Map()
|
||||
..["name"] = name
|
||||
|
||||
Reference in New Issue
Block a user