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.
The library should now generate the proper stream errors again, in
case of received stream open element problem.
The return type of streamS has been modified so that the validation
can be performed in startStream instead, and without exceptions. This
will also help enable implementation of logging later.
The Errors module has been removed.
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.
Started to use hslogger in `EchoClient' and `connectTcpRaw'. Pontarius
XMPP now shows all binary data going in and out at the `debug' level.
Also modified the TCP conduit byte source to log the incoming data.
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.
Interoperability Note: It is possible that implementations based on
[RFC3920] will not include the 'to' address on stream headers; an entity
SHOULD be liberal in accepting such stream headers.
validate incoming stream `to'
using Jid instead of Text in pickleOutStream
don't read xmlns:stream attribute on incoming stream
close the stream after sending the stream errors
save `from' as specified by the server
documentation corrections