12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879 |
- import 'package:plugin_platform_interface/plugin_platform_interface.dart';
- import 'wl_base_help_method_channel.dart';
- abstract class WlBaseHelpPlatform extends PlatformInterface {
- /// Constructs a WlBaseHelpPlatform.
- WlBaseHelpPlatform() : super(token: _token);
- static final Object _token = Object();
- static WlBaseHelpPlatform _instance = MethodChannelWlBaseHelp();
- /// The default instance of [WlBaseHelpPlatform] to use.
- ///
- /// Defaults to [MethodChannelWlBaseHelp].
- static WlBaseHelpPlatform get instance => _instance;
- /// Platform-specific implementations should set this with their own
- /// platform-specific class that extends [WlBaseHelpPlatform] when
- /// they register themselves.
- static set instance(WlBaseHelpPlatform instance) {
- PlatformInterface.verifyToken(instance, _token);
- _instance = instance;
- }
- Future<String?> getPlatformVersion() {
- throw UnimplementedError('platformVersion() has not been implemented.');
- }
- Future<String?> runAsAdministrator() async {
- throw UnimplementedError('runAsAdministrator() has not been implemented.');
- }
- Future<bool?> isRunningAsAdmin() async {
- throw UnimplementedError('runAsAdministrator() has not been implemented.');
- }
- Future<void> showConsole() async {
- throw UnimplementedError('showConsole() has not been implemented.');
- }
- Future<void> hideConsole() async {
- throw UnimplementedError('hideConsole() has not been implemented.');
- }
- Future<bool?> isProcessRunning(String processName) async {
- throw UnimplementedError('isProcessRunning() has not been implemented.');
- }
- Future<void> killProcess(String processName) async {
- throw UnimplementedError('killProcess() has not been implemented.');
- }
- Future<bool?> macIsAdmin() async {
- throw UnimplementedError('macIsAdmin() has not been implemented.');
- }
- Future<bool?> macIsProcessRunning() async {
- throw UnimplementedError('isProcessRunning() has not been implemented.');
- }
- // 新增:启用代理
- Future<void> startProxy(int port) async {
- throw UnimplementedError('startProxy() has not been implemented.');
- }
- // 新增:禁用代理
- Future<void> stopProxy() async {
- throw UnimplementedError('stopProxy() has not been implemented.');
- }
- // 新增:检测代理是否启用
- Future<bool> isProxyEnabled() async {
- throw UnimplementedError('isProxyEnabled() has not been implemented.');
- }
- Future<bool> isDialUpEnabled() async {
- throw UnimplementedError('isDialUpEnabled() has not been implemented.');
- }
- }
|