-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Push XML from/to client to/from server over XMPP or HTTP -- -- examples/TestSimple.hs -- -- extensions -- -- -- --
--   module TestSimple (testSimple) where
--   
--   import Control.Monad
--   import Control.Concurrent
--   import Data.Maybe
--   import Data.Pipe
--   import Data.Pipe.ByteString
--   import System.IO
--   import Text.XML.Pipe
--   import Network.XmlPush
--   import Network.XmlPush.Simple
--   
--   testSimple :: Handle -> IO ()
--   testSimple h = do
--   	(sp :: SimplePusher Handle) <- generate (One h) ()
--   	void . forkIO . runPipe_ $ readFrom sp
--   		=$= convert (xmlString . (: []))
--   		=$= toHandle stdout
--   	runPipe_ $ fromHandle stdin
--   		=$= xmlEvent
--   		=$= convert fromJust
--   		=$= xmlNode []
--   		=$= writeTo sp
--   
-- -- examples/simpleClient -- --
--   import Network
--   import TestSimple
--   
--   main :: IO ()
--   main = testSimple =<< connectTo "localhost" (PortNumber 54492)
--   
-- -- examples/simpleServer -- --
--   import Control.Monad
--   import Control.Concurrent
--   import Network
--   
--   import TestSimple
--   
--   main :: IO ()
--   main = forever . (void . forkIO . testSimple . fst3 =<<) . accept
--   	=<< listenOn (PortNumber 54492)
--   
--   fst3 :: (a, b, c) -> a
--   fst3 (x, _, _) = x
--   
@package xml-push @version 0.0.0.2 module Network.XmlPush class XmlPusher xp where type family NumOfHandle xp :: * -> * type family PusherArgs xp generate :: (XmlPusher xp, ValidateHandle h, MonadBaseControl IO (HandleMonad h), MonadError (HandleMonad h), Error (ErrorType (HandleMonad h))) => NumOfHandle xp h -> PusherArgs xp -> HandleMonad h (xp h) readFrom :: (XmlPusher xp, HandleLike h, MonadBase IO (HandleMonad h)) => xp h -> Pipe () XmlNode (HandleMonad h) () writeTo :: (XmlPusher xp, HandleLike h, MonadBase IO (HandleMonad h)) => xp h -> Pipe XmlNode () (HandleMonad h) () data Zero a Zero :: Zero a data One a One :: a -> One a data Two a Two :: a -> a -> Two a instance Show (Zero a) instance Show a => Show (One a) instance Show a => Show (Two a) module Network.XmlPush.Simple data SimplePusher h instance XmlPusher SimplePusher module Network.XmlPush.Xmpp data Xmpp h data XmppArgs XmppArgs :: [ByteString] -> Jid -> ByteString -> Jid -> (XmlNode -> Bool) -> (XmlNode -> Bool) -> XmppArgs mechanisms :: XmppArgs -> [ByteString] myJid :: XmppArgs -> Jid passowrd :: XmppArgs -> ByteString yourJid :: XmppArgs -> Jid iNeedResponse :: XmppArgs -> XmlNode -> Bool youNeedResponse :: XmppArgs -> XmlNode -> Bool instance XmlPusher Xmpp module Network.XmlPush.Xmpp.Tls data XmppTls h data XmppArgs XmppArgs :: [ByteString] -> Jid -> ByteString -> Jid -> (XmlNode -> Bool) -> (XmlNode -> Bool) -> XmppArgs mechanisms :: XmppArgs -> [ByteString] myJid :: XmppArgs -> Jid passowrd :: XmppArgs -> ByteString yourJid :: XmppArgs -> Jid iNeedResponse :: XmppArgs -> XmlNode -> Bool youNeedResponse :: XmppArgs -> XmlNode -> Bool data TlsArgs TlsArgs :: String -> [CipherSuite] -> CertificateStore -> [(CertSecretKey, CertificateChain)] -> TlsArgs serverName :: TlsArgs -> String cipherSuites :: TlsArgs -> [CipherSuite] certificateAuthorities :: TlsArgs -> CertificateStore keyChains :: TlsArgs -> [(CertSecretKey, CertificateChain)] instance XmlPusher XmppTls module Network.XmlPush.HttpPull.Client data HttpPullCl h data HttpPullClArgs HttpPullClArgs :: String -> Int -> FilePath -> (XmlNode -> FilePath) -> XmlNode -> (XmlNode -> Bool) -> Maybe Int -> (XmlNode -> Maybe Int) -> HttpPullClArgs hostName :: HttpPullClArgs -> String portNumber :: HttpPullClArgs -> Int basePath :: HttpPullClArgs -> FilePath getPath :: HttpPullClArgs -> XmlNode -> FilePath poll :: HttpPullClArgs -> XmlNode isPending :: HttpPullClArgs -> XmlNode -> Bool duration :: HttpPullClArgs -> Maybe Int getDuration :: HttpPullClArgs -> XmlNode -> Maybe Int instance XmlPusher HttpPullCl module Network.XmlPush.HttpPull.Server data HttpPullSv h data HttpPullSvArgs HttpPullSvArgs :: (XmlNode -> Bool) -> XmlNode -> HttpPullSvArgs isPoll :: HttpPullSvArgs -> XmlNode -> Bool noPending :: HttpPullSvArgs -> XmlNode instance XmlPusher HttpPullSv module Network.XmlPush.HttpPull.Tls.Client data HttpPullTlsCl h data HttpPullClArgs HttpPullClArgs :: String -> Int -> FilePath -> (XmlNode -> FilePath) -> XmlNode -> (XmlNode -> Bool) -> Maybe Int -> (XmlNode -> Maybe Int) -> HttpPullClArgs hostName :: HttpPullClArgs -> String portNumber :: HttpPullClArgs -> Int basePath :: HttpPullClArgs -> FilePath getPath :: HttpPullClArgs -> XmlNode -> FilePath poll :: HttpPullClArgs -> XmlNode isPending :: HttpPullClArgs -> XmlNode -> Bool duration :: HttpPullClArgs -> Maybe Int getDuration :: HttpPullClArgs -> XmlNode -> Maybe Int data TlsArgs TlsArgs :: String -> [CipherSuite] -> CertificateStore -> [(CertSecretKey, CertificateChain)] -> TlsArgs serverName :: TlsArgs -> String cipherSuites :: TlsArgs -> [CipherSuite] certificateAuthorities :: TlsArgs -> CertificateStore keyChains :: TlsArgs -> [(CertSecretKey, CertificateChain)] instance HandleLike TChanHandle instance XmlPusher HttpPullTlsCl module Network.XmlPush.HttpPull.Tls.Server data HttpPullTlsSv h data HttpPullSvArgs HttpPullSvArgs :: (XmlNode -> Bool) -> XmlNode -> HttpPullSvArgs isPoll :: HttpPullSvArgs -> XmlNode -> Bool noPending :: HttpPullSvArgs -> XmlNode data TlsArgs TlsArgs :: (XmlNode -> Maybe String) -> [CipherSuite] -> Maybe CertificateStore -> [(CertSecretKey, CertificateChain)] -> TlsArgs getClientName :: TlsArgs -> XmlNode -> Maybe String cipherSuites :: TlsArgs -> [CipherSuite] certificateAuthorities :: TlsArgs -> Maybe CertificateStore keyChains :: TlsArgs -> [(CertSecretKey, CertificateChain)] instance XmlPusher HttpPullTlsSv module Network.XmlPush.HttpPush data HttpPush h data HttpPushArgs HttpPushArgs :: String -> Int -> FilePath -> (XmlNode -> FilePath) -> (XmlNode -> Bool) -> HttpPushArgs hostName :: HttpPushArgs -> String portNumber :: HttpPushArgs -> Int basePath :: HttpPushArgs -> FilePath getPath :: HttpPushArgs -> XmlNode -> FilePath youNeedResponse :: HttpPushArgs -> XmlNode -> Bool instance XmlPusher HttpPush module Network.XmlPush.HttpPush.Tls data HttpPushTls h data HttpPushArgs HttpPushArgs :: String -> Int -> FilePath -> (XmlNode -> FilePath) -> (XmlNode -> Bool) -> HttpPushArgs hostName :: HttpPushArgs -> String portNumber :: HttpPushArgs -> Int basePath :: HttpPushArgs -> FilePath getPath :: HttpPushArgs -> XmlNode -> FilePath youNeedResponse :: HttpPushArgs -> XmlNode -> Bool type TlsArgsCl = TlsArgs tlsArgsCl :: String -> [CipherSuite] -> CertificateStore -> [(CertSecretKey, CertificateChain)] -> TlsArgsCl type TlsArgsSv = TlsArgs tlsArgsSv :: (XmlNode -> Maybe String) -> [CipherSuite] -> Maybe CertificateStore -> [(CertSecretKey, CertificateChain)] -> TlsArgsSv instance XmlPusher HttpPushTls