1 /*
2  * File    : DownloadListener.java
3  * Created : 11-Jan-2004
4  * By      : parg
5  *
6  * Azureus - a Java Bittorrent client
7  *
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; either version 2 of the License, or
11  * (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16  * GNU General Public License for more details ( see the LICENSE file ).
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program; if not, write to the Free Software
20  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
21  */
22 
23 package org.gudy.azureus2.plugins.download;
24 
25 /** A listener informed of changes to a Download's state and position
26  *
27  * @author parg
28  * @author TuxPaper (positionChanged)
29  */
30 
31 public interface
32 DownloadListener
33 {
34   /** The Download's state has changed.  This is also triggered if the user
35    * toggles the Force Start on/off.
36    */
37 	public void
stateChanged( Download download, int old_state, int new_state )38 	stateChanged(
39 		Download		download,
40 		int				old_state,
41 		int				new_state );
42 
43   /** Position of download has changed.
44    *
45    * @param download object in which the position has changed
46    * @param oldPosition position that the download used to be at
47    * @param newPosition position that the download is now at
48    */
49 	public void
positionChanged( Download download, int oldPosition, int newPosition )50 	positionChanged(
51 		Download	download,
52 		int oldPosition,
53 		int newPosition );
54 }
55