diff options
Diffstat (limited to 'Presence/XMPP.hs')
-rw-r--r-- | Presence/XMPP.hs | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/Presence/XMPP.hs b/Presence/XMPP.hs index ec2feb3a..a469c08e 100644 --- a/Presence/XMPP.hs +++ b/Presence/XMPP.hs | |||
@@ -3,7 +3,6 @@ | |||
3 | {-# LANGUAGE ViewPatterns #-} | 3 | {-# LANGUAGE ViewPatterns #-} |
4 | module XMPP | 4 | module XMPP |
5 | ( module XMPPTypes | 5 | ( module XMPPTypes |
6 | , module SocketLike | ||
7 | , listenForXmppClients | 6 | , listenForXmppClients |
8 | , listenForRemotePeers | 7 | , listenForRemotePeers |
9 | , newServerConnections | 8 | , newServerConnections |
@@ -15,7 +14,6 @@ module XMPP | |||
15 | 14 | ||
16 | import ServerC | 15 | import ServerC |
17 | import XMPPTypes | 16 | import XMPPTypes |
18 | import SocketLike | ||
19 | import ByteStringOperators | 17 | import ByteStringOperators |
20 | import ControlMaybe | 18 | import ControlMaybe |
21 | import XMLToByteStrings | 19 | import XMLToByteStrings |
@@ -42,10 +40,7 @@ import System.IO | |||
42 | ) | 40 | ) |
43 | import Control.Concurrent.STM | 41 | import Control.Concurrent.STM |
44 | import Data.Conduit | 42 | import Data.Conduit |
45 | import qualified Data.Conduit.List as CL | ||
46 | import qualified Data.Conduit.Binary as CB | ||
47 | import Data.ByteString (ByteString) | 43 | import Data.ByteString (ByteString) |
48 | import qualified Data.ByteString.Char8 as S (putStrLn,append) | ||
49 | import qualified Data.ByteString.Lazy.Char8 as L | 44 | import qualified Data.ByteString.Lazy.Char8 as L |
50 | ( putStrLn | 45 | ( putStrLn |
51 | , fromChunks | 46 | , fromChunks |
@@ -62,8 +57,7 @@ import System.IO.Error (isDoesNotExistError) | |||
62 | import Control.Monad.IO.Class | 57 | import Control.Monad.IO.Class |
63 | import Control.Monad.Trans.Class | 58 | import Control.Monad.Trans.Class |
64 | import Control.Monad.Trans.Maybe | 59 | import Control.Monad.Trans.Maybe |
65 | import Text.XML.Stream.Parse (parseBytes,content) | 60 | import Text.XML.Stream.Parse (def,parseBytes,content) |
66 | import Text.XML.Stream.Render | ||
67 | import Data.XML.Types as XML | 61 | import Data.XML.Types as XML |
68 | import qualified Data.Text as S (takeWhile) | 62 | import qualified Data.Text as S (takeWhile) |
69 | import Data.Text.Encoding as S (decodeUtf8,encodeUtf8) | 63 | import Data.Text.Encoding as S (decodeUtf8,encodeUtf8) |
@@ -458,10 +452,6 @@ fromClient session cmdChan = doNestingXML $ do | |||
458 | withXML $ \xml -> do | 452 | withXML $ \xml -> do |
459 | log $ "end-of-document: " <++> bshow xml | 453 | log $ "end-of-document: " <++> bshow xml |
460 | 454 | ||
461 | prettyPrint prefix xs = | ||
462 | liftIO $ do | ||
463 | CL.sourceList xs $= renderBytes (def { rsPretty=True }) =$= CB.lines $$ CL.mapM_ (S.putStrLn . (prefix `S.append`)) | ||
464 | |||
465 | 455 | ||
466 | rosterPush to contact attrs = do | 456 | rosterPush to contact attrs = do |
467 | let n = name to | 457 | let n = name to |