This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
Request that a message be sent on this channel. When the message has
been submitted for delivery, this method will return and the
This method SHOULD return before the Sent signal is emitted.
When a Text channel implements the
Signals that an outgoing message has failed to send. The error will be one of the values from ChannelTextSendError.
This signal should only be emitted for messages for which
Signals that a message has been submitted for sending.
The incoming message contained non-text content which cannot be
represented by this interface, but has been signalled
in the
Connection managers SHOULD only set this flag if the non-text content appears to be relatively significant (exactly how significant is up to the implementor). The intention is that if this flag is set, clients using this interface SHOULD inform the user that part of the message was not understood.
The incoming message was part of a replay of message history.
In XMPP multi-user chat, a few past messages are replayed when you join a chatroom. A sufficiently capable IRC connection manager could also set this flag on historical messages when connected to a proxy like bip or irssi-proxy. The existence of this flag allows loggers and UIs to use better heuristics when eliminating duplicates (a simple implementation made possible by this flag would be to avoid logging scrollback at all).
The incoming message has been seen in a previous channel during
the lifetime of the
This means that a logger (which should already have seen the message in the previous channel) is able to recognise and ignore these replayed messages.
A channel type for sending and receiving messages. This channel type is primarily used for textual messages, but can also be used for formatted text, text with "attachments", or binary messages on some protocols.
Most of the methods and signals on this interface are deprecated,
since they only support plain-text messages with limited metadata.
See the mandatory
When a message is received, an identifier is assigned and a
Sending messages can be requested using the
Simple one-to-one chats (such as streams of private messages in
XMPP or IRC) should be represented by a Text channel whose
Named chat rooms whose identity can be saved and used again later
(IRC channels, Jabber MUCs) are expected to be represented by Text
channels with
Unnamed, transient chat rooms which cannot be rejoined by their
unique identifier (e.g. a conversation on MSN which has, or once had,
three or more participants) are expected to be represented by Text
channels with
On protocols like MSN where a conversation with a user is actually
just a nameless chat room starting with exactly two members, to which
more members can be invited, the initial one-to-one conversation
SHOULD be represented with
This keeps the presentation of all one-to-one conversations uniform, and makes it easier to hand over a conversation from a 1-1-specific UI to a more elaborate multi-user UI; while it does require UIs to understand Conference to follow the upgrade, UIs that will deal with XMPP need to understand Conference anyway.
If a channel of type Text is closed while it has pending messages,
the connection manager MUST allow this, but SHOULD open a new channel
to deliver those messages, signalling it as a new channel with the
In effect, this turns this situation, in which a client is likely to lose messages:
into something nearly equivalent to this situation, which is fine:
Requested must be set to FALSE so the replacement channel will be handled by something.
In practice, connection managers usually implement this by keeping the same internal object that represented the old channel, adjusting its properties, signalling that it was closed, then immediately re-signalling it as a new channel.
As a result, Text channels SHOULD implement
This "respawning" behaviour becomes problematic if there is no suitable handler for Text channels, or if a particular message repeatedly crashes the Text channel handler; a channel dispatcher can't just Close() the channel in these situations, because it will come back.
In these situations, the channel dispatcher needs a last-resort way to destroy the channel and stop it respawning. It could either acknowledge the messages itself, or use the Destroyable interface; the Destroyable interface has the advantage that it's not channel-type-dependent, so the channel dispatcher only has to understand one extra interface, however many channel types eventually need a distinction between Close and Destroy.
Opaquely-named rejoinable chatrooms (such as Skype rooms) are
represented using the properties in the