2023-02-13 14:13:32 +00:00
|
|
|
import 'package:selfprivacy/logic/api_maps/generic_result.dart';
|
2023-02-07 16:51:15 +00:00
|
|
|
import 'package:selfprivacy/logic/models/server_provider_location.dart';
|
|
|
|
import 'package:selfprivacy/logic/models/server_type.dart';
|
2023-01-30 15:44:52 +00:00
|
|
|
|
2023-02-13 14:13:32 +00:00
|
|
|
export 'package:selfprivacy/logic/api_maps/generic_result.dart';
|
|
|
|
|
2023-01-30 15:44:52 +00:00
|
|
|
abstract class ServerProvider {
|
2023-02-13 14:13:32 +00:00
|
|
|
Future<GenericResult<bool>> trySetServerType(final ServerType type);
|
|
|
|
Future<GenericResult<bool>> tryInitApiByToken(final String token);
|
|
|
|
Future<GenericResult<List<ServerProviderLocation>>> getAvailableLocations();
|
|
|
|
Future<GenericResult<List<ServerType>>> getServerTypes({
|
2023-02-07 16:51:15 +00:00
|
|
|
required final ServerProviderLocation location,
|
|
|
|
});
|
2023-02-13 14:13:32 +00:00
|
|
|
|
|
|
|
GenericResult<bool> get success => GenericResult(success: true, data: true);
|
2023-01-30 15:44:52 +00:00
|
|
|
}
|