Home · All Classes · All Namespaces · Modules · Functions · Files
Public Slots | Signals | Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
Tp::Client::ChannelInterfaceMessagesInterface Class Reference

#include <TelepathyQt/Channel>

Inheritance diagram for Tp::Client::ChannelInterfaceMessagesInterface:
Inheritance graph
[legend]

Public Slots

QDBusPendingReply< QStringSendMessage (const Tp::MessagePartList &message, uint flags, int timeout=-1)
 
QDBusPendingReply
< Tp::MessagePartContentMap
GetPendingMessageContent (uint messageID, const Tp::UIntList &parts, int timeout=-1)
 

Signals

void MessageSent (const Tp::MessagePartList &content, uint flags, const QString &messageToken)
 
void PendingMessagesRemoved (const Tp::UIntList &messageIDs)
 
void MessageReceived (const Tp::MessagePartList &message)
 
- Signals inherited from Tp::AbstractInterface
void propertiesChanged (const QVariantMap &changedProperties, const QStringList &invalidatedProperties)
 

Public Member Functions

 ChannelInterfaceMessagesInterface (const QString &busName, const QString &objectPath, QObject *parent=0)
 
 ChannelInterfaceMessagesInterface (const QDBusConnection &connection, const QString &busName, const QString &objectPath, QObject *parent=0)
 
 ChannelInterfaceMessagesInterface (Tp::DBusProxy *proxy)
 
 ChannelInterfaceMessagesInterface (const Tp::Client::ChannelInterface &mainInterface)
 
 ChannelInterfaceMessagesInterface (const Tp::Client::ChannelInterface &mainInterface, QObject *parent)
 
Tp::PendingVariantrequestPropertySupportedContentTypes () const
 
Tp::PendingVariantrequestPropertyMessageTypes () const
 
Tp::PendingVariantrequestPropertyMessagePartSupportFlags () const
 
Tp::PendingVariantrequestPropertyPendingMessages () const
 
Tp::PendingVariantrequestPropertyDeliveryReportingSupport () const
 
Tp::PendingVariantMaprequestAllProperties () const
 
- Public Member Functions inherited from Tp::AbstractInterface
virtual ~AbstractInterface ()
 
bool isValid () const
 
QString invalidationReason () const
 
QString invalidationMessage () const
 
void setMonitorProperties (bool monitorProperties)
 
bool isMonitoringProperties () const
 
- Public Member Functions inherited from QDBusAbstractInterface
virtual  ~QDBusAbstractInterface ()
 
bool isValid () const
 
QDBusConnection connection () const
 
QString service () const
 
QString path () const
 
QString interface () const
 
QDBusError lastError () const
 
void setTimeout (int timeout)
 
int timeout () const
 
QDBusMessage call (const QString &method, const QVariant &arg1, const QVariant &arg2, const QVariant &arg3, const QVariant &arg4, const QVariant &arg5, const QVariant &arg6, const QVariant &arg7, const QVariant &arg8)
 
QDBusMessage call (QDBus::CallMode mode, const QString &method, const QVariant &arg1, const QVariant &arg2, const QVariant &arg3, const QVariant &arg4, const QVariant &arg5, const QVariant &arg6, const QVariant &arg7, const QVariant &arg8)
 
QDBusMessage callWithArgumentList (QDBus::CallMode mode, const QString &method, const QList< QVariant > &args)
 
bool callWithCallback (const QString &method, const QList< QVariant > &args, QObject *receiver, const char *returnMethod, const char *errorMethod)
 
bool callWithCallback (const QString &method, const QList< QVariant > &args, QObject *receiver, const char *slot)
 
QDBusPendingCall asyncCall (const QString &method, const QVariant &arg1, const QVariant &arg2, const QVariant &arg3, const QVariant &arg4, const QVariant &arg5, const QVariant &arg6, const QVariant &arg7, const QVariant &arg8)
 
QDBusPendingCall asyncCallWithArgumentList (const QString &method, const QList< QVariant > &args)
 
- Public Member Functions inherited from QObject
 QObject (QObject *parent)
 
virtual  ~QObject ()
 
virtual bool event (QEvent *e)
 
virtual bool eventFilter (QObject *watched, QEvent *event)
 
virtual const QMetaObjectmetaObject () const
 
QString objectName () const
 
void setObjectName (const QString &name)
 
bool isWidgetType () const
 
bool signalsBlocked () const
 
bool blockSignals (bool block)
 
QThreadthread () const
 
void moveToThread (QThread *targetThread)
 
int startTimer (int interval)
 
void killTimer (int id)
 
findChild (const QString &name) const
 
QList< T > findChildren (const QString &name) const
 
QList< T > findChildren (const QRegExp &regExp) const
 
QObjectchild (const char *objName, const char *inheritsClass, bool recursiveSearch) const
 
const QObjectList & children () const
 
void setParent (QObject *parent)
 
void installEventFilter (QObject *filterObj)
 
void removeEventFilter (QObject *obj)
 
bool connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const
 
bool disconnect (const char *signal, const QObject *receiver, const char *method)
 
bool disconnect (const QObject *receiver, const char *method)
 
void dumpObjectTree ()
 
void dumpObjectInfo ()
 
bool setProperty (const char *name, const QVariant &value)
 
QVariant property (const char *name) const
 
QList< QByteArraydynamicPropertyNames () const
 
void destroyed (QObject *obj)
 
QObjectparent () const
 
bool inherits (const char *className) const
 
void deleteLater ()
 
 QObject (QObject *parent, const char *name)
 
void insertChild (QObject *object)
 
void removeChild (QObject *object)
 
bool isA (const char *className) const
 
const char * className () const
 
const char * name () const
 
const char * name (const char *defaultName) const
 
void setName (const char *name)
 

Static Public Member Functions

static QLatin1String staticInterfaceName ()
 
- Static Public Member Functions inherited from QObject
QString tr (const char *sourceText, const char *disambiguation, int n)
 
QString trUtf8 (const char *sourceText, const char *disambiguation, int n)
 
bool connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
 
bool connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type)
 
bool disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method)
 
bool disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method)
 

Protected Member Functions

virtual void invalidate (Tp::DBusProxy *, const QString &, const QString &)
 
- Protected Member Functions inherited from Tp::AbstractInterface
 AbstractInterface (DBusProxy *proxy, const QLatin1String &interface)
 
 AbstractInterface (const QString &busName, const QString &path, const QLatin1String &interface, const QDBusConnection &connection, QObject *parent)
 
PendingVariantinternalRequestProperty (const QString &name) const
 
PendingOperationinternalSetProperty (const QString &name, const QVariant &newValue)
 
PendingVariantMapinternalRequestAllProperties () const
 
- Protected Member Functions inherited from QObject
QObjectsender () const
 
int senderSignalIndex () const
 
int receivers (const char *signal) const
 
virtual void timerEvent (QTimerEvent *event)
 
virtual void childEvent (QChildEvent *event)
 
virtual void customEvent (QEvent *event)
 
virtual void connectNotify (const char *signal)
 
virtual void disconnectNotify (const char *signal)
 
bool checkConnectArgs (const char *signal, const QObject *object, const char *method)
 

Additional Inherited Members

- Protected Slots inherited from Tp::AbstractInterface
- Static Protected Member Functions inherited from QObject
QByteArray normalizeSignalSlot (const char *signalSlot)
 
- Properties inherited from QObject
 objectName
 

Detailed Description

Proxy class providing a 1:1 mapping of the D-Bus interface "org.freedesktop.Telepathy.Channel.Interface.Messages".

Constructor & Destructor Documentation

Tp::Client::ChannelInterfaceMessagesInterface::ChannelInterfaceMessagesInterface ( const QString busName,
const QString objectPath,
QObject parent = 0 
)

Creates a ChannelInterfaceMessagesInterface associated with the given object on the session bus.

Parameters
busNameName of the service the object is on.
objectPathPath to the object on the service.
parentPassed to the parent class constructor.
Tp::Client::ChannelInterfaceMessagesInterface::ChannelInterfaceMessagesInterface ( const QDBusConnection connection,
const QString busName,
const QString objectPath,
QObject parent = 0 
)

Creates a ChannelInterfaceMessagesInterface associated with the given object on the given bus.

Parameters
connectionThe bus via which the object can be reached.
busNameName of the service the object is on.
objectPathPath to the object on the service.
parentPassed to the parent class constructor.
Tp::Client::ChannelInterfaceMessagesInterface::ChannelInterfaceMessagesInterface ( Tp::DBusProxy proxy)

Creates a ChannelInterfaceMessagesInterface associated with the same object as the given proxy.

Parameters
proxyThe proxy to use. It will also be the QObject::parent() for this object.
Tp::Client::ChannelInterfaceMessagesInterface::ChannelInterfaceMessagesInterface ( const Tp::Client::ChannelInterface mainInterface)
explicit

Creates a ChannelInterfaceMessagesInterface associated with the same object as the given proxy. Additionally, the created proxy will have the same parent as the given proxy.

Parameters
mainInterfaceThe proxy to use.
Tp::Client::ChannelInterfaceMessagesInterface::ChannelInterfaceMessagesInterface ( const Tp::Client::ChannelInterface mainInterface,
QObject parent 
)

Creates a ChannelInterfaceMessagesInterface associated with the same object as the given proxy. However, a different parent object can be specified.

Parameters
mainInterfaceThe proxy to use.
parentPassed to the parent class constructor.

Member Function Documentation

static QLatin1String Tp::Client::ChannelInterfaceMessagesInterface::staticInterfaceName ( )
inlinestatic

Returns the name of the interface "org.freedesktop.Telepathy.Channel.Interface.Messages", which this class represents.

Returns
The D-Bus interface name.
Tp::PendingVariant* Tp::Client::ChannelInterfaceMessagesInterface::requestPropertySupportedContentTypes ( ) const
inline

Asynchronous getter for the remote object property SupportedContentTypes of type QStringList.

A list of MIME types supported by this channel, with more preferred MIME types appearing earlier in the list. The list MAY include "*/*" to indicate that attachments with arbitrary MIME types can be sent. This list MUST NOT be empty, since all Messages implementations MUST accept messages containing a single "text/plain" part.

Items in this list MUST be normalized to lower-case.

Some examples of how this property interacts with the MessagePartSupportFlags :

A simple IM implementation: only plain text messages are allowed
SupportedContentTypes = ['text/plain'], MessagePartSupportFlags = 0
Formatted text with a plain text alternative is allowed (see the HTML interface draft)
SupportedContentTypes = ['text/html', 'text/plain'], MessagePartSupportFlags = 0
JPEG or PNG images may be sent, but without any attached text
SupportedContentTypes = ['text/plain', 'image/jpeg', 'image/png'], MessagePartSupportFlags = 0
Unformatted text to which an optional JPEG or PNG image may be attached
SupportedContentTypes = ['text/plain', 'image/jpeg', 'image/png'], MessagePartSupportFlags = One_Attachment
Formatted text to which arbitrarily many images may be attached
SupportedContentTypes = ['text/html', 'text/plain', 'image/jpeg', 'image/png', 'image/x-ms-bmp'], MessagePartSupportFlags = One_Attachment | Multiple_Attachments
A full SIP implementation: arbitrary MIME messages are allowed
SupportedContentTypes = ['*/*'], MessagePartSupportFlags = One_Attachment | Multiple_Attachments

Returns
A pending variant which will emit finished when the property has been retrieved.
Tp::PendingVariant* Tp::Client::ChannelInterfaceMessagesInterface::requestPropertyMessageTypes ( ) const
inline

Asynchronous getter for the remote object property MessageTypes of type Tp::UIntList.

A list of message types which may be sent on this channel.

Returns
A pending variant which will emit finished when the property has been retrieved.
Tp::PendingVariant* Tp::Client::ChannelInterfaceMessagesInterface::requestPropertyMessagePartSupportFlags ( ) const
inline

Asynchronous getter for the remote object property MessagePartSupportFlags of type uint.

Flags indicating the level of support for message parts on this channel.

Returns
A pending variant which will emit finished when the property has been retrieved.
Tp::PendingVariant* Tp::Client::ChannelInterfaceMessagesInterface::requestPropertyPendingMessages ( ) const
inline

Asynchronous getter for the remote object property PendingMessages of type Tp::MessagePartListList.

A list of incoming messages that have neither been acknowledged nor rejected. This list is a more detailed version of the one returned by ChannelTypeTextInterface::ListPendingMessages() , and contains the same messages, uniquely identified by the same pending message IDs. Its items can be removed using ChannelTypeTextInterface::AcknowledgePendingMessages() .

Change notification is via MessageReceived() and PendingMessagesRemoved() .

Returns
A pending variant which will emit finished when the property has been retrieved.
Tp::PendingVariant* Tp::Client::ChannelInterfaceMessagesInterface::requestPropertyDeliveryReportingSupport ( ) const
inline

Asynchronous getter for the remote object property DeliveryReportingSupport of type uint.

A bitfield indicating features supported by this channel.

Returns
A pending variant which will emit finished when the property has been retrieved.
Tp::PendingVariantMap* Tp::Client::ChannelInterfaceMessagesInterface::requestAllProperties ( ) const
inline

Request all of the DBus properties on the interface.

Returns
A pending variant map which will emit finished when the properties have been retrieved.
QDBusPendingReply<QString> Tp::Client::ChannelInterfaceMessagesInterface::SendMessage ( const Tp::MessagePartList message,
uint  flags,
int  timeout = -1 
)
inlineslot

Begins a call to the D-Bus method SendMessage on the remote object.

Submit a message to the server for sending. If this method returns successfully, the message has been submitted to the server and the MessageSent() signal is emitted. A corresponding ChannelTypeTextInterface::Sent() signal on the Text interface MUST also be emitted.

This method MUST return before the MessageSent signal is emitted.

This means that the process sending the message is the first to see the Protocol_Message_Token, and can relate the message to the corresponding MessageSent() signal by comparing message tokens (if supported by the protocol).

If this method fails, message submission to the server has failed and no signal on this interface (or the Text interface) is emitted.

If this method succeeds, message submission to the server has succeeded, but the message has not necessarily reached its intended recipient. If a delivery failure is detected later, this is signalled by receiving a message whose message-type header maps to Delivery_Report. Similarly, if delivery is detected to have been successful (which is not possible in all protocols), a successful delivery report will be signalled.

Note that timeout is ignored as of now. It will be used once http://bugreports.qt.nokia.com/browse/QTBUG-11775 is fixed.

Parameters
message
The message content, including any attachments or alternatives. 
This MUST NOT include the following headers, or any others that do 
not make sense for a client to specify: message-sender, 
message-sender-id, message-sent, message-received, 
pending-message-id.
flags
Flags affecting how the message is sent. The channel MAY ignore 
some or all flags, depending on DeliveryReportingSupport; the flags 
that were handled by the CM are provided in MessageSent.
timeoutThe timeout in milliseconds.
Returns
An opaque token used to match any incoming delivery or failure 
reports against this message, or an empty string if the message is 
not readily identifiable.
QDBusPendingReply<Tp::MessagePartContentMap> Tp::Client::ChannelInterfaceMessagesInterface::GetPendingMessageContent ( uint  messageID,
const Tp::UIntList parts,
int  timeout = -1 
)
inlineslot

Begins a call to the D-Bus method GetPendingMessageContent on the remote object.

Retrieve the content of one or more parts of a pending message. Note that this function may take a considerable amount of time to return if the part's 'needs-retrieval' flag is true; consider extending the default D-Bus method call timeout. Additional API is likely to be added in future, to stream large message parts.

Note that timeout is ignored as of now. It will be used once http://bugreports.qt.nokia.com/browse/QTBUG-11775 is fixed.

Parameters
messageID
The ID of a pending message
parts
The desired entries in the array of message parts, identified by 
their position. The &quot;headers&quot; part (which is not a valid 
argument to this method) is considered to be part 0, so the valid 
part numbers start at 1 (for the second Message_Part).
timeoutThe timeout in milliseconds.
Returns

The content of the requested parts. The keys in this mapping are positions in the array of message parts; the values are either of type 's' or 'ay' (UTF-8 text string, or byte array), following the same rules as for the value of the 'content' key in the Message_Part mappings.

If the one of the requested part numbers was greater than zero but referred to a part that had no content (i.e. it had no 'content-type' key or no 'content' key), it is simply omitted from this mapping; this is not considered to be an error condition.

void Tp::Client::ChannelInterfaceMessagesInterface::MessageSent ( const Tp::MessagePartList content,
uint  flags,
const QString messageToken 
)
signal

Represents the signal MessageSent on the remote object.

Signals that a message has been submitted for sending. This MUST be emitted exactly once per emission of the ChannelTypeTextInterface::Sent() signal on the Text interface, for backwards-compatibility; clients SHOULD ignore the latter if this interface is present, as mentioned in the introduction.

This SHOULD be emitted as soon as the CM determines it's theoretically possible to send the message (e.g. the parameters are supported and correct).

This signal allows a process that is not the caller of SendMessage to log sent messages.

Parameters
content

The message content (see Message_Part for full details). If the message that was passed to SendMessage() has a formatted text part that the connection manager recognises, but no text/plain alternative, the CM MUST use the formatted text part to generate a text/plain alternative which is also included in this signal argument.

The connection manager SHOULD include the message-sender, message-sender-id and message-sent headers in the representation of the message that is signalled here. If the channel has channel-specific handles, the message-sender and message-sender-id SHOULD reflect the sender that other contacts will see.

If the connection manager can predict that the message will be altered during transmission, this argument SHOULD reflect what other contacts will receive, rather than being a copy of the argument to SendMessage (if the message is truncated, formatting or alternatives are dropped, etc., then the edited version SHOULD appear in this signal).

flags
Flags affecting how the message was sent. The flags might be a 
subset of those passed to SendMessage if the caller requested 
unsupported flags.
messageToken
An opaque token used to match any incoming delivery or failure 
reports against this message, or an empty string if the message is 
not readily identifiable.
void Tp::Client::ChannelInterfaceMessagesInterface::PendingMessagesRemoved ( const Tp::UIntList messageIDs)
signal

Represents the signal PendingMessagesRemoved on the remote object.

The messages with the given IDs have been removed from the PendingMessages list. Clients SHOULD NOT attempt to acknowledge those messages. This completes change notification for the PendingMessages property (previously, there was change notification when pending messages were added, but not when they were removed).

Parameters
messageIDs
The messages that have been removed from the pending message list.
void Tp::Client::ChannelInterfaceMessagesInterface::MessageReceived ( const Tp::MessagePartList message)
signal

Represents the signal MessageReceived on the remote object.

Signals that a message has been received and added to the pending messages queue. This MUST be emitted exactly once per emission of the Received signal on the Text interface, for backwards-compatibility; clients SHOULD ignore the latter in favour of this signal if this interface is present, as mentioned in the introduction.

Parameters
message

The message content, including any attachments or alternatives. If the incoming message contains formatted text without a plain text alternative, the connection manager MUST generate a text/plain alternative from the formatted text, and include it in this message (both here, and in the PendingMessages property).

void Tp::Client::ChannelInterfaceMessagesInterface::invalidate ( Tp::DBusProxy proxy,
const QString error,
const QString message 
)
protectedvirtual

Reimplemented from Tp::AbstractInterface.


Copyright © 2008-2011 Collabora Ltd. and Nokia Corporation
Telepathy-Qt 0.9.4