diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/com/wilko/jaim/JaimConnection.java | 102 | ||||
-rw-r--r-- | src/com/wilko/jaim/JaimEvent.java | 2 | ||||
-rw-r--r-- | src/com/wilko/jaim/JaimEventListener.java | 2 | ||||
-rw-r--r-- | src/com/wilko/jaim/commands/TocAddBuddyCommand.java (renamed from src/com/wilko/jaim/TocAddBuddyCommand.java) | 4 | ||||
-rw-r--r-- | src/com/wilko/jaim/commands/TocAddDenyCommand.java (renamed from src/com/wilko/jaim/TocAddDenyCommand.java) | 4 | ||||
-rw-r--r-- | src/com/wilko/jaim/commands/TocAddPermitCommand.java (renamed from src/com/wilko/jaim/TocAddPermitCommand.java) | 4 | ||||
-rw-r--r-- | src/com/wilko/jaim/commands/TocChatAcceptCommand.java | 51 | ||||
-rw-r--r-- | src/com/wilko/jaim/commands/TocChatEvilCommand.java | 55 | ||||
-rw-r--r-- | src/com/wilko/jaim/commands/TocChatInviteCommand.java | 55 | ||||
-rw-r--r-- | src/com/wilko/jaim/commands/TocChatJoinCommand.java (renamed from src/com/wilko/jaim/TocChatJoinCommand.java) | 2 | ||||
-rw-r--r-- | src/com/wilko/jaim/commands/TocChatLeaveCommand.java | 51 | ||||
-rw-r--r-- | src/com/wilko/jaim/commands/TocChatSendCommand.java | 53 | ||||
-rw-r--r-- | src/com/wilko/jaim/commands/TocChatWhisperCommand.java | 55 | ||||
-rw-r--r-- | src/com/wilko/jaim/commands/TocCommand.java (renamed from src/com/wilko/jaim/TocCommand.java) | 2 | ||||
-rw-r--r-- | src/com/wilko/jaim/commands/TocEvilCommand.java (renamed from src/com/wilko/jaim/TocEvilCommand.java) | 4 | ||||
-rw-r--r-- | src/com/wilko/jaim/commands/TocGetInfoCommand.java (renamed from src/com/wilko/jaim/TocGetInfoCommand.java) | 4 | ||||
-rw-r--r-- | src/com/wilko/jaim/commands/TocIMCommand.java (renamed from src/com/wilko/jaim/TocIMCommand.java) | 4 | ||||
-rw-r--r-- | src/com/wilko/jaim/commands/TocInitDoneCommand.java (renamed from src/com/wilko/jaim/TocInitDoneCommand.java) | 2 | ||||
-rw-r--r-- | src/com/wilko/jaim/commands/TocSetAwayCommand.java (renamed from src/com/wilko/jaim/TocSetAwayCommand.java) | 4 | ||||
-rw-r--r-- | src/com/wilko/jaim/commands/TocSetConfigCommand.java (renamed from src/com/wilko/jaim/TocSetConfigCommand.java) | 5 | ||||
-rw-r--r-- | src/com/wilko/jaim/commands/TocSetIdleCommand.java (renamed from src/com/wilko/jaim/TocSetIdleCommand.java) | 2 | ||||
-rw-r--r-- | src/com/wilko/jaim/commands/TocSetInfoCommand.java (renamed from src/com/wilko/jaim/TocSetInfoCommand.java) | 4 | ||||
-rw-r--r-- | src/com/wilko/jaim/commands/TocSignonCommand.java (renamed from src/com/wilko/jaim/TocSignonCommand.java) | 4 | ||||
-rw-r--r-- | src/com/wilko/jaim/flap/FLAPDataFrame.java (renamed from src/com/wilko/jaim/FLAPDataFrame.java) | 2 | ||||
-rw-r--r-- | src/com/wilko/jaim/flap/FLAPErrorFrame.java (renamed from src/com/wilko/jaim/FLAPErrorFrame.java) | 2 | ||||
-rw-r--r-- | src/com/wilko/jaim/flap/FLAPFrame.java (renamed from src/com/wilko/jaim/FLAPFrame.java) | 2 | ||||
-rw-r--r-- | src/com/wilko/jaim/flap/FLAPFrameException.java (renamed from src/com/wilko/jaim/FLAPFrameException.java) | 2 | ||||
-rw-r--r-- | src/com/wilko/jaim/flap/FLAPFrameFactory.java (renamed from src/com/wilko/jaim/FLAPFrameFactory.java) | 2 | ||||
-rw-r--r-- | src/com/wilko/jaim/flap/FLAPInputFrame.java (renamed from src/com/wilko/jaim/FLAPInputFrame.java) | 2 | ||||
-rw-r--r-- | src/com/wilko/jaim/flap/FLAPKeepAliveFrame.java (renamed from src/com/wilko/jaim/FLAPKeepAliveFrame.java) | 2 | ||||
-rw-r--r-- | src/com/wilko/jaim/flap/FLAPSignoffFrame.java (renamed from src/com/wilko/jaim/FLAPSignoffFrame.java) | 2 | ||||
-rw-r--r-- | src/com/wilko/jaim/flap/FLAPSignonFrame.java (renamed from src/com/wilko/jaim/FLAPSignonFrame.java) | 2 | ||||
-rw-r--r-- | src/com/wilko/jaim/responses/BuddyUpdateTocResponse.java (renamed from src/com/wilko/jaim/BuddyUpdateTocResponse.java) | 4 | ||||
-rw-r--r-- | src/com/wilko/jaim/responses/ChatInviteTocResponse.java (renamed from src/com/wilko/jaim/ChatInviteTocResponse.java) | 4 | ||||
-rw-r--r-- | src/com/wilko/jaim/responses/ConfigTocResponse.java (renamed from src/com/wilko/jaim/ConfigTocResponse.java) | 6 | ||||
-rw-r--r-- | src/com/wilko/jaim/responses/ConnectionLostTocResponse.java (renamed from src/com/wilko/jaim/ConnectionLostTocResponse.java) | 2 | ||||
-rw-r--r-- | src/com/wilko/jaim/responses/ErrorTocResponse.java (renamed from src/com/wilko/jaim/ErrorTocResponse.java) | 4 | ||||
-rw-r--r-- | src/com/wilko/jaim/responses/EvilTocResponse.java (renamed from src/com/wilko/jaim/EvilTocResponse.java) | 4 | ||||
-rw-r--r-- | src/com/wilko/jaim/responses/GenericTocResponse.java (renamed from src/com/wilko/jaim/GenericTocResponse.java) | 4 | ||||
-rw-r--r-- | src/com/wilko/jaim/responses/GotoTocResponse.java (renamed from src/com/wilko/jaim/GotoTocResponse.java) | 4 | ||||
-rw-r--r-- | src/com/wilko/jaim/responses/IMTocResponse.java (renamed from src/com/wilko/jaim/IMTocResponse.java) | 5 | ||||
-rw-r--r-- | src/com/wilko/jaim/responses/LoginCompleteTocResponse.java (renamed from src/com/wilko/jaim/LoginCompleteTocResponse.java) | 2 | ||||
-rw-r--r-- | src/com/wilko/jaim/responses/NickTocResponse.java (renamed from src/com/wilko/jaim/NickTocResponse.java) | 4 | ||||
-rw-r--r-- | src/com/wilko/jaim/responses/SignOnTocResponse.java (renamed from src/com/wilko/jaim/SignOnTocResponse.java) | 4 | ||||
-rw-r--r-- | src/com/wilko/jaim/responses/TocResponse.java (renamed from src/com/wilko/jaim/TocResponse.java) | 2 | ||||
-rw-r--r-- | src/com/wilko/jaim/responses/TocResponseFactory.java (renamed from src/com/wilko/jaim/TocResponseFactory.java) | 4 | ||||
-rw-r--r-- | src/com/wilko/jaim/responses/TocResponseHandler.java (renamed from src/com/wilko/jaim/TocResponseHandler.java) | 2 | ||||
-rw-r--r-- | src/com/wilko/jaimtest/JaimTest.java | 1 |
48 files changed, 509 insertions, 40 deletions
diff --git a/src/com/wilko/jaim/JaimConnection.java b/src/com/wilko/jaim/JaimConnection.java index 09a8627..783ec70 100644 --- a/src/com/wilko/jaim/JaimConnection.java +++ b/src/com/wilko/jaim/JaimConnection.java @@ -25,6 +25,10 @@ package com.wilko.jaim; +import com.wilko.jaim.commands.*; +import com.wilko.jaim.flap.*; +import com.wilko.jaim.responses.*; + import java.io.IOException; import java.io.InputStream; import java.io.InterruptedIOException; @@ -504,6 +508,100 @@ public class JaimConnection implements java.lang.Runnable { } + /** + * Sends a whisper to a user in a chat room + * @param roomID The ID of the room + * @param screenname The screenname to whisper to + * @param message The message + */ + public void sentChatWhisper(String roomID, String screenname, String message) { + try { + TocChatWhisperCommand whisperCommand = new TocChatWhisperCommand(roomID, screenname, message); + sendTocCommand(whisperCommand); + } catch (IOException ignore) { + } + } + + /** + * Accept a chat invite + * @param roomID The ID of the room + */ + + public void acceptChat(String roomID) { + try { + TocChatAcceptCommand acceptCommand = new TocChatAcceptCommand(roomID); + sendTocCommand(acceptCommand); + } catch (IOException ignore) { + } + } + + /** + * Evil/warn someone inside a chat room + * @param roomID The ID of the room + * @param screenname The screenname to evil/warn + * @param anonymous Stay anonymous? + */ + public void sendChatEvil(String roomID, String screenname, Boolean anonymous) { + try { + TocChatEvilCommand evilCommand = new TocChatEvilCommand(roomID, screenname, anonymous); + sendTocCommand(evilCommand); + } catch (IOException ignore) { + } + } + + /** + * Evil/warn someone inside a chat room + * @param roomID The ID of the room + * @param screenname The screenname to evil/warn + */ + public void sendChatEvil(String roomID, String screenname) { + sendChatEvil(roomID, screenname, false); + } + + /** + * Send an invitation to a chat room + * @param roomID The ID of the room + * @param message The message to be sent with the invite + * @param buddies An array of screennames to invite + */ + public void sendChatInvite(String roomID, String message, String[] buddies) { + try { + TocChatInviteCommand inviteCommand = new TocChatInviteCommand(roomID, message, buddies); + sendTocCommand(inviteCommand); + } catch (IOException ignore) { + } + } + + /** + * Send a message in a chat room + * @param roomID The ID of the room + * @param message The message to send + */ + public void sendChatMessage(String roomID, String message) { + try { + TocChatSendCommand sendCommand = new TocChatSendCommand(roomID, message); + sendTocCommand(sendCommand); + } catch (IOException ignore) { + } + } + + /** + * Leave a chat room + * @param roomID The ID of the room + */ + public void leaveChat(String roomID) { + try { + TocChatLeaveCommand leaveCommand = new TocChatLeaveCommand(roomID); + sendTocCommand(leaveCommand); + } catch (IOException ignore) { + } + } + + /** + * Join a chat room + * @param exchange The exchange to use + * @param roomName The name of the room + */ public void joinChat(int exchange, String roomName) { try { TocChatJoinCommand joinCommand = new TocChatJoinCommand(exchange, roomName); @@ -512,6 +610,10 @@ public class JaimConnection implements java.lang.Runnable { } } + /** + * Join a chat room + * @param roomName The name of the room + */ public void joinChat(String roomName) { joinChat(4, roomName); } diff --git a/src/com/wilko/jaim/JaimEvent.java b/src/com/wilko/jaim/JaimEvent.java index 739c4ec..4412f7c 100644 --- a/src/com/wilko/jaim/JaimEvent.java +++ b/src/com/wilko/jaim/JaimEvent.java @@ -19,6 +19,8 @@ package com.wilko.jaim; +import com.wilko.jaim.responses.TocResponse; + /** * The JaimEvent object is delivered to all registered {@link JaimEventListener} * diff --git a/src/com/wilko/jaim/JaimEventListener.java b/src/com/wilko/jaim/JaimEventListener.java index 54c01d2..79d1b48 100644 --- a/src/com/wilko/jaim/JaimEventListener.java +++ b/src/com/wilko/jaim/JaimEventListener.java @@ -25,6 +25,8 @@ package com.wilko.jaim; +import com.wilko.jaim.responses.TocResponse; + /** * A JaimEventListener receives JaimEvents from the JaimConnection class. * A {@link JaimEvent} contains a {@link TocResponse} object. diff --git a/src/com/wilko/jaim/TocAddBuddyCommand.java b/src/com/wilko/jaim/commands/TocAddBuddyCommand.java index fb1a3d5..30b1370 100644 --- a/src/com/wilko/jaim/TocAddBuddyCommand.java +++ b/src/com/wilko/jaim/commands/TocAddBuddyCommand.java @@ -23,7 +23,9 @@ * Created on 4 May 2002, 13:57 */ -package com.wilko.jaim; +package com.wilko.jaim.commands; + +import com.wilko.jaim.Utils; import java.util.Vector; diff --git a/src/com/wilko/jaim/TocAddDenyCommand.java b/src/com/wilko/jaim/commands/TocAddDenyCommand.java index 1bb4957..ec3b493 100644 --- a/src/com/wilko/jaim/TocAddDenyCommand.java +++ b/src/com/wilko/jaim/commands/TocAddDenyCommand.java @@ -23,7 +23,9 @@ * Created on 4 May 2002, 13:57 */ -package com.wilko.jaim; +package com.wilko.jaim.commands; + +import com.wilko.jaim.Utils; import java.util.Vector; diff --git a/src/com/wilko/jaim/TocAddPermitCommand.java b/src/com/wilko/jaim/commands/TocAddPermitCommand.java index 05c1830..09d76d0 100644 --- a/src/com/wilko/jaim/TocAddPermitCommand.java +++ b/src/com/wilko/jaim/commands/TocAddPermitCommand.java @@ -23,7 +23,9 @@ * Created on 11 Oct 2002, 15:20 */ -package com.wilko.jaim; +package com.wilko.jaim.commands; + +import com.wilko.jaim.Utils; import java.util.Vector; diff --git a/src/com/wilko/jaim/commands/TocChatAcceptCommand.java b/src/com/wilko/jaim/commands/TocChatAcceptCommand.java new file mode 100644 index 0000000..8f2e032 --- /dev/null +++ b/src/com/wilko/jaim/commands/TocChatAcceptCommand.java @@ -0,0 +1,51 @@ +/* + * (C) 2002 Paul Wilkinson wilko@users.sourceforge.net + * + * This program 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 2 of the License, or + * (at your option) any later version. + * + * This program 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 this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* + * TocIMCommand.java + * + * Created on 4 May 2002, 15:18 + */ + +package com.wilko.jaim.commands; + +/** + * @author paulw + * @version $Revision: 1.4 $ + */ +public class TocChatAcceptCommand extends TocCommand { + + private final String roomID; + + /** + * Creates new TocIMCommand + */ + public TocChatAcceptCommand(String roomID) { + this.roomID = roomID; + } + + public String toString() { + return ("toc_chat_accept " + roomID); + } + + public byte[] getBytes() { + return (this.toString().getBytes()); + } + +} diff --git a/src/com/wilko/jaim/commands/TocChatEvilCommand.java b/src/com/wilko/jaim/commands/TocChatEvilCommand.java new file mode 100644 index 0000000..5101eae --- /dev/null +++ b/src/com/wilko/jaim/commands/TocChatEvilCommand.java @@ -0,0 +1,55 @@ +/* + * (C) 2002 Paul Wilkinson wilko@users.sourceforge.net + * + * This program 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 2 of the License, or + * (at your option) any later version. + * + * This program 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 this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* + * TocIMCommand.java + * + * Created on 4 May 2002, 15:18 + */ + +package com.wilko.jaim.commands; + +/** + * @author paulw + * @version $Revision: 1.4 $ + */ +public class TocChatEvilCommand extends TocCommand { + + private final String roomID; + private final String screenname; + private final Boolean anonymous; + + /** + * Creates new TocIMCommand + */ + public TocChatEvilCommand(String roomID, String screenname, Boolean anonymous) { + this.roomID = roomID; + this.screenname = screenname; + this.anonymous = anonymous; + } + + public String toString() { + return ("toc_chat_evil " + roomID + " " + screenname + " " + (anonymous ? "anon" : "norm")); + } + + public byte[] getBytes() { + return (this.toString().getBytes()); + } + +} diff --git a/src/com/wilko/jaim/commands/TocChatInviteCommand.java b/src/com/wilko/jaim/commands/TocChatInviteCommand.java new file mode 100644 index 0000000..6970987 --- /dev/null +++ b/src/com/wilko/jaim/commands/TocChatInviteCommand.java @@ -0,0 +1,55 @@ +/* + * (C) 2002 Paul Wilkinson wilko@users.sourceforge.net + * + * This program 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 2 of the License, or + * (at your option) any later version. + * + * This program 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 this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* + * TocIMCommand.java + * + * Created on 4 May 2002, 15:18 + */ + +package com.wilko.jaim.commands; + +/** + * @author paulw + * @version $Revision: 1.4 $ + */ +public class TocChatInviteCommand extends TocCommand { + + private final String roomID; + private final String message; + private final String[] buddies; + + /** + * Creates new TocIMCommand + */ + public TocChatInviteCommand(String roomID, String message, String[] buddies) { + this.roomID = roomID; + this.message = message; + this.buddies = buddies; + } + + public String toString() { + return ("toc_chat_invite " + roomID + " \"" + message + "\" " + String.join(" ", buddies)); + } + + public byte[] getBytes() { + return (this.toString().getBytes()); + } + +} diff --git a/src/com/wilko/jaim/TocChatJoinCommand.java b/src/com/wilko/jaim/commands/TocChatJoinCommand.java index d0fb1dc..7f01378 100644 --- a/src/com/wilko/jaim/TocChatJoinCommand.java +++ b/src/com/wilko/jaim/commands/TocChatJoinCommand.java @@ -23,7 +23,7 @@ * Created on 4 May 2002, 15:18 */ -package com.wilko.jaim; +package com.wilko.jaim.commands; /** * @author paulw diff --git a/src/com/wilko/jaim/commands/TocChatLeaveCommand.java b/src/com/wilko/jaim/commands/TocChatLeaveCommand.java new file mode 100644 index 0000000..8f05de1 --- /dev/null +++ b/src/com/wilko/jaim/commands/TocChatLeaveCommand.java @@ -0,0 +1,51 @@ +/* + * (C) 2002 Paul Wilkinson wilko@users.sourceforge.net + * + * This program 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 2 of the License, or + * (at your option) any later version. + * + * This program 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 this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* + * TocIMCommand.java + * + * Created on 4 May 2002, 15:18 + */ + +package com.wilko.jaim.commands; + +/** + * @author paulw + * @version $Revision: 1.4 $ + */ +public class TocChatLeaveCommand extends TocCommand { + + private final String roomID; + + /** + * Creates new TocIMCommand + */ + public TocChatLeaveCommand(String roomID) { + this.roomID = roomID; + } + + public String toString() { + return ("toc_chat_leave " + roomID); + } + + public byte[] getBytes() { + return (this.toString().getBytes()); + } + +} diff --git a/src/com/wilko/jaim/commands/TocChatSendCommand.java b/src/com/wilko/jaim/commands/TocChatSendCommand.java new file mode 100644 index 0000000..42b7764 --- /dev/null +++ b/src/com/wilko/jaim/commands/TocChatSendCommand.java @@ -0,0 +1,53 @@ +/* + * (C) 2002 Paul Wilkinson wilko@users.sourceforge.net + * + * This program 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 2 of the License, or + * (at your option) any later version. + * + * This program 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 this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* + * TocIMCommand.java + * + * Created on 4 May 2002, 15:18 + */ + +package com.wilko.jaim.commands; + +/** + * @author paulw + * @version $Revision: 1.4 $ + */ +public class TocChatSendCommand extends TocCommand { + + private final String roomID; + private final String message; + + /** + * Creates new TocIMCommand + */ + public TocChatSendCommand(String roomID, String message) { + this.roomID = roomID; + this.message = message; + } + + public String toString() { + return ("toc_chat_send " + roomID + " \"" + message + "\""); + } + + public byte[] getBytes() { + return (this.toString().getBytes()); + } + +} diff --git a/src/com/wilko/jaim/commands/TocChatWhisperCommand.java b/src/com/wilko/jaim/commands/TocChatWhisperCommand.java new file mode 100644 index 0000000..edf4ff7 --- /dev/null +++ b/src/com/wilko/jaim/commands/TocChatWhisperCommand.java @@ -0,0 +1,55 @@ +/* + * (C) 2002 Paul Wilkinson wilko@users.sourceforge.net + * + * This program 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 2 of the License, or + * (at your option) any later version. + * + * This program 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 this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +/* + * TocIMCommand.java + * + * Created on 4 May 2002, 15:18 + */ + +package com.wilko.jaim.commands; + +/** + * @author paulw + * @version $Revision: 1.4 $ + */ +public class TocChatWhisperCommand extends TocCommand { + + private final String roomID; + private final String screenname; + private final String message; + + /** + * Creates new TocIMCommand + */ + public TocChatWhisperCommand(String roomID, String screenname, String message) { + this.roomID = roomID; + this.screenname = screenname; + this.message = message; + } + + public String toString() { + return ("toc_chat_whisper " + roomID + " " + screenname + " \"" + message + "\""); + } + + public byte[] getBytes() { + return (this.toString().getBytes()); + } + +} diff --git a/src/com/wilko/jaim/TocCommand.java b/src/com/wilko/jaim/commands/TocCommand.java index 7de992c..ec7e77f 100644 --- a/src/com/wilko/jaim/TocCommand.java +++ b/src/com/wilko/jaim/commands/TocCommand.java @@ -23,7 +23,7 @@ * Created on 4 May 2002, 11:19 */ -package com.wilko.jaim; +package com.wilko.jaim.commands; /** * @author paulw diff --git a/src/com/wilko/jaim/TocEvilCommand.java b/src/com/wilko/jaim/commands/TocEvilCommand.java index 7ef1caa..15758e1 100644 --- a/src/com/wilko/jaim/TocEvilCommand.java +++ b/src/com/wilko/jaim/commands/TocEvilCommand.java @@ -23,7 +23,9 @@ * Created on 6 May 2002, 09:05 */ -package com.wilko.jaim; +package com.wilko.jaim.commands; + +import com.wilko.jaim.Utils; /** * @author paulw diff --git a/src/com/wilko/jaim/TocGetInfoCommand.java b/src/com/wilko/jaim/commands/TocGetInfoCommand.java index 0ed49ce..47927dd 100644 --- a/src/com/wilko/jaim/TocGetInfoCommand.java +++ b/src/com/wilko/jaim/commands/TocGetInfoCommand.java @@ -36,7 +36,9 @@ * */ -package com.wilko.jaim; +package com.wilko.jaim.commands; + +import com.wilko.jaim.Utils; /** * @author paulw diff --git a/src/com/wilko/jaim/TocIMCommand.java b/src/com/wilko/jaim/commands/TocIMCommand.java index 7a43319..76630da 100644 --- a/src/com/wilko/jaim/TocIMCommand.java +++ b/src/com/wilko/jaim/commands/TocIMCommand.java @@ -23,7 +23,9 @@ * Created on 4 May 2002, 15:18 */ -package com.wilko.jaim; +package com.wilko.jaim.commands; + +import com.wilko.jaim.Utils; /** * @author paulw diff --git a/src/com/wilko/jaim/TocInitDoneCommand.java b/src/com/wilko/jaim/commands/TocInitDoneCommand.java index 5cb8c55..c97a324 100644 --- a/src/com/wilko/jaim/TocInitDoneCommand.java +++ b/src/com/wilko/jaim/commands/TocInitDoneCommand.java @@ -23,7 +23,7 @@ * Created on 4 May 2002, 13:35 */ -package com.wilko.jaim; +package com.wilko.jaim.commands; /** * @author paulw diff --git a/src/com/wilko/jaim/TocSetAwayCommand.java b/src/com/wilko/jaim/commands/TocSetAwayCommand.java index 382310f..0333cc4 100644 --- a/src/com/wilko/jaim/TocSetAwayCommand.java +++ b/src/com/wilko/jaim/commands/TocSetAwayCommand.java @@ -23,7 +23,9 @@ * Created on July 17, 2002, 9:02 PM */ -package com.wilko.jaim; +package com.wilko.jaim.commands; + +import com.wilko.jaim.Utils; /** * @author paulw diff --git a/src/com/wilko/jaim/TocSetConfigCommand.java b/src/com/wilko/jaim/commands/TocSetConfigCommand.java index aea6d91..c690185 100644 --- a/src/com/wilko/jaim/TocSetConfigCommand.java +++ b/src/com/wilko/jaim/commands/TocSetConfigCommand.java @@ -23,7 +23,10 @@ * Created on October 11, 2002, 9:08 AM */ -package com.wilko.jaim; +package com.wilko.jaim.commands; + +import com.wilko.jaim.Buddy; +import com.wilko.jaim.Group; import java.util.Enumeration; diff --git a/src/com/wilko/jaim/TocSetIdleCommand.java b/src/com/wilko/jaim/commands/TocSetIdleCommand.java index 95e93c9..ed1bf74 100644 --- a/src/com/wilko/jaim/TocSetIdleCommand.java +++ b/src/com/wilko/jaim/commands/TocSetIdleCommand.java @@ -22,7 +22,7 @@ * Created on July 17, 2002, 9:21 PM */ -package com.wilko.jaim; +package com.wilko.jaim.commands; /** * @author paulw diff --git a/src/com/wilko/jaim/TocSetInfoCommand.java b/src/com/wilko/jaim/commands/TocSetInfoCommand.java index 24d4183..d5a3f5b 100644 --- a/src/com/wilko/jaim/TocSetInfoCommand.java +++ b/src/com/wilko/jaim/commands/TocSetInfoCommand.java @@ -23,7 +23,9 @@ * Created on July 17, 2002, 9:02 PM */ -package com.wilko.jaim; +package com.wilko.jaim.commands; + +import com.wilko.jaim.Utils; /** * @author paulw diff --git a/src/com/wilko/jaim/TocSignonCommand.java b/src/com/wilko/jaim/commands/TocSignonCommand.java index 0f73475..8721ef0 100644 --- a/src/com/wilko/jaim/TocSignonCommand.java +++ b/src/com/wilko/jaim/commands/TocSignonCommand.java @@ -23,7 +23,9 @@ * Created on 4 May 2002, 11:20 */ -package com.wilko.jaim; +package com.wilko.jaim.commands; + +import com.wilko.jaim.Utils; /** * @author paulw diff --git a/src/com/wilko/jaim/FLAPDataFrame.java b/src/com/wilko/jaim/flap/FLAPDataFrame.java index a5bd2ae..78bea1f 100644 --- a/src/com/wilko/jaim/FLAPDataFrame.java +++ b/src/com/wilko/jaim/flap/FLAPDataFrame.java @@ -23,7 +23,7 @@ * Created on 3 May 2002, 14:54 */ -package com.wilko.jaim; +package com.wilko.jaim.flap; /** * @author paulw diff --git a/src/com/wilko/jaim/FLAPErrorFrame.java b/src/com/wilko/jaim/flap/FLAPErrorFrame.java index 1df6e03..4ac5c2d 100644 --- a/src/com/wilko/jaim/FLAPErrorFrame.java +++ b/src/com/wilko/jaim/flap/FLAPErrorFrame.java @@ -22,7 +22,7 @@ * Created on 3 May 2002, 14:54 */ -package com.wilko.jaim; +package com.wilko.jaim.flap; /** * @author paulw diff --git a/src/com/wilko/jaim/FLAPFrame.java b/src/com/wilko/jaim/flap/FLAPFrame.java index bef422d..2f4a4e2 100644 --- a/src/com/wilko/jaim/FLAPFrame.java +++ b/src/com/wilko/jaim/flap/FLAPFrame.java @@ -23,7 +23,7 @@ * Created on 3 May 2002, 14:51 */ -package com.wilko.jaim; +package com.wilko.jaim.flap; /** * @author paulw diff --git a/src/com/wilko/jaim/FLAPFrameException.java b/src/com/wilko/jaim/flap/FLAPFrameException.java index c30281b..6269c78 100644 --- a/src/com/wilko/jaim/FLAPFrameException.java +++ b/src/com/wilko/jaim/flap/FLAPFrameException.java @@ -23,7 +23,7 @@ * Created on 3 May 2002, 15:05 */ -package com.wilko.jaim; +package com.wilko.jaim.flap; /** * @author paulw diff --git a/src/com/wilko/jaim/FLAPFrameFactory.java b/src/com/wilko/jaim/flap/FLAPFrameFactory.java index 4df9fac..f6b864b 100644 --- a/src/com/wilko/jaim/FLAPFrameFactory.java +++ b/src/com/wilko/jaim/flap/FLAPFrameFactory.java @@ -23,7 +23,7 @@ * Created on 3 May 2002, 15:04 */ -package com.wilko.jaim; +package com.wilko.jaim.flap; /** * @author paulw diff --git a/src/com/wilko/jaim/FLAPInputFrame.java b/src/com/wilko/jaim/flap/FLAPInputFrame.java index c432f03..cb9a0f6 100644 --- a/src/com/wilko/jaim/FLAPInputFrame.java +++ b/src/com/wilko/jaim/flap/FLAPInputFrame.java @@ -23,7 +23,7 @@ * Created on 3 May 2002, 15:52 */ -package com.wilko.jaim; +package com.wilko.jaim.flap; /** * @author paulw diff --git a/src/com/wilko/jaim/FLAPKeepAliveFrame.java b/src/com/wilko/jaim/flap/FLAPKeepAliveFrame.java index b47e96f..841e6b3 100644 --- a/src/com/wilko/jaim/FLAPKeepAliveFrame.java +++ b/src/com/wilko/jaim/flap/FLAPKeepAliveFrame.java @@ -23,7 +23,7 @@ * Created on 3 May 2002, 14:54 */ -package com.wilko.jaim; +package com.wilko.jaim.flap; /** * @author paulw diff --git a/src/com/wilko/jaim/FLAPSignoffFrame.java b/src/com/wilko/jaim/flap/FLAPSignoffFrame.java index 1d8653d..9715ee9 100644 --- a/src/com/wilko/jaim/FLAPSignoffFrame.java +++ b/src/com/wilko/jaim/flap/FLAPSignoffFrame.java @@ -23,7 +23,7 @@ * Created on 3 May 2002, 14:54 */ -package com.wilko.jaim; +package com.wilko.jaim.flap; /** * @author paulw diff --git a/src/com/wilko/jaim/FLAPSignonFrame.java b/src/com/wilko/jaim/flap/FLAPSignonFrame.java index 48aa4fe..b3e9a31 100644 --- a/src/com/wilko/jaim/FLAPSignonFrame.java +++ b/src/com/wilko/jaim/flap/FLAPSignonFrame.java @@ -23,7 +23,7 @@ * Created on 3 May 2002, 14:54 */ -package com.wilko.jaim; +package com.wilko.jaim.flap; /** * @author paulw diff --git a/src/com/wilko/jaim/BuddyUpdateTocResponse.java b/src/com/wilko/jaim/responses/BuddyUpdateTocResponse.java index d7cc314..1d79198 100644 --- a/src/com/wilko/jaim/BuddyUpdateTocResponse.java +++ b/src/com/wilko/jaim/responses/BuddyUpdateTocResponse.java @@ -23,7 +23,9 @@ * Created on 5 May 2002, 21:19 */ -package com.wilko.jaim; +package com.wilko.jaim.responses; + +import com.wilko.jaim.JaimEventListener; import java.util.Date; import java.util.StringTokenizer; diff --git a/src/com/wilko/jaim/ChatInviteTocResponse.java b/src/com/wilko/jaim/responses/ChatInviteTocResponse.java index 7bd247e..6bdba33 100644 --- a/src/com/wilko/jaim/ChatInviteTocResponse.java +++ b/src/com/wilko/jaim/responses/ChatInviteTocResponse.java @@ -23,7 +23,9 @@ * Created on 5 May 2002, 21:19 */ -package com.wilko.jaim; +package com.wilko.jaim.responses; + +import com.wilko.jaim.JaimEventListener; import java.util.StringTokenizer; diff --git a/src/com/wilko/jaim/ConfigTocResponse.java b/src/com/wilko/jaim/responses/ConfigTocResponse.java index b9ae399..dc72488 100644 --- a/src/com/wilko/jaim/ConfigTocResponse.java +++ b/src/com/wilko/jaim/responses/ConfigTocResponse.java @@ -21,7 +21,9 @@ * ConfigTocResponse.java * Created on 1, October 2002 */ -package com.wilko.jaim; +package com.wilko.jaim.responses; + +import com.wilko.jaim.*; import java.util.*; @@ -165,7 +167,7 @@ public class ConfigTocResponse extends TocResponse implements TocResponseHandler * Return an existing Buddy with the specified name or return a new buddy if the name is not known * The buddy is added to the buddies hash if it is a new buddy * - * @param The name of the buddy we are looking for + * @param buddyName The name of the buddy we are looking for * @return The buddy object */ diff --git a/src/com/wilko/jaim/ConnectionLostTocResponse.java b/src/com/wilko/jaim/responses/ConnectionLostTocResponse.java index 4cc1724..355c4a9 100644 --- a/src/com/wilko/jaim/ConnectionLostTocResponse.java +++ b/src/com/wilko/jaim/responses/ConnectionLostTocResponse.java @@ -23,7 +23,7 @@ * Created on November 2, 2002, 2:52 PM */ -package com.wilko.jaim; +package com.wilko.jaim.responses; /** * This is a "pseudo" TOC response - it is delivered to JaimLib clients to indicate that the connection to the server has been lost. diff --git a/src/com/wilko/jaim/ErrorTocResponse.java b/src/com/wilko/jaim/responses/ErrorTocResponse.java index 1ff8188..eecdfeb 100644 --- a/src/com/wilko/jaim/ErrorTocResponse.java +++ b/src/com/wilko/jaim/responses/ErrorTocResponse.java @@ -23,7 +23,9 @@ * Created on 4 May 2002, 14:52 */ -package com.wilko.jaim; +package com.wilko.jaim.responses; + +import com.wilko.jaim.JaimEventListener; import java.util.MissingResourceException; diff --git a/src/com/wilko/jaim/EvilTocResponse.java b/src/com/wilko/jaim/responses/EvilTocResponse.java index caa7e98..60ee5a9 100644 --- a/src/com/wilko/jaim/EvilTocResponse.java +++ b/src/com/wilko/jaim/responses/EvilTocResponse.java @@ -23,7 +23,9 @@ * Created on 6 May 2002, 16:49 */ -package com.wilko.jaim; +package com.wilko.jaim.responses; + +import com.wilko.jaim.JaimEventListener; import java.util.StringTokenizer; diff --git a/src/com/wilko/jaim/GenericTocResponse.java b/src/com/wilko/jaim/responses/GenericTocResponse.java index 79e1389..04acd71 100644 --- a/src/com/wilko/jaim/GenericTocResponse.java +++ b/src/com/wilko/jaim/responses/GenericTocResponse.java @@ -23,7 +23,9 @@ * Created on 4 May 2002, 12:07 */ -package com.wilko.jaim; +package com.wilko.jaim.responses; + +import com.wilko.jaim.JaimConnection; /** * A GenericTocResponse is used internally in the Response parsing and processing logic of {@link JaimConnection} diff --git a/src/com/wilko/jaim/GotoTocResponse.java b/src/com/wilko/jaim/responses/GotoTocResponse.java index caf9441..f98dfb6 100644 --- a/src/com/wilko/jaim/GotoTocResponse.java +++ b/src/com/wilko/jaim/responses/GotoTocResponse.java @@ -23,7 +23,9 @@ * Created on 4 May 2002, 14:38 */ -package com.wilko.jaim; +package com.wilko.jaim.responses; + +import com.wilko.jaim.JaimEventListener; /** * This response is delivered to a {@link JaimEventListener } when a GOTO response is received from TOC diff --git a/src/com/wilko/jaim/IMTocResponse.java b/src/com/wilko/jaim/responses/IMTocResponse.java index 70a616e..93e57af 100644 --- a/src/com/wilko/jaim/IMTocResponse.java +++ b/src/com/wilko/jaim/responses/IMTocResponse.java @@ -23,7 +23,10 @@ * Created on 4 May 2002, 14:38 */ -package com.wilko.jaim; +package com.wilko.jaim.responses; + +import com.wilko.jaim.JaimEventListener; +import com.wilko.jaim.Utils; /** * This response is delivered to a {@link JaimEventListener } when an instant message is received diff --git a/src/com/wilko/jaim/LoginCompleteTocResponse.java b/src/com/wilko/jaim/responses/LoginCompleteTocResponse.java index 23ca39b..e9eb463 100644 --- a/src/com/wilko/jaim/LoginCompleteTocResponse.java +++ b/src/com/wilko/jaim/responses/LoginCompleteTocResponse.java @@ -23,7 +23,7 @@ * Created on November 2, 2002, 2:52 PM */ -package com.wilko.jaim; +package com.wilko.jaim.responses; /** * This is a "pseudo" TOC response - it is delivered to JaimLib clients to indicate that login processing has been completed successfully. diff --git a/src/com/wilko/jaim/NickTocResponse.java b/src/com/wilko/jaim/responses/NickTocResponse.java index acca3d7..ec8a537 100644 --- a/src/com/wilko/jaim/NickTocResponse.java +++ b/src/com/wilko/jaim/responses/NickTocResponse.java @@ -23,7 +23,9 @@ * Created on 6 May 2002, 17:21 */ -package com.wilko.jaim; +package com.wilko.jaim.responses; + +import com.wilko.jaim.JaimConnection; /** * The NicTocResponse is used internally to manage the TOC signon process. It is not delivered to clients of {@link JaimConnection} diff --git a/src/com/wilko/jaim/SignOnTocResponse.java b/src/com/wilko/jaim/responses/SignOnTocResponse.java index adc9f04..f8b6a48 100644 --- a/src/com/wilko/jaim/SignOnTocResponse.java +++ b/src/com/wilko/jaim/responses/SignOnTocResponse.java @@ -23,7 +23,9 @@ * Created on 4 May 2002, 13:29 */ -package com.wilko.jaim; +package com.wilko.jaim.responses; + +import com.wilko.jaim.JaimConnection; /** * The SignOnTocResponse is used internally to manage the TOC signon process. It is not delivered to clients of {@link JaimConnection} diff --git a/src/com/wilko/jaim/TocResponse.java b/src/com/wilko/jaim/responses/TocResponse.java index 0635a6a..3168378 100644 --- a/src/com/wilko/jaim/TocResponse.java +++ b/src/com/wilko/jaim/responses/TocResponse.java @@ -23,7 +23,7 @@ * Created on 4 May 2002, 11:19 */ -package com.wilko.jaim; +package com.wilko.jaim.responses; /** * @author paulw diff --git a/src/com/wilko/jaim/TocResponseFactory.java b/src/com/wilko/jaim/responses/TocResponseFactory.java index 45b9444..6c53009 100644 --- a/src/com/wilko/jaim/TocResponseFactory.java +++ b/src/com/wilko/jaim/responses/TocResponseFactory.java @@ -23,7 +23,7 @@ * Created on 4 May 2002, 12:05 */ -package com.wilko.jaim; +package com.wilko.jaim.responses; /** * @author paulw @@ -48,7 +48,7 @@ public abstract class TocResponseFactory { } } - static TocResponse createResponse(byte[] b) { + public static TocResponse createResponse(byte[] b) { TocResponse tr = null; String strversion = new String(b); int colonpos = strversion.indexOf(':'); diff --git a/src/com/wilko/jaim/TocResponseHandler.java b/src/com/wilko/jaim/responses/TocResponseHandler.java index aa7be37..7934a7e 100644 --- a/src/com/wilko/jaim/TocResponseHandler.java +++ b/src/com/wilko/jaim/responses/TocResponseHandler.java @@ -17,7 +17,7 @@ * */ -package com.wilko.jaim; +package com.wilko.jaim.responses; /** * @author paulw diff --git a/src/com/wilko/jaimtest/JaimTest.java b/src/com/wilko/jaimtest/JaimTest.java index 032af65..2df11f9 100644 --- a/src/com/wilko/jaimtest/JaimTest.java +++ b/src/com/wilko/jaimtest/JaimTest.java @@ -26,6 +26,7 @@ package com.wilko.jaimtest; import com.wilko.jaim.*; +import com.wilko.jaim.responses.*; import java.io.IOException; import java.io.InputStream; |