From 12e56b1c9a9e215a663982ff8a649d9f5a962c0b Mon Sep 17 00:00:00 2001 From: Zlatin Balevsky Date: Mon, 9 Mar 2020 17:37:17 +0000 Subject: [PATCH] events associated with updating a feed --- .../com/muwire/core/filefeeds/FeedFetchEvent.groovy | 10 ++++++++++ .../com/muwire/core/filefeeds/FeedFetchStatus.java | 5 +++++ .../muwire/core/filefeeds/FeedItemFetchedEvent.groovy | 7 +++++++ 3 files changed, 22 insertions(+) create mode 100644 core/src/main/groovy/com/muwire/core/filefeeds/FeedFetchEvent.groovy create mode 100644 core/src/main/groovy/com/muwire/core/filefeeds/FeedFetchStatus.java create mode 100644 core/src/main/groovy/com/muwire/core/filefeeds/FeedItemFetchedEvent.groovy diff --git a/core/src/main/groovy/com/muwire/core/filefeeds/FeedFetchEvent.groovy b/core/src/main/groovy/com/muwire/core/filefeeds/FeedFetchEvent.groovy new file mode 100644 index 00000000..202e8151 --- /dev/null +++ b/core/src/main/groovy/com/muwire/core/filefeeds/FeedFetchEvent.groovy @@ -0,0 +1,10 @@ +package com.muwire.core.filefeeds + +import com.muwire.core.Event +import com.muwire.core.Persona + +class FeedFetchEvent extends Event { + Persona host + FeedFetchStatus status + int totalItems +} diff --git a/core/src/main/groovy/com/muwire/core/filefeeds/FeedFetchStatus.java b/core/src/main/groovy/com/muwire/core/filefeeds/FeedFetchStatus.java new file mode 100644 index 00000000..7545252e --- /dev/null +++ b/core/src/main/groovy/com/muwire/core/filefeeds/FeedFetchStatus.java @@ -0,0 +1,5 @@ +package com.muwire.core.filefeeds; + +public enum FeedFetchStatus { + CONNECTING, FETCHING, FINISHED, FAILED +} diff --git a/core/src/main/groovy/com/muwire/core/filefeeds/FeedItemFetchedEvent.groovy b/core/src/main/groovy/com/muwire/core/filefeeds/FeedItemFetchedEvent.groovy new file mode 100644 index 00000000..75885f5a --- /dev/null +++ b/core/src/main/groovy/com/muwire/core/filefeeds/FeedItemFetchedEvent.groovy @@ -0,0 +1,7 @@ +package com.muwire.core.filefeeds + +import com.muwire.core.Event + +class FeedItemFetchedEvent extends Event { + FeedItem item +}