Add Sone removal notification to core listener interface.
[Sone.git] / src / main / java / net / pterodactylus / sone / core / CoreListener.java
1 /*
2  * Sone - CoreListener.java - Copyright © 2010 David Roden
3  *
4  * This program is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation, either version 3 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
16  */
17
18 package net.pterodactylus.sone.core;
19
20 import java.util.EventListener;
21
22 import net.pterodactylus.sone.data.Post;
23 import net.pterodactylus.sone.data.Reply;
24 import net.pterodactylus.sone.data.Sone;
25 import net.pterodactylus.util.version.Version;
26
27 /**
28  * Listener interface for objects that want to be notified on certain
29  * {@link Core} events, such es discovery of new data.
30  *
31  * @author <a href="mailto:bombe@pterodactylus.net">David ‘Bombe’ Roden</a>
32  */
33 public interface CoreListener extends EventListener {
34
35         /**
36          * Notifies a listener that a Sone is now being rescued.
37          *
38          * @param sone
39          *            The Sone that is rescued
40          */
41         public void rescuingSone(Sone sone);
42
43         /**
44          * Notifies a listener that the Sone was rescued and can now be unlocked.
45          *
46          * @param sone
47          *            The Sone that was rescued
48          */
49         public void rescuedSone(Sone sone);
50
51         /**
52          * Notifies a listener that a new Sone has been discovered.
53          *
54          * @param sone
55          *            The new Sone
56          */
57         public void newSoneFound(Sone sone);
58
59         /**
60          * Notifies a listener that a new post has been found.
61          *
62          * @param post
63          *            The new post
64          */
65         public void newPostFound(Post post);
66
67         /**
68          * Notifies a listener that a new reply has been found.
69          *
70          * @param reply
71          *            The new reply
72          */
73         public void newReplyFound(Reply reply);
74
75         /**
76          * Notifies a listener that the given Sone is now marked as known.
77          *
78          * @param sone
79          *            The known Sone
80          */
81         public void markSoneKnown(Sone sone);
82
83         /**
84          * Notifies a listener that the given post is now marked as known.
85          *
86          * @param post
87          *            The known post
88          */
89         public void markPostKnown(Post post);
90
91         /**
92          * Notifies a listener that the given reply is now marked as known.
93          *
94          * @param reply
95          *            The known reply
96          */
97         public void markReplyKnown(Reply reply);
98
99         /**
100          * Notifies a listener that the given Sone was removed.
101          *
102          * @param sone
103          *            The removed Sone
104          */
105         public void soneRemoved(Sone sone);
106
107         /**
108          * Notifies a listener that the given post was removed.
109          *
110          * @param post
111          *            The removed post
112          */
113         public void postRemoved(Post post);
114
115         /**
116          * Notifies a listener that the given reply was removed.
117          *
118          * @param reply
119          *            The removed reply
120          */
121         public void replyRemoved(Reply reply);
122
123         /**
124          * Notifies a listener when a Sone was locked.
125          *
126          * @param sone
127          *            The Sone that was locked
128          */
129         public void soneLocked(Sone sone);
130
131         /**
132          * Notifies a listener that a Sone was unlocked.
133          *
134          * @param sone
135          *            The Sone that was unlocked
136          */
137         public void soneUnlocked(Sone sone);
138
139         /**
140          * Notifies a listener that a new version has been found.
141          *
142          * @param version
143          *            The version that was found
144          * @param releaseTime
145          *            The release time of the new version
146          * @param latestEdition
147          *            The latest edition of the Sone homepage
148          */
149         public void updateFound(Version version, long releaseTime, long latestEdition);
150
151 }