1
0
mirror of https://github.com/moparisthebest/Yaaic synced 2024-12-23 16:08:48 -05:00

Renamed ChannelReceiver to ConversationReceiver

This commit is contained in:
Sebastian Kaspari 2010-03-14 22:13:23 +01:00
parent a8ea5c2c92
commit ce98d23b77
3 changed files with 21 additions and 10 deletions

View File

@ -25,7 +25,7 @@ package org.yaaic.model;
*
* @author Sebastian Kaspari <sebastian@yaaic.org>
*/
public class Broadcast
public abstract class Broadcast
{
public static final String SERVER_UPDATE = "org.yaaic.server.status";
@ -35,4 +35,15 @@ public class Broadcast
public static final String EXTRA_SERVER = "server";
public static final String EXTRA_CONVERSATION = "conversation";
/**
* Create an intent for conversation broadcasting
* @param serverId
* @param conversationName
* @return
*/
public static Intent createConversationIntent(int serverId, String conversationName)
{
}
}

View File

@ -24,7 +24,7 @@ import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import org.yaaic.listener.ChannelListener;
import org.yaaic.listener.ConversationListener;
import org.yaaic.model.Broadcast;
/**
@ -32,11 +32,11 @@ import org.yaaic.model.Broadcast;
*
* @author Sebastian Kaspari <sebastian@yaaic.org>
*/
public class ChannelReceiver extends BroadcastReceiver
public class ConversationReceiver extends BroadcastReceiver
{
public static final String TAG = "Yaaic/ChannelReceiver";
private ChannelListener listener;
private ConversationListener listener;
private int serverId;
/**
@ -45,7 +45,7 @@ public class ChannelReceiver extends BroadcastReceiver
* @param serverId Only listen on channels of this server
* @param listener
*/
public ChannelReceiver(int serverId, ChannelListener listener)
public ConversationReceiver(int serverId, ConversationListener listener)
{
this.listener = listener;
this.serverId = serverId;

View File

@ -54,13 +54,13 @@ import org.yaaic.adapter.MessageListAdapter;
import org.yaaic.command.CommandParser;
import org.yaaic.irc.IRCBinder;
import org.yaaic.irc.IRCService;
import org.yaaic.listener.ChannelListener;
import org.yaaic.listener.ConversationListener;
import org.yaaic.listener.ServerListener;
import org.yaaic.model.Broadcast;
import org.yaaic.model.Conversation;
import org.yaaic.model.Message;
import org.yaaic.model.Server;
import org.yaaic.receiver.ChannelReceiver;
import org.yaaic.receiver.ConversationReceiver;
import org.yaaic.receiver.ServerReceiver;
/**
@ -68,14 +68,14 @@ import org.yaaic.receiver.ServerReceiver;
*
* @author Sebastian Kaspari <sebastian@yaaic.org>
*/
public class ConversationActivity extends Activity implements ServiceConnection, ServerListener, ChannelListener, OnItemClickListener, OnKeyListener, OnItemSelectedListener
public class ConversationActivity extends Activity implements ServiceConnection, ServerListener, ConversationListener, OnItemClickListener, OnKeyListener, OnItemSelectedListener
{
public static final String TAG = "Yaaic/ConversationActivity";
private int serverId;
private Server server;
private IRCBinder binder;
private ChannelReceiver channelReceiver;
private ConversationReceiver channelReceiver;
private ServerReceiver serverReceiver;
private ViewSwitcher switcher;
@ -125,7 +125,7 @@ public class ConversationActivity extends Activity implements ServiceConnection,
Intent intent = new Intent(this, IRCService.class);
bindService(intent, this, 0);
channelReceiver = new ChannelReceiver(server.getId(), this);
channelReceiver = new ConversationReceiver(server.getId(), this);
registerReceiver(channelReceiver, new IntentFilter(Broadcast.CONVERSATION_MESSAGE));
registerReceiver(channelReceiver, new IntentFilter(Broadcast.CONVERSATION_NEW));
registerReceiver(channelReceiver, new IntentFilter(Broadcast.CONVERSATION_REMOVE));