Browse Source

correct some documentation errors

master
Philipp Balzarek 12 years ago
parent
commit
030ea4d02b
  1. 8
      source/Network/Xmpp/Concurrent/Types.hs

8
source/Network/Xmpp/Concurrent/Types.hs

@ -23,7 +23,7 @@ import Network.Xmpp.Sasl.Types
data SessionConfiguration = SessionConfiguration data SessionConfiguration = SessionConfiguration
{ -- | Configuration for the @Stream@ object. { -- | Configuration for the @Stream@ object.
sessionStreamConfiguration :: StreamConfiguration sessionStreamConfiguration :: StreamConfiguration
-- | Handler to be run when the session ends (for whatever reason). -- | Handler to be run when the conection to the XMPP server is closed.
, onConnectionClosed :: Session -> XmppFailure -> IO () , onConnectionClosed :: Session -> XmppFailure -> IO ()
-- | Function to generate the stream of stanza identifiers. -- | Function to generate the stream of stanza identifiers.
, sessionStanzaIDs :: IO (IO Text) , sessionStanzaIDs :: IO (IO Text)
@ -58,7 +58,8 @@ instance Ex.Exception Interrupt
type WriteSemaphore = TMVar (BS.ByteString -> IO Bool) type WriteSemaphore = TMVar (BS.ByteString -> IO Bool)
-- | A concurrent interface to Pontarius XMPP. -- | The Session object represents a single session with an XMPP server. You can
-- use 'session' to establish a session
data Session = Session data Session = Session
{ stanzaCh :: TChan Stanza -- All stanzas { stanzaCh :: TChan Stanza -- All stanzas
, iqHandlers :: TVar IQHandlers , iqHandlers :: TVar IQHandlers
@ -83,13 +84,12 @@ data Session = Session
-- | IQHandlers holds the registered channels for incoming IQ requests and -- | IQHandlers holds the registered channels for incoming IQ requests and
-- TMVars of and TMVars for expected IQ responses (the second Text represent a -- TMVars of and TMVars for expected IQ responses (the second Text represent a
-- stanza identifier. -- stanza identifier.
type IQHandlers = (Map.Map (IQRequestType, Text) (TChan IQRequestTicket) type IQHandlers = ( Map.Map (IQRequestType, Text) (TChan IQRequestTicket)
, Map.Map Text (TMVar IQResponse) , Map.Map Text (TMVar IQResponse)
) )
-- | Contains whether or not a reply has been sent, and the IQ request body to -- | Contains whether or not a reply has been sent, and the IQ request body to
-- reply to. -- reply to.
data IQRequestTicket = IQRequestTicket data IQRequestTicket = IQRequestTicket
{ answerTicket :: Either StanzaError (Maybe Element) -> IO (Maybe Bool) { answerTicket :: Either StanzaError (Maybe Element) -> IO (Maybe Bool)
-- ^ Return Nothing when the IQ request was already -- ^ Return Nothing when the IQ request was already

Loading…
Cancel
Save