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

#include <TelepathyQt/Channel>

Inherits Tp::AbstractInterface.

Public Slots

QDBusPendingReply Destroy (int timeout=-1)
 

Public Member Functions

 ChannelInterfaceDestroyableInterface (const QString &busName, const QString &objectPath, QObject *parent=0)
 
 ChannelInterfaceDestroyableInterface (const QDBusConnection &connection, const QString &busName, const QString &objectPath, QObject *parent=0)
 
 ChannelInterfaceDestroyableInterface (Tp::DBusProxy *proxy)
 
 ChannelInterfaceDestroyableInterface (const Tp::Client::ChannelInterface &mainInterface)
 
 ChannelInterfaceDestroyableInterface (const Tp::Client::ChannelInterface &mainInterface, QObject *parent)
 
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
 

Static Public Member Functions

static QLatin1String staticInterfaceName ()
 

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
 

Additional Inherited Members

- Signals inherited from Tp::AbstractInterface
void propertiesChanged (const QVariantMap &changedProperties, const QStringList &invalidatedProperties)
 
- Protected Slots inherited from Tp::AbstractInterface

Detailed Description

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

Constructor & Destructor Documentation

◆ ChannelInterfaceDestroyableInterface() [1/5]

Tp::Client::ChannelInterfaceDestroyableInterface::ChannelInterfaceDestroyableInterface ( const QString &  busName,
const QString &  objectPath,
QObject *  parent = 0 
)

Creates a ChannelInterfaceDestroyableInterface 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.

◆ ChannelInterfaceDestroyableInterface() [2/5]

Tp::Client::ChannelInterfaceDestroyableInterface::ChannelInterfaceDestroyableInterface ( const QDBusConnection &  connection,
const QString &  busName,
const QString &  objectPath,
QObject *  parent = 0 
)

Creates a ChannelInterfaceDestroyableInterface 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.

◆ ChannelInterfaceDestroyableInterface() [3/5]

Tp::Client::ChannelInterfaceDestroyableInterface::ChannelInterfaceDestroyableInterface ( Tp::DBusProxy proxy)

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

Parameters
proxyThe proxy to use. It will also be the QObject::parent() for this object.

◆ ChannelInterfaceDestroyableInterface() [4/5]

Tp::Client::ChannelInterfaceDestroyableInterface::ChannelInterfaceDestroyableInterface ( const Tp::Client::ChannelInterface mainInterface)
explicit

Creates a ChannelInterfaceDestroyableInterface 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.

◆ ChannelInterfaceDestroyableInterface() [5/5]

Tp::Client::ChannelInterfaceDestroyableInterface::ChannelInterfaceDestroyableInterface ( const Tp::Client::ChannelInterface mainInterface,
QObject *  parent 
)

Creates a ChannelInterfaceDestroyableInterface 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

◆ staticInterfaceName()

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

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

Returns
The D-Bus interface name.

◆ requestAllProperties()

Tp::PendingVariantMap* Tp::Client::ChannelInterfaceDestroyableInterface::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.

◆ Destroy

QDBusPendingReply Tp::Client::ChannelInterfaceDestroyableInterface::Destroy ( int  timeout = -1)
inlineslot

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

Close the channel abruptly, possibly with loss of data. The connection manager MUST NOT re-create the channel unless/until more events occur.

The main motivating situation for this method is that when a Text channel with pending messages is closed with Close, it comes back as an incoming channel (to avoid a race between Close and an incoming message). If Destroy is called on a Text channel, the CM should delete all pending messages and close the channel, and the channel shouldn't be re-created until/unless another message arrives.

Most clients SHOULD call ChannelInterface::Close() instead. However, if a client explicitly intends to destroy the channel with possible loss of data, it SHOULD call this method if this interface is supported (according to the ChannelInterface::Interfaces property), falling back to Close if not.

In particular, channel dispatchers SHOULD use this method if available when terminating channels that cannot be handled correctly (for instance, if no handler has been installed for a channel type, or if the handler crashes repeatedly).

Connection managers do not need to implement this interface on channels where Close and Destroy would be equivalent.

Callers need to be able to fall back to Close in any case.

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

Parameters
timeoutThe timeout in milliseconds.

◆ invalidate()

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

Reimplemented from Tp::AbstractInterface.