From 687db0f5ed13ab0ee4e3a9c09f85359d987a13c0 Mon Sep 17 00:00:00 2001 From: ByteHamster Date: Fri, 5 Apr 2024 20:08:25 +0200 Subject: Merge :net:sync:model and :net:sync:service-interface (#7063) --- net/sync/gpoddernet/build.gradle | 2 +- .../antennapod/net/sync/gpoddernet/GpodnetService.java | 12 ++++++------ .../net/sync/gpoddernet/GpodnetServiceException.java | 2 +- .../net/sync/gpoddernet/mapper/ResponseMapper.java | 7 +++---- .../gpoddernet/model/GpodnetEpisodeActionPostResponse.java | 2 +- .../sync/gpoddernet/model/GpodnetUploadChangesResponse.java | 2 +- .../antennapod/net/sync/nextcloud/NextcloudSyncService.java | 12 ++++++------ .../nextcloud/NextcloudSynchronizationServiceException.java | 2 +- 8 files changed, 20 insertions(+), 21 deletions(-) (limited to 'net/sync/gpoddernet') diff --git a/net/sync/gpoddernet/build.gradle b/net/sync/gpoddernet/build.gradle index ff1fc2f00..3eec12b58 100644 --- a/net/sync/gpoddernet/build.gradle +++ b/net/sync/gpoddernet/build.gradle @@ -8,7 +8,7 @@ android { } dependencies { - implementation project(':net:sync:model') + implementation project(':net:sync:service-interface') annotationProcessor "androidx.annotation:annotation:$annotationVersion" implementation "androidx.appcompat:appcompat:$appcompatVersion" diff --git a/net/sync/gpoddernet/src/main/java/de/danoeh/antennapod/net/sync/gpoddernet/GpodnetService.java b/net/sync/gpoddernet/src/main/java/de/danoeh/antennapod/net/sync/gpoddernet/GpodnetService.java index c65e654aa..b04e9bdc9 100644 --- a/net/sync/gpoddernet/src/main/java/de/danoeh/antennapod/net/sync/gpoddernet/GpodnetService.java +++ b/net/sync/gpoddernet/src/main/java/de/danoeh/antennapod/net/sync/gpoddernet/GpodnetService.java @@ -5,6 +5,12 @@ import android.util.Log; import androidx.annotation.NonNull; import de.danoeh.antennapod.net.sync.HostnameParser; +import de.danoeh.antennapod.net.sync.serviceinterface.EpisodeAction; +import de.danoeh.antennapod.net.sync.serviceinterface.EpisodeActionChanges; +import de.danoeh.antennapod.net.sync.serviceinterface.ISyncService; +import de.danoeh.antennapod.net.sync.serviceinterface.SubscriptionChanges; +import de.danoeh.antennapod.net.sync.serviceinterface.SyncServiceException; +import de.danoeh.antennapod.net.sync.serviceinterface.UploadChangesResponse; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; @@ -27,12 +33,6 @@ import de.danoeh.antennapod.net.sync.gpoddernet.model.GpodnetDevice; import de.danoeh.antennapod.net.sync.gpoddernet.model.GpodnetEpisodeActionPostResponse; import de.danoeh.antennapod.net.sync.gpoddernet.model.GpodnetPodcast; import de.danoeh.antennapod.net.sync.gpoddernet.model.GpodnetUploadChangesResponse; -import de.danoeh.antennapod.net.sync.model.EpisodeAction; -import de.danoeh.antennapod.net.sync.model.EpisodeActionChanges; -import de.danoeh.antennapod.net.sync.model.ISyncService; -import de.danoeh.antennapod.net.sync.model.SubscriptionChanges; -import de.danoeh.antennapod.net.sync.model.SyncServiceException; -import de.danoeh.antennapod.net.sync.model.UploadChangesResponse; import okhttp3.Credentials; import okhttp3.MediaType; import okhttp3.OkHttpClient; diff --git a/net/sync/gpoddernet/src/main/java/de/danoeh/antennapod/net/sync/gpoddernet/GpodnetServiceException.java b/net/sync/gpoddernet/src/main/java/de/danoeh/antennapod/net/sync/gpoddernet/GpodnetServiceException.java index 298c59073..5f16afbd1 100644 --- a/net/sync/gpoddernet/src/main/java/de/danoeh/antennapod/net/sync/gpoddernet/GpodnetServiceException.java +++ b/net/sync/gpoddernet/src/main/java/de/danoeh/antennapod/net/sync/gpoddernet/GpodnetServiceException.java @@ -1,6 +1,6 @@ package de.danoeh.antennapod.net.sync.gpoddernet; -import de.danoeh.antennapod.net.sync.model.SyncServiceException; +import de.danoeh.antennapod.net.sync.serviceinterface.SyncServiceException; public class GpodnetServiceException extends SyncServiceException { private static final long serialVersionUID = 1L; diff --git a/net/sync/gpoddernet/src/main/java/de/danoeh/antennapod/net/sync/gpoddernet/mapper/ResponseMapper.java b/net/sync/gpoddernet/src/main/java/de/danoeh/antennapod/net/sync/gpoddernet/mapper/ResponseMapper.java index c8e607d74..2d2409eac 100644 --- a/net/sync/gpoddernet/src/main/java/de/danoeh/antennapod/net/sync/gpoddernet/mapper/ResponseMapper.java +++ b/net/sync/gpoddernet/src/main/java/de/danoeh/antennapod/net/sync/gpoddernet/mapper/ResponseMapper.java @@ -2,6 +2,9 @@ package de.danoeh.antennapod.net.sync.gpoddernet.mapper; import androidx.annotation.NonNull; +import de.danoeh.antennapod.net.sync.serviceinterface.EpisodeAction; +import de.danoeh.antennapod.net.sync.serviceinterface.EpisodeActionChanges; +import de.danoeh.antennapod.net.sync.serviceinterface.SubscriptionChanges; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; @@ -10,10 +13,6 @@ import java.util.ArrayList; import java.util.LinkedList; import java.util.List; -import de.danoeh.antennapod.net.sync.model.EpisodeAction; -import de.danoeh.antennapod.net.sync.model.EpisodeActionChanges; -import de.danoeh.antennapod.net.sync.model.SubscriptionChanges; - public class ResponseMapper { public static SubscriptionChanges readSubscriptionChangesFromJsonObject(@NonNull JSONObject object) diff --git a/net/sync/gpoddernet/src/main/java/de/danoeh/antennapod/net/sync/gpoddernet/model/GpodnetEpisodeActionPostResponse.java b/net/sync/gpoddernet/src/main/java/de/danoeh/antennapod/net/sync/gpoddernet/model/GpodnetEpisodeActionPostResponse.java index 6d573ebfc..74e77ff44 100644 --- a/net/sync/gpoddernet/src/main/java/de/danoeh/antennapod/net/sync/gpoddernet/model/GpodnetEpisodeActionPostResponse.java +++ b/net/sync/gpoddernet/src/main/java/de/danoeh/antennapod/net/sync/gpoddernet/model/GpodnetEpisodeActionPostResponse.java @@ -2,7 +2,7 @@ package de.danoeh.antennapod.net.sync.gpoddernet.model; import androidx.collection.ArrayMap; -import de.danoeh.antennapod.net.sync.model.UploadChangesResponse; +import de.danoeh.antennapod.net.sync.serviceinterface.UploadChangesResponse; import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; import org.json.JSONArray; diff --git a/net/sync/gpoddernet/src/main/java/de/danoeh/antennapod/net/sync/gpoddernet/model/GpodnetUploadChangesResponse.java b/net/sync/gpoddernet/src/main/java/de/danoeh/antennapod/net/sync/gpoddernet/model/GpodnetUploadChangesResponse.java index 7b09531a5..7d3f36fe4 100644 --- a/net/sync/gpoddernet/src/main/java/de/danoeh/antennapod/net/sync/gpoddernet/model/GpodnetUploadChangesResponse.java +++ b/net/sync/gpoddernet/src/main/java/de/danoeh/antennapod/net/sync/gpoddernet/model/GpodnetUploadChangesResponse.java @@ -3,7 +3,7 @@ package de.danoeh.antennapod.net.sync.gpoddernet.model; import androidx.collection.ArrayMap; import de.danoeh.antennapod.net.sync.gpoddernet.GpodnetService; -import de.danoeh.antennapod.net.sync.model.UploadChangesResponse; +import de.danoeh.antennapod.net.sync.serviceinterface.UploadChangesResponse; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; diff --git a/net/sync/gpoddernet/src/main/java/de/danoeh/antennapod/net/sync/nextcloud/NextcloudSyncService.java b/net/sync/gpoddernet/src/main/java/de/danoeh/antennapod/net/sync/nextcloud/NextcloudSyncService.java index eaee76baf..e98976c81 100644 --- a/net/sync/gpoddernet/src/main/java/de/danoeh/antennapod/net/sync/nextcloud/NextcloudSyncService.java +++ b/net/sync/gpoddernet/src/main/java/de/danoeh/antennapod/net/sync/nextcloud/NextcloudSyncService.java @@ -3,12 +3,12 @@ package de.danoeh.antennapod.net.sync.nextcloud; import de.danoeh.antennapod.net.sync.HostnameParser; import de.danoeh.antennapod.net.sync.gpoddernet.mapper.ResponseMapper; import de.danoeh.antennapod.net.sync.gpoddernet.model.GpodnetUploadChangesResponse; -import de.danoeh.antennapod.net.sync.model.EpisodeAction; -import de.danoeh.antennapod.net.sync.model.EpisodeActionChanges; -import de.danoeh.antennapod.net.sync.model.ISyncService; -import de.danoeh.antennapod.net.sync.model.SubscriptionChanges; -import de.danoeh.antennapod.net.sync.model.SyncServiceException; -import de.danoeh.antennapod.net.sync.model.UploadChangesResponse; +import de.danoeh.antennapod.net.sync.serviceinterface.EpisodeAction; +import de.danoeh.antennapod.net.sync.serviceinterface.EpisodeActionChanges; +import de.danoeh.antennapod.net.sync.serviceinterface.ISyncService; +import de.danoeh.antennapod.net.sync.serviceinterface.SubscriptionChanges; +import de.danoeh.antennapod.net.sync.serviceinterface.SyncServiceException; +import de.danoeh.antennapod.net.sync.serviceinterface.UploadChangesResponse; import okhttp3.Credentials; import okhttp3.HttpUrl; import okhttp3.MediaType; diff --git a/net/sync/gpoddernet/src/main/java/de/danoeh/antennapod/net/sync/nextcloud/NextcloudSynchronizationServiceException.java b/net/sync/gpoddernet/src/main/java/de/danoeh/antennapod/net/sync/nextcloud/NextcloudSynchronizationServiceException.java index d907c229e..db66abce6 100644 --- a/net/sync/gpoddernet/src/main/java/de/danoeh/antennapod/net/sync/nextcloud/NextcloudSynchronizationServiceException.java +++ b/net/sync/gpoddernet/src/main/java/de/danoeh/antennapod/net/sync/nextcloud/NextcloudSynchronizationServiceException.java @@ -1,6 +1,6 @@ package de.danoeh.antennapod.net.sync.nextcloud; -import de.danoeh.antennapod.net.sync.model.SyncServiceException; +import de.danoeh.antennapod.net.sync.serviceinterface.SyncServiceException; public class NextcloudSynchronizationServiceException extends SyncServiceException { public NextcloudSynchronizationServiceException(Throwable e) { -- cgit v1.2.3