View Javadoc

1   /***
2    *     Ambient - A music player for the Android platform
3    Copyright (C) 2007 Martin Vysny
4    
5    This program is free software: you can redistribute it and/or modify
6    it under the terms of the GNU General Public License as published by
7    the Free Software Foundation, either version 3 of the License, or
8    (at your option) any later version.
9    
10   This program is distributed in the hope that it will be useful,
11   but WITHOUT ANY WARRANTY; without even the implied warranty of
12   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13   GNU General Public License for more details.
14  
15   You should have received a copy of the GNU General Public License
16   along with this program.  If not, see <http://www.gnu.org/licenses/>.
17   */
18  package sk.baka.ambient;
19  
20  /***
21   * Listener for application-wide events.
22   * 
23   * @author Martin Vysny
24   */
25  public interface IApplicationListener {
26  	/***
27  	 * The configuration was changed.
28  	 * 
29  	 * @param config
30  	 *            the configuration instance, must NOT be modified.
31  	 */
32  	void configChanged(final ConfigurationBean config);
33  
34  	/***
35  	 * The application state was changed.
36  	 * 
37  	 * @param state
38  	 *            the state instance, must NOT be modified.
39  	 */
40  	void stateChanged(final AppState state);
41  
42  	/***
43  	 * The clipboard has been changed.
44  	 */
45  	void clipboardChanged();
46  
47  	/***
48  	 * Informs that the application has entered an offline/online mode.
49  	 * 
50  	 * @param offline
51  	 *            if <code>true</code> then we are currently offline. If
52  	 *            <code>false</code> then we are online.
53  	 */
54  	void offline(final boolean offline);
55  }