Yaaic/app/src/main/java/org/yaaic/receiver/ServerReceiver.java

57 lines
1.4 KiB
Java
Raw Normal View History

2009-05-28 16:08:46 -04:00
/*
2010-03-12 14:35:25 -05:00
Yaaic - Yet Another Android IRC Client
2009-05-28 16:08:46 -04:00
2013-01-21 15:32:43 -05:00
Copyright 2009-2013 Sebastian Kaspari
2009-05-28 16:08:46 -04:00
This file is part of Yaaic.
Yaaic is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Yaaic is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Yaaic. If not, see <http://www.gnu.org/licenses/>.
2011-01-25 15:02:27 -05:00
*/
2009-12-17 15:27:57 -05:00
package org.yaaic.receiver;
2009-05-15 11:32:49 -04:00
2009-12-17 15:27:57 -05:00
import org.yaaic.listener.ServerListener;
2009-05-15 11:32:49 -04:00
2009-12-17 15:27:57 -05:00
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
2010-03-13 10:54:48 -05:00
/**
* A server receiver for receiving server updates
*
* @author Sebastian Kaspari <sebastian@yaaic.org>
*/
2009-12-17 15:27:57 -05:00
public class ServerReceiver extends BroadcastReceiver
2009-05-28 15:10:18 -04:00
{
2011-01-25 15:02:27 -05:00
private final ServerListener listener;
2010-11-18 12:52:19 -05:00
/**
* Create a new server receiver
*
* @param listener
*/
public ServerReceiver(ServerListener listener)
{
this.listener = listener;
}
/**
* On receive broadcast
*/
@Override
public void onReceive(Context context, Intent intent)
{
2011-01-25 15:02:27 -05:00
listener.onStatusUpdate();
2010-11-18 12:52:19 -05:00
}
2009-05-15 11:32:49 -04:00
}