summaryrefslogtreecommitdiff
path: root/lib/services/iblacklist_provider_service.dart
diff options
context:
space:
mode:
Diffstat (limited to 'lib/services/iblacklist_provider_service.dart')
-rw-r--r--lib/services/iblacklist_provider_service.dart31
1 files changed, 31 insertions, 0 deletions
diff --git a/lib/services/iblacklist_provider_service.dart b/lib/services/iblacklist_provider_service.dart
new file mode 100644
index 0000000..c66a909
--- /dev/null
+++ b/lib/services/iblacklist_provider_service.dart
@@ -0,0 +1,31 @@
+import 'dart:async';
+
+class BlacklistEntry {
+ String postalcodeNumeric;
+ String postalcodeAplha;
+ int houseNumber;
+ String houseNumberExtra;
+
+ BlacklistEntry(this.postalcodeNumeric, this.postalcodeAplha, this.houseNumber,
+ this.houseNumberExtra);
+
+ BlacklistEntry.fromJson(Map<String, dynamic> json)
+ : postalcodeNumeric = json['postalcodeNumeric'],
+ postalcodeAplha = json['postalcodeAplha'],
+ houseNumber = json['houseNumber'],
+ houseNumberExtra = json['houseNumberExtra'];
+
+ Map<String, dynamic> toJson() {
+ return {
+ 'postalcodeNumeric': postalcodeNumeric,
+ 'postalcodeAplha': postalcodeAplha,
+ 'houseNumber': houseNumber,
+ 'houseNumberExtra': houseNumberExtra,
+ };
+ }
+}
+
+abstract class IBlacklistProviderService {
+ Future<List<BlacklistEntry>> getBlacklist();
+ Future<void> addToBlacklist(BlacklistEntry data);
+}