Home · All Classes · All Namespaces · Modules · Functions · Files
Public Slots | Signals | List of all members
Tp::Service::ChannelTypeTextAdaptor Class Reference

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

Inherits Tp::AbstractAdaptor.

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
 

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.


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