worldhopper/lib/services/server_handlers/opds_server_handler.dart

17 lines
625 B
Dart

import 'package:worldhopper/models/opds_feed.dart';
import 'package:worldhopper/models/opds_server.dart';
/// Abstract handler for server-specific behavior.
///
/// Each supported server software implements this class to provide
/// detection and (in the future) workaround hooks.
abstract class OPDSServerHandler {
/// Identifier stored in the database (e.g. "kavita").
String get identifier;
/// Human-readable name shown in the UI (e.g. "Kavita").
String get displayName;
/// Return true if this handler identifies the server from its root feed.
Future<bool> detect(OPDSServer server, OPDSFeed rootFeed);
}