mirror of
https://github.com/moparisthebest/Yaaic
synced 2024-11-22 08:52:18 -05:00
Renamed ChannelReceiver to ConversationReceiver
This commit is contained in:
parent
a8ea5c2c92
commit
ce98d23b77
@ -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)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -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;
|
@ -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));
|
||||
|
Loading…
Reference in New Issue
Block a user