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

Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
Tp::OutgoingDBusTubeChannel Class Reference
Client-side proxies » Channel proxies

The OutgoingDBusTubeChannel class represents an outgoing Telepathy channel of type DBusTube. More...

`#include <TelepathyQt/OutgoingDBusTubeChannel>`

Inheritance diagram for Tp::OutgoingDBusTubeChannel:
[legend]

## Public Member Functions

virtual | ~OutgoingDBusTubeChannel ()
PendingDBusTubeConnection * | offerTube (const QVariantMap &parameters, bool allowOtherUsers=false)
Public Member Functions inherited from Tp::DBusTubeChannel
virtual | ~DBusTubeChannel ()
QString | serviceName () const
bool | supportsRestrictingToCurrentUser () const
QHash< QString, Tp::ContactPtr > | contactsForBusNames () const
QString | address () const
Public Member Functions inherited from Tp::TubeChannel
virtual | ~TubeChannel ()
TubeChannelState | state () const
QVariantMap | parameters () const
Public Member Functions inherited from Tp::Channel
virtual | ~Channel ()
ConnectionPtr | connection () const
QVariantMap | immutableProperties () const
QString | channelType () const
HandleType | targetHandleType () const
uint | targetHandle () const
QString | targetId () const
ContactPtr | targetContact () const
bool | isRequested () const
ContactPtr | initiatorContact () const
PendingOperation * | requestClose ()
PendingOperation * | requestLeave (const QString &message=QString(), ChannelGroupChangeReason reason=ChannelGroupChangeReasonNone)
bool | isConference () const
Contacts | conferenceInitialInviteeContacts () const
QList< ChannelPtr > | conferenceChannels () const
QList< ChannelPtr > | conferenceInitialChannels () const
QHash< uint, ChannelPtr > | conferenceOriginalChannels () const
bool | supportsConferenceMerging () const
PendingOperation * | conferenceMergeChannel (const ChannelPtr &channel)
bool | supportsConferenceSplitting () const
PendingOperation * | conferenceSplitChannel ()
ChannelGroupFlags | groupFlags () const
bool | groupCanAddContacts () const
bool | groupCanAddContactsWithMessage () const
bool | groupCanAcceptContactsWithMessage () const
PendingOperation * | groupAddContacts (const QList< ContactPtr > &contacts, const QString &message=QString())
bool | groupCanRescindContacts () const
bool | groupCanRescindContactsWithMessage () const
bool | groupCanRemoveContacts () const
bool | groupCanRemoveContactsWithMessage () const
bool | groupCanRejectContactsWithMessage () const
bool | groupCanDepartWithMessage () const
PendingOperation * | groupRemoveContacts (const QList< ContactPtr > &contacts, const QString &message=QString(), ChannelGroupChangeReason reason=ChannelGroupChangeReasonNone)
Contacts | groupContacts (bool includeSelfContact=true) const
Contacts | groupLocalPendingContacts (bool includeSelfContact=true) const
Contacts | groupRemotePendingContacts (bool includeSelfContact=true) const
GroupMemberChangeDetails | groupLocalPendingContactChangeInfo (const ContactPtr &contact) const
GroupMemberChangeDetails | groupSelfContactRemoveInfo () const
bool | groupAreHandleOwnersAvailable () const
HandleOwnerMap | groupHandleOwners () const
bool | groupIsSelfContactTracked () const
ContactPtr | groupSelfContact () const
Public Member Functions inherited from Tp::StatefulDBusProxy
| StatefulDBusProxy (const QDBusConnection &dbusConnection, const QString &busName, const QString &objectPath, const Feature &featureCore)
virtual | ~StatefulDBusProxy ()
Public Member Functions inherited from Tp::DBusProxy
| DBusProxy (const QDBusConnection &dbusConnection, const QString &busName, const QString &objectPath, const Feature &featureCore)
virtual | ~DBusProxy ()
QDBusConnection | dbusConnection () const
QString | busName () const
QString | objectPath () const
bool | isValid () const
QString | invalidationReason () const
QString | invalidationMessage () const
Public Member Functions inherited from Tp::Object
virtual | ~Object ()
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)
Public Member Functions inherited from Tp::RefCounted
| RefCounted ()
virtual | ~RefCounted ()
Public Member Functions inherited from Tp::ReadyObject
| ReadyObject (RefCounted *object, const Feature &featureCore)
| ReadyObject (DBusProxy *proxy, const Feature &featureCore)
virtual | ~ReadyObject ()
virtual bool | isReady (const Features &features=Features()) const
virtual PendingReady * | becomeReady (const Features &requestedFeatures=Features())
virtual Features | requestedFeatures () const
virtual Features | actualFeatures () const
virtual Features | missingFeatures () const
Public Member Functions inherited from Tp::OptionalInterfaceFactory< Channel >
| OptionalInterfaceFactory (Channel *this_)
| ~OptionalInterfaceFactory ()
QStringList | interfaces () const
bool | hasInterface (const QString &name) const
Interface * | optionalInterface (InterfaceSupportedChecking check=CheckInterfaceSupported) const
Interface * | interface () const

## Static Public Member Functions

static OutgoingDBusTubeChannelPtr | create (const ConnectionPtr &connection, const QString &objectPath, const QVariantMap &immutableProperties)
Static Public Member Functions inherited from Tp::DBusTubeChannel
static DBusTubeChannelPtr | create (const ConnectionPtr &connection, const QString &objectPath, const QVariantMap &immutableProperties)
Static Public Member Functions inherited from Tp::TubeChannel
static TubeChannelPtr | create (const ConnectionPtr &connection, const QString &objectPath, const QVariantMap &immutableProperties)
Static Public Member Functions inherited from Tp::Channel
static ChannelPtr | create (const ConnectionPtr &connection, const QString &objectPath, const QVariantMap &immutableProperties)
Static Public Member Functions inherited from Tp::StatefulDBusProxy
static QString | uniqueNameFrom (const QDBusConnection &bus, const QString &wellKnownOrUnique)
static QString | uniqueNameFrom (const QDBusConnection &bus, const QString &wellKnownOrUnique, QString &error, QString &message)
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

| OutgoingDBusTubeChannel (const ConnectionPtr &connection, const QString &objectPath, const QVariantMap &immutableProperties)
Protected Member Functions inherited from Tp::DBusTubeChannel
| DBusTubeChannel (const ConnectionPtr &connection, const QString &objectPath, const QVariantMap &immutableProperties)
Protected Member Functions inherited from Tp::TubeChannel
| TubeChannel (const ConnectionPtr &connection, const QString &objectPath, const QVariantMap &immutableProperties, const Feature &coreFeature=TubeChannel::FeatureCore)
void | setParameters (const QVariantMap &parameters)
Protected Member Functions inherited from Tp::Channel
| Channel (const ConnectionPtr &connection, const QString &objectPath, const QVariantMap &immutableProperties, const Feature &coreFeature)
Client::ChannelInterface * | baseInterface () const
bool | groupSelfHandleIsLocalPending () const
Protected Member Functions inherited from Tp::DBusProxy
void | setBusName (const QString &busName)
void | invalidate (const QString &reason, const QString &message)
void | invalidate (const QDBusError &error)
Protected Member Functions inherited from Tp::Object
| Object ()
void | notify (const char *propertyName)
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)
Protected Member Functions inherited from Tp::ReadyObject
ReadinessHelper * | readinessHelper () const
Protected Member Functions inherited from Tp::OptionalInterfaceFactory< Channel >
void | setInterfaces (const QStringList &interfaces)

## Additional Inherited Members

Public Types inherited from Tp::OptionalInterfaceFactory< Channel >
enum | InterfaceSupportedChecking
Signals inherited from Tp::DBusTubeChannel
void | busNameAdded (const QString &busName, const Tp::ContactPtr &contact)
void | busNameRemoved (const QString &busName, const Tp::ContactPtr &contact)
Signals inherited from Tp::TubeChannel
void | stateChanged (Tp::TubeChannelState state)
Signals inherited from Tp::Channel
void | groupFlagsChanged (Tp::ChannelGroupFlags flags, Tp::ChannelGroupFlags added, Tp::ChannelGroupFlags removed)
void | groupCanAddContactsChanged (bool canAddContacts)
void | groupCanRemoveContactsChanged (bool canRemoveContacts)
void | groupCanRescindContactsChanged (bool canRescindContacts)
void | groupMembersChanged (const Tp::Contacts &groupMembersAdded, const Tp::Contacts &groupLocalPendingMembersAdded, const Tp::Contacts &groupRemotePendingMembersAdded, const Tp::Contacts &groupMembersRemoved, const Tp::Channel::GroupMemberChangeDetails &details)
void | groupHandleOwnersChanged (const Tp::HandleOwnerMap &owners, const Tp::UIntList &added, const Tp::UIntList &removed)
void | groupSelfContactChanged ()
void | conferenceChannelMerged (const Tp::ChannelPtr &channel)
void | conferenceChannelRemoved (const Tp::ChannelPtr &channel, const Tp::Channel::GroupMemberChangeDetails &details)
Signals inherited from Tp::DBusProxy
void | invalidated (Tp::DBusProxy *proxy, const QString &errorName, const QString &errorMessage)
Signals inherited from Tp::Object
void | propertyChanged (const QString &propertyName)
Static Public Attributes inherited from Tp::DBusTubeChannel
static const Feature | FeatureCore
static const Feature | FeatureBusNameMonitoring
Static Public Attributes inherited from Tp::TubeChannel
static const Feature | FeatureCore
Static Public Attributes inherited from Tp::Channel
static const Feature | FeatureCore
static const Feature | FeatureConferenceInitialInviteeContacts
Protected Slots inherited from Tp::Channel
PendingOperation * | groupAddSelfHandle ()
Static Protected Member Functions inherited from QObject
QByteArray | normalizeSignalSlot (const char *signalSlot)
Properties inherited from QObject
| objectName

## Detailed Description

The OutgoingDBusTubeChannel class represents an outgoing Telepathy channel of type DBusTube.

Outgoing (locally initiated/requested) tubes are initially in the TubeChannelStateNotOffered state. When offerTube is called, the connection manager takes care of instantiating a new DBus server, at which point the tube state becomes TubeChannelStateRemotePending.

If the target accepts the connection request, the state goes TubeChannelStateOpen and both sides can start using the new private bus, the address of which can be retrieved from the completed PendingDBusTubeConnection or from this class.

Note
  If you plan to use QtDBus for the DBus connection, please note you should always use QDBusConnection::connectToPeer(), regardless of the fact this tube is a p2p or a group one. The above function has been introduced in Qt 4.8, previous versions of Qt do not allow the use of DBus Tubes through QtDBus.

For more details, please refer to Telepathy specification.

See Asynchronous Object Model, Shared Pointer Usage

## Constructor & Destructor Documentation

Tp::OutgoingDBusTubeChannel::~OutgoingDBusTubeChannel | ( |  | ) |

virtual

Class destructor.

Tp::OutgoingDBusTubeChannel::OutgoingDBusTubeChannel | ( | const ConnectionPtr & | connection,
|  | const QString & | objectPath,
|  | const QVariantMap & | immutableProperties
| ) |  |

protected

Construct a new OutgoingDBusTubeChannel object.

Parameters

  connection | Connection owning this channel, and specifying the service.
  objectPath | The object path of this channel.
  immutableProperties | The immutable properties of this channel.

## Member Function Documentation

OutgoingDBusTubeChannelPtr Tp::OutgoingDBusTubeChannel::create | ( | const ConnectionPtr & | connection,
|  | const QString & | objectPath,
|  | const QVariantMap & | immutableProperties
| ) |  |

static

Create a new OutgoingDBusTubeChannel channel.

Parameters

  connection | Connection owning this channel, and specifying the service.
  objectPath | The object path of this channel.
  immutableProperties | The immutable properties of this channel.

Returns
  A OutgoingDBusTubeChannelPtr object pointing to the newly created OutgoingDBusTubeChannel object.

PendingDBusTubeConnection * Tp::OutgoingDBusTubeChannel::offerTube | ( | const QVariantMap & | parameters,
|  | bool | allowOtherUsers = `false`
| ) |  |

Offer the tube

This method sets up a private DBus connection to the channel target(s), and offers it through the tube.

The PendingDBusTubeConnection returned by this method will be completed as soon as the tube is opened and ready to be used.

This method requires DBusTubeChannel::FeatureCore to be enabled.

Parameters

  parameters | A dictionary of arbitrary Parameters to send with the tube offer. The other end will receive this QVariantMap in the parameters() method of the corresponding IncomingDBusTubeChannel.
  allowOtherUsers | Whether the server should allow other users to connect to this tube more than just the current one. If your application has no specific needs, it is advisable not to modify the default value of this argument.

Note
  If allowOtherUsers == false, but one of the ends does not support current user restriction, the tube will be offered regardless, falling back to allowing any connection. If your application requires strictly this condition to be enforced, you should check DBusTubeChannel::supportsRestrictingToCurrentUser before offering the tube, and take action from there. The tube is guaranteed either to be offered with the desired restriction or to fail the accept phase if supportsRestrictingToCurrentUser is true and allowOtherUsers is false.

Returns
  A PendingDBusTubeConnection which will finish as soon as the tube is ready to be used (hence in the Open state)