diff options
Diffstat (limited to 'Presence/Stanza')
-rw-r--r-- | Presence/Stanza/Parse.hs | 8 | ||||
-rw-r--r-- | Presence/Stanza/Types.hs | 4 |
2 files changed, 12 insertions, 0 deletions
diff --git a/Presence/Stanza/Parse.hs b/Presence/Stanza/Parse.hs index e2a9efdd..af95530f 100644 --- a/Presence/Stanza/Parse.hs +++ b/Presence/Stanza/Parse.hs | |||
@@ -46,6 +46,10 @@ grokStanzaIQGet stanza = do | |||
46 | case tagName tag of | 46 | case tagName tag of |
47 | "{urn:xmpp:ping}ping" -> return Ping | 47 | "{urn:xmpp:ping}ping" -> return Ping |
48 | "{jabber:iq:roster}query" -> return RequestRoster | 48 | "{jabber:iq:roster}query" -> return RequestRoster |
49 | "{http://jabber.org/protocol/disco#items}query" | ||
50 | -> return RequestItems | ||
51 | "{http://jabber.org/protocol/disco#info}query" | ||
52 | -> return RequestInfo | ||
49 | name -> return $ UnrecognizedQuery name | 53 | name -> return $ UnrecognizedQuery name |
50 | 54 | ||
51 | grokStanzaIQResult :: XML.Event -> NestingXML o IO (Maybe StanzaType) | 55 | grokStanzaIQResult :: XML.Event -> NestingXML o IO (Maybe StanzaType) |
@@ -55,6 +59,10 @@ grokStanzaIQResult stanza = do | |||
55 | case tagName tag of | 59 | case tagName tag of |
56 | "{jabber:iq:version}query" | nameNamespace (tagName stanza)==Just "jabber:client" | 60 | "{jabber:iq:version}query" | nameNamespace (tagName stanza)==Just "jabber:client" |
57 | -> parseClientVersion | 61 | -> parseClientVersion |
62 | "{http://jabber.org/protocol/disco#items}query" | ||
63 | -> return $ Just Items | ||
64 | "{http://jabber.org/protocol/disco#info}query" | ||
65 | -> return $ Just Info | ||
58 | _ -> return Nothing | 66 | _ -> return Nothing |
59 | 67 | ||
60 | grokStanzaIQSet :: XML.Event -> NestingXML o IO (Maybe StanzaType) | 68 | grokStanzaIQSet :: XML.Event -> NestingXML o IO (Maybe StanzaType) |
diff --git a/Presence/Stanza/Types.hs b/Presence/Stanza/Types.hs index 6b402f4d..cbb156a0 100644 --- a/Presence/Stanza/Types.hs +++ b/Presence/Stanza/Types.hs | |||
@@ -34,6 +34,10 @@ data StanzaType | |||
34 | | Pong | 34 | | Pong |
35 | | RequestResource (Maybe Text) (Maybe Text) -- ^ Client's name for this host followed by client's requested resource id. | 35 | | RequestResource (Maybe Text) (Maybe Text) -- ^ Client's name for this host followed by client's requested resource id. |
36 | | SetResource | 36 | | SetResource |
37 | | RequestItems | ||
38 | | Items | ||
39 | | RequestInfo | ||
40 | | Info | ||
37 | | SessionRequest | 41 | | SessionRequest |
38 | | UnrecognizedQuery Name | 42 | | UnrecognizedQuery Name |
39 | | RequestRoster | 43 | | RequestRoster |