{-# OPTIONS_HADDOCK hide #-}{-# LANGUAGE DeriveDataTypeable #-}moduleNetwork.Xmpp.Concurrent.TypeswhereimportqualifiedControl.Exception.LiftedasEximportControl.ConcurrentimportControl.Concurrent.STMimportqualifiedData.ByteStringasBSimportData.TypeableimportNetwork.Xmpp.TypesimportData.IORefimportqualifiedData.MapasMapimportData.Text(Text)importNetwork.Xmpp.Types-- | Handlers to be run when the Xmpp session ends and when the Xmpp connection is-- closed.dataEventHandlers=EventHandlers{connectionClosedHandler::XmppFailure->IO()}-- | Interrupt is used to signal to the reader thread that it should stop. Th contained semphore signals the reader to resume it's work.dataInterrupt=Interrupt(TMVar())derivingTypeableinstanceShowInterruptwhereshow_="<Interrupt>"instanceEx.ExceptionInterrupt-- | A concurrent interface to Pontarius XMPP.dataSession=Session{stanzaCh::TChanStanza-- All stanzas,outCh::TChanStanza,iqHandlers::TVarIQHandlers-- Writing lock, so that only one thread could write to the stream at any-- given time.-- Fields below are from Context.,writeRef::TMVar(BS.ByteString->IOBool),readerThread::ThreadId,idGenerator::IOStanzaID-- | Lock (used by withStream) to make sure that a maximum of one-- Stream action is executed at any given time.,streamRef::TMVar(Stream),eventHandlers::TVarEventHandlers,stopThreads::IO(),conf::SessionConfiguration}-- | IQHandlers holds the registered channels for incomming IQ requests and-- TMVars of and TMVars for expected IQ responsestypeIQHandlers=(Map.Map(IQRequestType,Text)(TChanIQRequestTicket),Map.MapStanzaID(TMVarIQResponse))-- | Contains whether or not a reply has been sent, and the IQ request body to-- reply to.dataIQRequestTicket=IQRequestTicket{sentRef::(TVarBool),iqRequestBody::IQRequest}