1 //////////////////////////////////////////////////////////////////////////////
2 // dexterIM - Instant Messaging Framework
3 // Copyright (C) 2003 Christoph Walcher
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 2 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, write to the Free Software
17 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 //////////////////////////////////////////////////////////////////////////////
19 package net.sf.dexterim.msn.message;
20
21 import net.sf.dexterim.msn.MsnConnection;
22
23
24 /***
25 *@author christoph
26 */
27 public class UserLeftMessage extends SingleLineMessage {
28 private String account;
29
30 /***
31 * Creates a new instance of LeaveConversationMessage
32 */
33 public UserLeftMessage() {
34 }
35
36 /***
37 * Gets the messageCommand attribute of the UserLeftMessage object
38 *
39 *@return The messageCommand value
40 */
41 public String getMessageCommand() {
42 return "";
43 }
44
45 /***
46 * Getter for property account.
47 *
48 *@return Value of property account.
49 */
50 public java.lang.String getAccount() {
51 return account;
52 }
53
54 /***
55 * Adds a feature to the Line attribute of the UserLeftMessage object
56 *
57 *@param line The feature to be added to the Line attribute
58 *@return Description of the Return Value
59 */
60 public MsnMessage addLine(String line) {
61 int beginOfAccount = line.lastIndexOf(MsnMessageFactory.CMD_USER_LEFT);
62
63 account = line.substring(beginOfAccount, line.length());
64 account = account.trim();
65
66 return this;
67 }
68
69 /* (non-Javadoc)
70 * @see net.sf.dexterim.msn.message.MsnMessage#process(net.sf.dexterim.msn.MsnConnection)
71 */
72 public void process(MsnConnection connection) {
73 // TODO Auto-generated method stub
74
75 }
76 }