From: David ‘Bombe’ Roden Date: Sun, 9 Jan 2011 20:50:01 +0000 (+0100) Subject: Add “update found” event to core listener. X-Git-Tag: 0.3.7^2~8^2~3 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=0697b26de3127e2a9cebb7a1e500416f2acf9320;p=Sone.git Add “update found” event to core listener. --- 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