As previously mentioned, `Context' is simply a bunch of thread
management features. This patch moves the `Context' fields into
`Session', and the `Network.Xmpp.Concurrent.Channel' modules into
`Network.Xmpp.Concurrent'.
As mentioned in #pontarius, `Context' is simply a bunch of thread
management features, and users that want that can build their own on
top of the `Connection' layer. The benefit of hiding `Context' is that
it makes the API clearer, and significantly decreases the complexity
of the library.
As the `Basic' module is simply an interface to `Connection', it was
renamed to `Connection'. The old `Connection' module was moved to
`Connection_'.
Exported the types of the fields of `Connection' (such as
`ConnectionState' and `ConnectionHandle' (previously `HandleLike').
Drops the Connection newtype, and shows TMVar Connection instead.
Hides Connection from Network.Xmpp, as the vast majority of users will
not need to work with Connection directly. The related functions are
now instead available from Network.Xmpp.Basic.
Renames `simpleConnect' to `session', and makes it flexible in terms
of authentication and whether or not to use TLS.
Adds some minor documentation changes.
We will need to export some session related information (such as the
acquired resource, stream properties, etc.). We will also need to
expose any failures encountered, probably by making `session' an
ErrorT calculation.
Also removed the Errors module from the Cabal file.
Started using double quotes instead of single quotes on XMLDecl, to
conform to the quotations of the other XML.
To conform with the Haskell style guidelines, `TLS' is now spelled
`Tls', and `XML' is now spelled `Xml'.
Updated library name in README file.
StreamError has been renamed to StreamFailure, as it's neither an
error or an exception, and since the term "stream error" is ambigous
(it can also refer to the stream error element on the XMPP stream).
Furthermore, XmppTLSError has been renamed to TLSFailure.
The data types related to the above mentioned failures are now
exported.
We do no longer clutter the API with detailed error conditions such as
StreamNotStreamElement. These kinds of conditions are such rare
occurances, and details about them are better suited in the logging
system (to be implemented soon).
Stream failures can occur either when a `stream:error' first-level
XML element is encountered, or if something unexpected happens in the
stream. Currently, `StreamErrorFailure', `StreamEndFailure', and
`StreamOtherFailure' are defined for these purposes, but additional
exceptions can be added if that would be helpful for the developers.
TLSFailure is moved to Types.hs and is now exported.
Also temporarily removed findStreamErrors.
pickleStream now (liberal) pickleInStream and (strict) pickleOutStream
xmppStream validates most of the stream element received and throws errors
connect catches the errors thrown by xmppStream, generates stream errors
made it possible to have the prefered language for the stream in the state
communicate the prefered stream language if it's set
extract stream language from incoming stream
exported langTag function in Types
stopped wrapping passwd in a SaslM computation for the time-being
SaslHandler now takes password and does not take hostname
minor formatting and documentation changes
runSasl where-local
SaslElement moved to Sasl/Types.hs
add sAuthzid to XmppConnection
add sAuthzid to XmppConnection more work on sasl infrastructure
move more stuff from DigestMd5 to Common
more work on sasl infrastructure