-- 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.6 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 h -> 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 data SimplePusherArgs h SimplePusherArgsNull :: SimplePusherArgs h instance XmlPusher SimplePusher module Network.XmlPush.Xmpp data Xmpp h data XmppArgs h XmppArgs :: [ByteString] -> Jid -> ByteString -> Jid -> (XmlNode -> Bool) -> (XmlNode -> Bool) -> XmppArgs h mechanisms :: XmppArgs h -> [ByteString] myJid :: XmppArgs h -> Jid passowrd :: XmppArgs h -> ByteString yourJid :: XmppArgs h -> Jid iNeedResponse :: XmppArgs h -> XmlNode -> Bool youNeedResponse :: XmppArgs h -> XmlNode -> Bool instance XmlPusher Xmpp module Network.XmlPush.Xmpp.Tls data XmppTls h data XmppTlsArgs h XmppTlsArgs :: (XmppArgs h) -> TlsArgs -> XmppTlsArgs h data XmppArgs h XmppArgs :: [ByteString] -> Jid -> ByteString -> Jid -> (XmlNode -> Bool) -> (XmlNode -> Bool) -> XmppArgs h mechanisms :: XmppArgs h -> [ByteString] myJid :: XmppArgs h -> Jid passowrd :: XmppArgs h -> ByteString yourJid :: XmppArgs h -> Jid iNeedResponse :: XmppArgs h -> XmlNode -> Bool youNeedResponse :: XmppArgs h -> 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 h HttpPullClArgs :: String -> Int -> FilePath -> (XmlNode -> FilePath) -> HandleMonad h XmlNode -> (XmlNode -> Bool) -> Maybe Int -> (XmlNode -> Maybe Int) -> HttpPullClArgs h hostName :: HttpPullClArgs h -> String portNumber :: HttpPullClArgs h -> Int basePath :: HttpPullClArgs h -> FilePath getPath :: HttpPullClArgs h -> XmlNode -> FilePath poll :: HttpPullClArgs h -> HandleMonad h XmlNode isPending :: HttpPullClArgs h -> XmlNode -> Bool duration :: HttpPullClArgs h -> Maybe Int getDuration :: HttpPullClArgs h -> XmlNode -> Maybe Int instance XmlPusher HttpPullCl module Network.XmlPush.HttpPull.Server data HttpPullSv h data HttpPullSvArgs h HttpPullSvArgs :: (XmlNode -> Bool) -> XmlNode -> (XmlNode -> Bool) -> HttpPullSvArgs h isPoll :: HttpPullSvArgs h -> XmlNode -> Bool noPending :: HttpPullSvArgs h -> XmlNode youNeedResponse :: HttpPullSvArgs h -> XmlNode -> Bool instance XmlPusher HttpPullSv module Network.XmlPush.HttpPull.Tls.Client data HttpPullTlsCl h data HttpPullTlsClArgs h HttpPullTlsClArgs :: (HttpPullClArgs TChanHandle) -> TlsArgs -> HttpPullTlsClArgs h data HttpPullClArgs h HttpPullClArgs :: String -> Int -> FilePath -> (XmlNode -> FilePath) -> HandleMonad h XmlNode -> (XmlNode -> Bool) -> Maybe Int -> (XmlNode -> Maybe Int) -> HttpPullClArgs h hostName :: HttpPullClArgs h -> String portNumber :: HttpPullClArgs h -> Int basePath :: HttpPullClArgs h -> FilePath getPath :: HttpPullClArgs h -> XmlNode -> FilePath poll :: HttpPullClArgs h -> HandleMonad h XmlNode isPending :: HttpPullClArgs h -> XmlNode -> Bool duration :: HttpPullClArgs h -> Maybe Int getDuration :: HttpPullClArgs h -> 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 HttpPullTlsSvArgs h HttpPullTlsSvArgs :: (HttpPullSvArgs h) -> TlsArgs -> HttpPullTlsSvArgs h data HttpPullSvArgs h HttpPullSvArgs :: (XmlNode -> Bool) -> XmlNode -> (XmlNode -> Bool) -> HttpPullSvArgs h isPoll :: HttpPullSvArgs h -> XmlNode -> Bool noPending :: HttpPullSvArgs h -> XmlNode youNeedResponse :: HttpPullSvArgs h -> XmlNode -> Bool data TlsArgs TlsArgs :: (XmlNode -> Maybe String) -> (XmlNode -> Maybe (SignedCertificate -> Bool)) -> [CipherSuite] -> Maybe CertificateStore -> [(CertSecretKey, CertificateChain)] -> TlsArgs getClientName :: TlsArgs -> XmlNode -> Maybe String checkCertificate :: TlsArgs -> XmlNode -> Maybe (SignedCertificate -> Bool) cipherSuites :: TlsArgs -> [CipherSuite] certificateAuthorities :: TlsArgs -> Maybe CertificateStore keyChains :: TlsArgs -> [(CertSecretKey, CertificateChain)] instance XmlPusher HttpPullTlsSv module Network.XmlPush.HttpPush data HttpPush h data HttpPushArgs h HttpPushArgs :: String -> Int -> FilePath -> (XmlNode -> FilePath) -> (XmlNode -> Bool) -> HttpPushArgs h hostName :: HttpPushArgs h -> String portNumber :: HttpPushArgs h -> Int basePath :: HttpPushArgs h -> FilePath getPath :: HttpPushArgs h -> XmlNode -> FilePath youNeedResponse :: HttpPushArgs h -> XmlNode -> Bool instance XmlPusher HttpPush module Network.XmlPush.HttpPush.Tls data HttpPushTls h data HttpPushTlsArgs h HttpPushTlsArgs :: (HttpPushArgs h) -> TlsArgs -> TlsArgs -> HttpPushTlsArgs h data HttpPushArgs h HttpPushArgs :: String -> Int -> FilePath -> (XmlNode -> FilePath) -> (XmlNode -> Bool) -> HttpPushArgs h hostName :: HttpPushArgs h -> String portNumber :: HttpPushArgs h -> Int basePath :: HttpPushArgs h -> FilePath getPath :: HttpPushArgs h -> XmlNode -> FilePath youNeedResponse :: HttpPushArgs h -> XmlNode -> Bool type TlsArgsCl = TlsArgs tlsArgsCl :: String -> [CipherSuite] -> CertificateStore -> [(CertSecretKey, CertificateChain)] -> TlsArgsCl type TlsArgsSv = TlsArgs tlsArgsSv :: (XmlNode -> Maybe String) -> (XmlNode -> Maybe (SignedCertificate -> Bool)) -> [CipherSuite] -> Maybe CertificateStore -> [(CertSecretKey, CertificateChain)] -> TlsArgsSv instance XmlPusher HttpPushTls