From 9b45e359c709d57d5d31aeafcb042802c9ed2f66 Mon Sep 17 00:00:00 2001 From: Jon Kristensen Date: Mon, 18 Feb 2013 01:14:32 +0100 Subject: [PATCH] Renamed pushIQ' to pushIQ There is no longer any naming conflict. --- source/Network/Xmpp/Internal.hs | 2 +- source/Network/Xmpp/Sasl.hs | 4 ++-- source/Network/Xmpp/Stream.hs | 16 ++++++++-------- source/Network/Xmpp/Xep/InbandRegistration.hs | 2 +- source/Network/Xmpp/Xep/ServiceDiscovery.hs | 2 +- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/source/Network/Xmpp/Internal.hs b/source/Network/Xmpp/Internal.hs index 2eaf90e..74b1cbe 100644 --- a/source/Network/Xmpp/Internal.hs +++ b/source/Network/Xmpp/Internal.hs @@ -27,7 +27,7 @@ module Network.Xmpp.Internal , auth , pushStanza , pullStanza - , pushIQ' + , pushIQ , pickleElem , unpickleElem , xpLangTag diff --git a/source/Network/Xmpp/Sasl.hs b/source/Network/Xmpp/Sasl.hs index f7c45a0..d338c0c 100644 --- a/source/Network/Xmpp/Sasl.hs +++ b/source/Network/Xmpp/Sasl.hs @@ -110,7 +110,7 @@ bindBody = pickleElem $ -- resource and extract the JID from the non-error response. xmppBind :: Maybe Text -> TMVar Stream -> IO (Either XmppFailure Jid) xmppBind rsrc c = runErrorT $ do - answer <- ErrorT $ pushIQ' "bind" Nothing Set Nothing (bindBody rsrc) c + answer <- ErrorT $ pushIQ "bind" Nothing Set Nothing (bindBody rsrc) c case answer of Right IQResult{iqResultPayload = Just b} -> do let jid = unpickleElem xpJid b @@ -151,7 +151,7 @@ sessionIQ = IQRequestS $ IQRequest { iqRequestID = "sess" -- if an IQ error stanza is returned from the server. startSession :: TMVar Stream -> IO () startSession con = do - answer <- pushIQ' "session" Nothing Set Nothing sessionXml con + answer <- pushIQ "session" Nothing Set Nothing sessionXml con case answer of Left e -> error $ show e Right _ -> return () diff --git a/source/Network/Xmpp/Stream.hs b/source/Network/Xmpp/Stream.hs index 30b0390..8023cb1 100644 --- a/source/Network/Xmpp/Stream.hs +++ b/source/Network/Xmpp/Stream.hs @@ -452,14 +452,14 @@ killStream = withStream $ do -- Sends an IQ request and waits for the response. If the response ID does not -- match the outgoing ID, an error is thrown. -pushIQ' :: StanzaId - -> Maybe Jid - -> IQRequestType - -> Maybe LangTag - -> Element - -> TMVar Stream - -> IO (Either XmppFailure (Either IQError IQResult)) -pushIQ' iqID to tp lang body stream = do +pushIQ :: StanzaId + -> Maybe Jid + -> IQRequestType + -> Maybe LangTag + -> Element + -> TMVar Stream + -> IO (Either XmppFailure (Either IQError IQResult)) +pushIQ iqID to tp lang body stream = do pushStanza (IQRequestS $ IQRequest iqID Nothing to lang tp body) stream res <- pullStanza stream case res of diff --git a/source/Network/Xmpp/Xep/InbandRegistration.hs b/source/Network/Xmpp/Xep/InbandRegistration.hs index 02925b7..982fdaf 100644 --- a/source/Network/Xmpp/Xep/InbandRegistration.hs +++ b/source/Network/Xmpp/Xep/InbandRegistration.hs @@ -71,7 +71,7 @@ emptyQuery = Query Nothing False False [] query :: IQRequestType -> Query -> TMVar Stream -> IO (Either IbrError Query) query queryType x con = do - answer <- pushIQ' "ibr" Nothing queryType Nothing (pickleElem xpQuery x) con + answer <- pushIQ "ibr" Nothing queryType Nothing (pickleElem xpQuery x) con case answer of Right IQResult{iqResultPayload = Just b} -> case unpickleElem xpQuery b of diff --git a/source/Network/Xmpp/Xep/ServiceDiscovery.hs b/source/Network/Xmpp/Xep/ServiceDiscovery.hs index 298f420..4560729 100644 --- a/source/Network/Xmpp/Xep/ServiceDiscovery.hs +++ b/source/Network/Xmpp/Xep/ServiceDiscovery.hs @@ -104,7 +104,7 @@ xmppQueryInfo :: Maybe Jid -> TMVar Stream -> IO (Either DiscoError QueryInfoResult) xmppQueryInfo to node con = do - res <- pushIQ' "info" to Get Nothing queryBody con + res <- pushIQ "info" to Get Nothing queryBody con return $ case res of Left e -> Left $ DiscoIQError Nothing Right res' -> case res' of