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 Walcher
26 */
27 public class RemoveFromListMessage extends SingleLineMessage {
28 private String list;
29 private String account;
30
31 /***
32 * Creates a new instance of RemoveFromListMessage
33 */
34 public RemoveFromListMessage() {
35 }
36
37 /***
38 * Gets the messageCommand attribute of the RemoveFromListMessage object
39 *
40 *@return The messageCommand value
41 */
42 public String getMessageCommand() {
43 return net.sf.dexterim.msn.message.MsnMessageFactory.CMD_REMOVE_FROM_LIST;
44 }
45
46 /***
47 * Getter for property list.
48 *
49 *@return Value of property list.
50 */
51 public java.lang.String getList() {
52 return list;
53 }
54
55 /***
56 * Getter for property account.
57 *
58 *@return Value of property account.
59 */
60 public java.lang.String getAccount() {
61 return account;
62 }
63
64 /***
65 * Adds a feature to the Line attribute of the RemoveFromListMessage object
66 *
67 *@param line The feature to be added to the Line attribute
68 *@return Description of the Return Value
69 */
70 public MsnMessage addLine(String line) {
71 // Parse Messages like
72 // REM 14 AL 107 example@passport.com
73 java.util.StringTokenizer st = new java.util.StringTokenizer(line);
74
75 st.nextToken();
76
77 // skip CMD_REMOVE_FROM_LIST
78 st.nextToken();
79
80 // skip TransactionID
81 list = st.nextToken();
82
83 // List - AL, FL...
84 st.nextToken();
85
86 // Version number of ContactList
87 account = st.nextToken();
88
89 return this;
90 }
91
92 /* (non-Javadoc)
93 * @see net.sf.dexterim.msn.message.MsnMessage#process(net.sf.dexterim.msn.MsnConnection)
94 */
95 public void process(MsnConnection connection) {
96 // TODO Auto-generated method stub
97
98 }
99 }