From 0697b26de3127e2a9cebb7a1e500416f2acf9320 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Sun, 9 Jan 2011 21:50:01 +0100 Subject: [PATCH] =?utf8?q?Add=20=E2=80=9Cupdate=20found=E2=80=9D=20event?= =?utf8?q?=20to=20core=20listener.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../java/net/pterodactylus/sone/core/CoreListener.java | 11 +++++++++++ .../net/pterodactylus/sone/core/CoreListenerManager.java | 16 ++++++++++++++++ .../java/net/pterodactylus/sone/web/WebInterface.java | 8 ++++++++ 3 files changed, 35 insertions(+) diff --git a/src/main/java/net/pterodactylus/sone/core/CoreListener.java b/src/main/java/net/pterodactylus/sone/core/CoreListener.java index 5d5e715..5fbb333 100644 --- a/src/main/java/net/pterodactylus/sone/core/CoreListener.java +++ b/src/main/java/net/pterodactylus/sone/core/CoreListener.java @@ -22,6 +22,7 @@ import java.util.EventListener; import net.pterodactylus.sone.data.Post; import net.pterodactylus.sone.data.Reply; import net.pterodactylus.sone.data.Sone; +import net.pterodactylus.util.version.Version; /** * Listener interface for objects that want to be notified on certain @@ -127,4 +128,14 @@ public interface CoreListener extends EventListener { */ public void soneUnlocked(Sone sone); + /** + * Notifies a listener that a new version has been found. + * + * @param version + * The version that was found + * @param releaseTime + * The release time of the new version + */ + public void updateFound(Version version, long releaseTime); + } diff --git a/src/main/java/net/pterodactylus/sone/core/CoreListenerManager.java b/src/main/java/net/pterodactylus/sone/core/CoreListenerManager.java index 464342c..4fc9532 100644 --- a/src/main/java/net/pterodactylus/sone/core/CoreListenerManager.java +++ b/src/main/java/net/pterodactylus/sone/core/CoreListenerManager.java @@ -21,6 +21,7 @@ import net.pterodactylus.sone.data.Post; import net.pterodactylus.sone.data.Reply; import net.pterodactylus.sone.data.Sone; import net.pterodactylus.util.event.AbstractListenerManager; +import net.pterodactylus.util.version.Version; /** * Manager for {@link CoreListener}s. @@ -197,4 +198,19 @@ public class CoreListenerManager extends AbstractListenerManager