X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fcore%2FCoreListener.java;h=0e497e8bf1d6477aa8054896df55da367b9b5173;hb=89ab5e83e3fa9afb983093ac4ab8445f83348ea3;hp=5fbb333ea226e5c580e17b4d449ad3a7f5d83261;hpb=a474ae28d3820854e9a8d8ea5b9f3a44b06fa737;p=Sone.git diff --git a/src/main/java/net/pterodactylus/sone/core/CoreListener.java b/src/main/java/net/pterodactylus/sone/core/CoreListener.java index 5fbb333..0e497e8 100644 --- a/src/main/java/net/pterodactylus/sone/core/CoreListener.java +++ b/src/main/java/net/pterodactylus/sone/core/CoreListener.java @@ -97,6 +97,14 @@ public interface CoreListener extends EventListener { public void markReplyKnown(Reply reply); /** + * Notifies a listener that the given Sone was removed. + * + * @param sone + * The removed Sone + */ + public void soneRemoved(Sone sone); + + /** * Notifies a listener that the given post was removed. * * @param post @@ -129,13 +137,47 @@ public interface CoreListener extends EventListener { public void soneUnlocked(Sone sone); /** + * Notifies a listener that the insert of the given Sone has started. + * + * @see SoneInsertListener#insertStarted(Sone) + * @param sone + * The Sone that is being inserted + */ + public void soneInserting(Sone sone); + + /** + * Notifies a listener that the insert of the given Sone has finished + * successfully. + * + * @see SoneInsertListener#insertFinished(Sone, long) + * @param sone + * The Sone that has been inserted + * @param insertDuration + * The insert duration (in milliseconds) + */ + public void soneInserted(Sone sone, long insertDuration); + + /** + * Notifies a listener that the insert of the given Sone was aborted. + * + * @see SoneInsertListener#insertAborted(Sone, Throwable) + * @param sone + * The Sone that was inserted + * @param cause + * The cause for the abortion (may be {@code null}) + */ + public void soneInsertAborted(Sone sone, Throwable cause); + + /** * 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 + * @param latestEdition + * The latest edition of the Sone homepage */ - public void updateFound(Version version, long releaseTime); + public void updateFound(Version version, long releaseTime, long latestEdition); }