| Home · All Classes · All Namespaces · Modules · Functions · Files

Public Slots | Signals | List of all members
Tp::Service::ChannelTypeTextAdaptor Class Reference
Service-side implementation » Channel service implementation

`#include <TelepathyQt/_gen/svc-channel.h>`

Inheritance diagram for Tp::Service::ChannelTypeTextAdaptor:
[legend]

## Public Slots

void | AcknowledgePendingMessages (const Tp::UIntList &IDs, const QDBusMessage &dbusMessage)
Tp::UIntList | GetMessageTypes (const QDBusMessage &dbusMessage)
Tp::PendingTextMessageList | ListPendingMessages (bool clear, const QDBusMessage &dbusMessage)
void | Send (uint type, const QString &text, const QDBusMessage &dbusMessage)

## Signals

void | LostMessage ()
void | Received (uint ID, uint timestamp, uint sender, uint type, uint flags, const QString &text)
void | SendError (uint error, uint timestamp, uint type, const QString &text)
void | Sent (uint timestamp, uint type, const QString &text)

## Additional Inherited Members

Public Member Functions inherited from Tp::AbstractAdaptor
| AbstractAdaptor (const QDBusConnection &connection, QObject *adaptee, QObject *parent)
| ~AbstractAdaptor ()
QDBusConnection | dbusConnection () const
QObject * | adaptee () const
Public Member Functions inherited from QDBusAbstractAdaptor
| ~QDBusAbstractAdaptor ()
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 QMetaObject * | metaObject () const
QString | objectName () const
void | setObjectName (const QString &name)
bool | isWidgetType () const
bool | signalsBlocked () const
bool | blockSignals (bool block)
QThread * | thread () const
void | moveToThread (QThread *targetThread)
int | startTimer (int interval)
void | killTimer (int id)
T | findChild (const QString &name) const
QList< T > | findChildren (const QString &name) const
QList< T > | findChildren (const QRegExp &regExp) const
QObject * | child (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< QByteArray > | dynamicPropertyNames () const
void | destroyed (QObject *obj)
QObject * | parent () 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 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 inherited from QDBusAbstractAdaptor
| QDBusAbstractAdaptor (QObject *obj)
void | setAutoRelaySignals (bool enable)
bool | autoRelaySignals () const
Protected Member Functions inherited from QObject
QObject * | sender () 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)
Static Protected Member Functions inherited from QObject
QByteArray | normalizeSignalSlot (const char *signalSlot)
Properties inherited from QObject
| objectName

## Detailed Description

Adaptor class providing a 1:1 mapping of the D-Bus interface "org.freedesktop.Telepathy.Channel.Type.Text".

## Member Function Documentation

void Tp::Service::ChannelTypeTextAdaptor::AcknowledgePendingMessages | ( | const Tp::UIntList & | IDs,
|  | const QDBusMessage & | dbusMessage
| ) |  |

slot

Begins a call to the exported D-Bus method `AcknowledgePendingMessages` on this object.

Adaptees should export this method as a Qt slot with the following signature: void acknowledgePendingMessages(const Tp::UIntList& IDs, const Tp::Service::ChannelTypeTextAdaptor::AcknowledgePendingMessagesContextPtr &context);

Implementations should call MethodInvocationContext::setFinished (or setFinishedWithError accordingly) on the received context object once the method has finished processing.

Inform the channel that you have handled messages by displaying them to the user (or equivalent), so they can be removed from the pending queue.

Parameters

  IDs

      The IDs of the messages to acknowledge

Tp::UIntList Tp::Service::ChannelTypeTextAdaptor::GetMessageTypes | ( | const QDBusMessage & | dbusMessage | ) |

slot

Begins a call to the exported D-Bus method `GetMessageTypes` on this object.

Adaptees should export this method as a Qt slot with the following signature: void getMessageTypes(const Tp::Service::ChannelTypeTextAdaptor::GetMessageTypesContextPtr &context);

Implementations should call MethodInvocationContext::setFinished (or setFinishedWithError accordingly) on the received context object once the method has finished processing.

Return an array indicating which types of message may be sent on this channel.

Returns

      An array of integer message types (ChannelTextMessageType)

Tp::PendingTextMessageList Tp::Service::ChannelTypeTextAdaptor::ListPendingMessages | ( | bool | clear,
|  | const QDBusMessage & | dbusMessage
| ) |  |

slot

Begins a call to the exported D-Bus method `ListPendingMessages` on this object.

Adaptees should export this method as a Qt slot with the following signature: void listPendingMessages(bool clear, const Tp::Service::ChannelTypeTextAdaptor::ListPendingMessagesContextPtr &context);

Implementations should call MethodInvocationContext::setFinished (or setFinishedWithError accordingly) on the received context object once the method has finished processing.

List the messages currently in the pending queue, and optionally remove then all.

Parameters

  clear

      If true, behave as if AcknowledgePendingMessages had also been
      called.

Returns

An array of structs representing the pending queue. Each contains:

- a numeric identifier
- a Unix timestamp indicating when the message was received
- the contact handle for the contact who sent the message
- the message type, taken from ChannelTextMessageType
- the bitwise-OR of the message flags from ChannelTextMessageFlags
- the text of the message

void Tp::Service::ChannelTypeTextAdaptor::Send | ( | uint | type,
|  | const QString & | text,
|  | const QDBusMessage & | dbusMessage
| ) |  |

slot

Begins a call to the exported D-Bus method `Send` on this object.

Adaptees should export this method as a Qt slot with the following signature: void send(uint type, const QString& text, const Tp::Service::ChannelTypeTextAdaptor::SendContextPtr &context);

Implementations should call MethodInvocationContext::setFinished (or setFinishedWithError accordingly) on the received context object once the method has finished processing.

Request that a message be sent on this channel. When the message has been submitted for delivery, this method will return and the Sent() signal will be emitted. If the message cannot be submitted for delivery, the method returns an error and no signal is emitted.

This method SHOULD return before the Sent signal is emitted.

When a Text channel implements the ChannelInterfaceMessagesInterface interface, that "SHOULD" becomes a "MUST".

Parameters

  type

      An integer indicating the type of the message

  text

      The message to send

void Tp::Service::ChannelTypeTextAdaptor::LostMessage | ( |  | ) |

signal

Represents the exported D-Bus signal `LostMessage` on this object.

Adaptees should export this signal as a Qt signal with the following signature: void lostMessage();

The adaptee signal will be automatically relayed as a D-Bus signal once emitted.

void Tp::Service::ChannelTypeTextAdaptor::Received | ( | uint | ID,
|  | uint | timestamp,
|  | uint | sender,
|  | uint | type,
|  | uint | flags,
|  | const QString & | text
| ) |  |

signal

Represents the exported D-Bus signal `Received` on this object.

Adaptees should export this signal as a Qt signal with the following signature: void received(uint ID, uint timestamp, uint sender, uint type, uint flags, const QString& text);

The adaptee signal will be automatically relayed as a D-Bus signal once emitted.

Parameters

  ID

      A numeric identifier for acknowledging the message

  timestamp

      A Unix timestamp indicating when the message was received

  sender

      The handle of the contact who sent the message

  type

      The type of the message (normal, action, notice, etc.)

  flags

      A bitwise OR of the message flags

  text

      The text of the message

void Tp::Service::ChannelTypeTextAdaptor::SendError | ( | uint | error,
|  | uint | timestamp,
|  | uint | type,
|  | const QString & | text
| ) |  |

signal

Represents the exported D-Bus signal `SendError` on this object.

Adaptees should export this signal as a Qt signal with the following signature: void sendError(uint error, uint timestamp, uint type, const QString& text);

The adaptee signal will be automatically relayed as a D-Bus signal once emitted.

Parameters

  error

      The error that occurred

  timestamp

      The Unix timestamp indicating when the message was sent

  type

      The message type

  text

      The text of the message

void Tp::Service::ChannelTypeTextAdaptor::Sent | ( | uint | timestamp,
|  | uint | type,
|  | const QString & | text
| ) |  |

signal

Represents the exported D-Bus signal `Sent` on this object.

Adaptees should export this signal as a Qt signal with the following signature: void sent(uint timestamp, uint type, const QString& text);

The adaptee signal will be automatically relayed as a D-Bus signal once emitted.

Parameters

  timestamp

      Unix timestamp indicating when the message was sent

  type

      The message type (normal, action, notice, etc) from
      ChannelTextMessageType

  text

      The text of the message. If the message was, or will be, altered
      during transmission, this argument SHOULD reflect what other
      contacts will receive rather than being a copy of the argument to
      Send.