1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 package net.sf.dexterim.msn.message;
20
21 import net.sf.dexterim.msn.MsnConnection;
22
23 /***
24 *@author Christoph Walcher
25 */
26 public class BuddyPhoneMessage extends SingleLineMessage {
27 private String phoneNumber;
28 private String type;
29 private String account;
30
31 /***
32 * Description of the Field
33 */
34 public final static String WORK = "PHW";
35
36 /***
37 * Description of the Field
38 */
39 public final static String HOME = "PHH";
40
41 /***
42 * Description of the Field
43 */
44 public final static String MOBILE = "PHM";
45
46 /***
47 * Creates a new instance of BuddyPhoneMessage
48 */
49 public BuddyPhoneMessage() {
50 }
51
52 /***
53 * Gets the messageCommand attribute of the BuddyPhoneMessage object
54 *
55 *@return The messageCommand value
56 */
57 public String getMessageCommand() {
58 return net.sf.dexterim.msn.message.MsnMessageFactory.CMD_BUDDY_PHONE_NUMBER;
59 }
60
61 /***
62 * Getter for property type.
63 *
64 *@return Value of property type.
65 */
66 public java.lang.String getType() {
67 return type;
68 }
69
70 /***
71 * Getter for property phoneNumber.
72 *
73 *@return Value of property phoneNumber.
74 */
75 public java.lang.String getPhoneNumber() {
76 return phoneNumber;
77 }
78
79 /***
80 * Gets the multipartMessage attribute of the BuddyPhoneMessage object
81 *
82 *@return The multipartMessage value
83 */
84 public boolean isMultipartMessage() {
85 return false;
86 }
87
88 /***
89 * Adds a feature to the Line attribute of the BuddyPhoneMessage object
90 *
91 *@param line The feature to be added to the Line attribute
92 *@return Description of the Return Value
93 */
94 public net.sf.dexterim.msn.message.MsnMessage addLine(String line) {
95
96
97 java.util.StringTokenizer st = new java.util.StringTokenizer(line);
98
99 st.nextToken();
100
101
102 st.nextToken();
103
104
105 account = st.nextToken();
106 type = st.nextToken();
107
108
109 if (st.hasMoreTokens()) {
110 phoneNumber =
111 net.sf.dexterim.msn.util.SpecialCharacters.getInstance().decode(
112 st.nextToken(),
113 true);
114 }
115
116 return this;
117 }
118
119 /***
120 * Getter for property account.
121 *
122 *@return Value of property account.
123 */
124 public java.lang.String getAccount() {
125 return account;
126 }
127
128
129
130
131 public void process(MsnConnection connection) {
132
133
134 }
135 }