Browse Source

fix documentation error

pull* functions don't create on-the-fly copies of channels any more
master
Philipp Balzarek 13 years ago
parent
commit
14eba3f16c
  1. 26
      source/Network/Xmpp.hs
  2. 4
      source/Network/Xmpp/Concurrent/Message.hs
  3. 4
      source/Network/Xmpp/Concurrent/Presence.hs

26
source/Network/Xmpp.hs

@ -1,10 +1,10 @@
-- | -- |
-- Module: $Header$ -- Module: $Header$
-- --
-- Maintainer: info@jonkri.com -- Maintainer: info@jonkri.com
-- Stability: unstable -- Stability: unstable
-- Portability: portable -- Portability: portable
-- --
-- The Extensible Messaging and Presence Protocol (XMPP) is an open technology -- The Extensible Messaging and Presence Protocol (XMPP) is an open technology
-- for near-real-time communication, which powers a wide range of applications -- for near-real-time communication, which powers a wide range of applications
-- including instant messaging, presence, multi-party chat, voice and video -- including instant messaging, presence, multi-party chat, voice and video
@ -13,11 +13,11 @@
-- asynchronous, end-to-end exchange of structured data by means of direct, -- asynchronous, end-to-end exchange of structured data by means of direct,
-- persistent XML streams among a distributed network of globally addressable, -- persistent XML streams among a distributed network of globally addressable,
-- presence-aware clients and servers. -- presence-aware clients and servers.
-- --
-- Pontarius XMPP is an XMPP client library, implementing the core capabilities -- Pontarius XMPP is an XMPP client library, implementing the core capabilities
-- of XMPP (RFC 6120): setup and teardown of XML streams, channel encryption, -- of XMPP (RFC 6120): setup and teardown of XML streams, channel encryption,
-- authentication, error handling, and communication primitives for messaging. -- authentication, error handling, and communication primitives for messaging.
-- --
-- For low-level access to Pontarius XMPP, see the "Network.Xmpp.Internal" -- For low-level access to Pontarius XMPP, see the "Network.Xmpp.Internal"
-- module. -- module.
@ -29,6 +29,8 @@ module Network.Xmpp
, session , session
-- TODO: Close session, etc. -- TODO: Close session, etc.
-- ** Authentication handlers -- ** Authentication handlers
-- | The use of 'scramSha1' is /recommended/, but 'digestMd5' might be
-- useful for interaction with older implementation
, scramSha1 , scramSha1
, plain , plain
, digestMd5 , digestMd5
@ -43,27 +45,27 @@ module Network.Xmpp
-- | The basic protocol data unit in XMPP is the XML stanza. The stanza is -- | The basic protocol data unit in XMPP is the XML stanza. The stanza is
-- essentially a fragment of XML that is sent over a stream. @Stanzas@ come in -- essentially a fragment of XML that is sent over a stream. @Stanzas@ come in
-- 3 flavors: -- 3 flavors:
-- --
-- * /Message/, for traditional push-style message passing between peers -- * /Message/, for traditional push-style message passing between peers
-- --
-- * /Presence/, for communicating status updates -- * /Presence/, for communicating status updates
-- --
-- * /Info/\//Query/ (or /IQ/), for request-response semantics communication -- * /Info/\//Query/ (or /IQ/), for request-response semantics communication
-- --
-- All stanza types have the following attributes in common: -- All stanza types have the following attributes in common:
-- --
-- * The /id/ attribute is used by the originating entity to track any -- * The /id/ attribute is used by the originating entity to track any
-- response or error stanza that it might receive in relation to the -- response or error stanza that it might receive in relation to the
-- generated stanza from another entity (such as an intermediate server or -- generated stanza from another entity (such as an intermediate server or
-- the intended recipient). It is up to the originating entity whether the -- the intended recipient). It is up to the originating entity whether the
-- value of the 'id' attribute is unique only within its current stream or -- value of the 'id' attribute is unique only within its current stream or
-- unique globally. -- unique globally.
-- --
-- * The /from/ attribute specifies the JID of the sender. -- * The /from/ attribute specifies the JID of the sender.
-- --
-- * The /to/ attribute specifies the JID of the intended recipient for the -- * The /to/ attribute specifies the JID of the intended recipient for the
-- stanza. -- stanza.
-- --
-- * The /type/ attribute specifies the purpose or context of the message, -- * The /type/ attribute specifies the purpose or context of the message,
-- presence, or IQ stanza. The particular allowable values for the 'type' -- presence, or IQ stanza. The particular allowable values for the 'type'
-- attribute vary depending on whether the stanza is a message, presence, -- attribute vary depending on whether the stanza is a message, presence,

4
source/Network/Xmpp/Concurrent/Message.hs

@ -8,8 +8,8 @@ import Network.Xmpp.Types
import Network.Xmpp.Concurrent.Types import Network.Xmpp.Concurrent.Types
import Network.Xmpp.Concurrent.Basic import Network.Xmpp.Concurrent.Basic
-- | Read an element from the inbound stanza channel, acquiring a copy of the -- | Read an element from the inbound stanza channel, discardes any
-- channel as necessary. -- non-Message stanzas from the channel
pullMessage :: Session -> IO (Either MessageError Message) pullMessage :: Session -> IO (Either MessageError Message)
pullMessage session = do pullMessage session = do
stanza <- atomically . readTChan $ stanzaCh session stanza <- atomically . readTChan $ stanzaCh session

4
source/Network/Xmpp/Concurrent/Presence.hs

@ -7,8 +7,8 @@ import Network.Xmpp.Types
import Network.Xmpp.Concurrent.Types import Network.Xmpp.Concurrent.Types
import Network.Xmpp.Concurrent.Basic import Network.Xmpp.Concurrent.Basic
-- | Read an element from the inbound stanza channel, acquiring a copy of the -- | Read an element from the inbound stanza channel, discardes any non-Presence
-- channel as necessary. -- stanzas from the channel
pullPresence :: Session -> IO (Either PresenceError Presence) pullPresence :: Session -> IO (Either PresenceError Presence)
pullPresence session = do pullPresence session = do
stanza <- atomically . readTChan $ stanzaCh session stanza <- atomically . readTChan $ stanzaCh session

Loading…
Cancel
Save