Browse Source

Expose AwayState in other parsers

Change-Id: I41638fedc08dbebdb89e8ad9f872536db5d3091f
Depends-On: Iafa0b38ea0f1f4dc39d153b9f6f8646389676ed5
Reviewed-on: http://gerrit.dmdirc.com/1982
Automatic-Compile: DMDirc Build Manager
Reviewed-by: Shane Mc Cormack <shane@dmdirc.com>
tags/0.7rc1
Chris Smith 13 years ago
parent
commit
36fd171ca1

+ 7
- 0
src/com/dmdirc/addons/parser_twitter/TwitterClientInfo.java View File

@@ -23,6 +23,7 @@
23 23
 package com.dmdirc.addons.parser_twitter;
24 24
 
25 25
 import com.dmdirc.addons.parser_twitter.api.TwitterUser;
26
+import com.dmdirc.parser.common.AwayState;
26 27
 import com.dmdirc.parser.interfaces.ChannelClientInfo;
27 28
 import com.dmdirc.parser.interfaces.LocalClientInfo;
28 29
 import com.dmdirc.parser.interfaces.Parser;
@@ -325,4 +326,10 @@ public class TwitterClientInfo implements LocalClientInfo {
325 326
         }
326 327
     }
327 328
 
329
+    /** {@inheritDoc} */
330
+    @Override
331
+    public AwayState getAwayState() {
332
+        return AwayState.HERE;
333
+    }
334
+
328 335
 }

+ 7
- 0
src/com/dmdirc/addons/parser_xmpp/XmppClientInfo.java View File

@@ -22,6 +22,7 @@
22 22
 
23 23
 package com.dmdirc.addons.parser_xmpp;
24 24
 
25
+import com.dmdirc.parser.common.AwayState;
25 26
 import com.dmdirc.parser.common.BaseClientInfo;
26 27
 
27 28
 import java.util.ArrayList;
@@ -117,6 +118,12 @@ public class XmppClientInfo extends BaseClientInfo {
117 118
         return presence == null || presence.compareTo(Mode.away) >= 0;
118 119
     }
119 120
 
121
+    /** {@inheritDoc} */
122
+    @Override
123
+    public AwayState getAwayState() {
124
+        return isAway() ? AwayState.AWAY : AwayState.HERE;
125
+    }
126
+
120 127
     /**
121 128
      * Gets the aggregate presence of this contact.
122 129
      *

Loading…
Cancel
Save