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

Signals | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions
Tp::CallChannel Class Reference
Channel proxies

The CallChannel class provides an object representing a Telepathy channel of type Call. More...

`#include <TelepathyQt/CallChannel>`

Inherits Tp::Channel.

List of all members.

## Signals

- void callStateChanged (Tp::CallState state)
- void callFlagsChanged (Tp::CallFlags flags)
- void remoteMemberFlagsChanged (const QHash< Tp::ContactPtr, Tp::CallMemberFlags > &remoteMemberFlags, const Tp::CallStateReason &reason)
- void remoteMembersRemoved (const Tp::Contacts &remoteMembers, const Tp::CallStateReason &reason)
- void contentAdded (const Tp::CallContentPtr &content)
- void contentRemoved (const Tp::CallContentPtr &content, const Tp::CallStateReason &reason)
- void localHoldStateChanged (Tp::LocalHoldState state, Tp::LocalHoldStateReason reason)

## Public Member Functions

- virtual ~CallChannel ()
- bool handlerStreamingRequired () const
- StreamTransportType initialTransportType () const
- bool hasInitialAudio () const
- bool hasInitialVideo () const
- QString initialAudioName () const
- QString initialVideoName () const
- bool hasMutableContents () const
- PendingOperation * setRinging ()
- PendingOperation * setQueued ()
- PendingOperation * accept ()
- PendingOperation * hangup (CallStateChangeReason reason=CallStateChangeReasonUserRequested, const QString &detailedReason=QString(), const QString &message=QString())
- CallState callState () const
- CallFlags callFlags () const
- CallStateReason callStateReason () const
- QVariantMap callStateDetails () const
- Contacts remoteMembers () const
- CallMemberFlags remoteMemberFlags (const ContactPtr &member) const
- CallContents contents () const
- CallContents contentsForType (MediaStreamType type) const
- CallContentPtr contentByName (const QString &contentName) const
- PendingCallContent * requestContent (const QString &name, MediaStreamType type, MediaStreamDirection direction)
- LocalHoldState localHoldState () const
- LocalHoldStateReason localHoldStateReason () const
- PendingOperation * requestHold (bool hold)

## Static Public Member Functions

- static CallChannelPtr create (const ConnectionPtr &connection, const QString &objectPath, const QVariantMap &immutableProperties)

## Static Public Attributes

- static const Feature FeatureCore
- static const Feature FeatureCallState
- static const Feature FeatureCallMembers
- static const Feature FeatureContents
- static const Feature FeatureLocalHoldState

## Protected Member Functions

- CallChannel (const ConnectionPtr &connection, const QString &objectPath, const QVariantMap &immutableProperties, const Feature &coreFeature=CallChannel::FeatureCore)

## Detailed Description

The CallChannel class provides an object representing a Telepathy channel of type Call.

## Constructor & Destructor Documentation

Tp::CallChannel::~CallChannel | ( |  | ) | `[virtual]`

Class destructor.

Tp::CallChannel::CallChannel | ( | const ConnectionPtr & | connection,
|  | const QString & | objectPath,
|  | const QVariantMap & | immutableProperties,
|  | const Feature & | coreFeature = `CallChannel::FeatureCore`
| ) |  | `[protected]`

Construct a new CallChannel associated with the given object on the same service as the given connection.

Parameters:

  connection | Connection owning this channel, and specifying the service.
  objectPath | The object path of this channel.
  immutableProperties | The immutable properties of this channel.
  coreFeature | The core feature of the channel type. The corresponding introspectable should depend on Channel::FeatureCore.

## Member Function Documentation

CallChannelPtr Tp::CallChannel::create | ( | const ConnectionPtr & | connection,
|  | const QString & | objectPath,
|  | const QVariantMap & | immutableProperties
| ) |  | `[static]`

Create a new CallChannel 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.

Returns:
  A CallChannelPtr object pointing to the newly created CallChannel object.

Reimplemented from Tp::Channel.

bool Tp::CallChannel::handlerStreamingRequired | ( |  | ) | const

Check whether media streaming by the handler is required for this channel.

If `false`, all of the media streaming is done by some mechanism outside the scope of Telepathy, otherwise the handler is responsible for doing the actual media streaming.

Returns:
  `true` if required, `false` otherwise.

StreamTransportType Tp::CallChannel::initialTransportType | ( |  | ) | const

Return the initial transport type used for this call if set on a requested channel.

Where not applicable, this property is defined to be StreamTransportTypeUnknown, in particular, on CMs with hardware streaming.

Returns:
  The initial transport type used for this call.

bool Tp::CallChannel::hasInitialAudio | ( |  | ) | const

Return whether an audio content was requested at the channel's creation time.

Returns:
  `true` if an audio content was requested, `false` otherwise.

bool Tp::CallChannel::hasInitialVideo | ( |  | ) | const

Return whether a video content was requested at the channel's creation time.

Returns:
  `true` if an video content was requested, `false` otherwise.

QString Tp::CallChannel::initialAudioName | ( |  | ) | const

Return the name of the initial audio content if hasInitialAudio() returns `true`.

Returns:
  The name of the initial audio content.

QString Tp::CallChannel::initialVideoName | ( |  | ) | const

Return the name of the initial video content if hasInitialVideo() returns `true`.

Returns:
  The name of the initial video content.

bool Tp::CallChannel::hasMutableContents | ( |  | ) | const

Return whether new contents can be added on the call after the Channel has been requested.

Returns:
  `true` if a new content can be added after the Channel has been requested, `false` otherwise.

See also:
  requestContent()

PendingOperation * Tp::CallChannel::setRinging | ( |  | ) |

Indicate that the local user has been alerted about the incoming call.

Returns:
  A PendingOperation which will emit PendingOperation::finished when the call has finished.

PendingOperation * Tp::CallChannel::setQueued | ( |  | ) |

Notify the CM that the local user is already in a call, so this call has been put in a call-waiting style queue.

Returns:
  A PendingOperation which will emit PendingOperation::finished when the call has finished.

PendingOperation * Tp::CallChannel::accept | ( |  | ) |

Accept an incoming call, or begin calling the remote contact on an outgoing call.

Returns:
  A PendingOperation which will emit PendingOperation::finished when the call has finished.

PendingOperation * Tp::CallChannel::hangup | ( | CallStateChangeReason | reason = `CallStateChangeReasonUserRequested`,
|  | const QString & | detailedReason = `QString()`,
|  | const QString & | message = `QString()`
| ) |  |

Request that the call is ended.

Parameters:

  reason | A generic hangup reason.
  detailedReason | A more specific reason for the call hangup, if one is available, or an empty string otherwise.
  message | A human-readable message to be sent to the remote contact(s).

Returns:
  A PendingOperation which will emit PendingOperation::finished when the call has finished.

CallState Tp::CallChannel::callState | ( |  | ) | const

Return the current high-level state of this call.

This function requires CallChannel::FeatureCallState to be enabled.

Returns:
  The current high-level state of this call.

See also:
  callStateChanged()

CallFlags Tp::CallChannel::callFlags | ( |  | ) | const

Return the flags representing the status of this call as a whole, providing more specific information than callState().

This function requires CallChannel::FeatureCallState to be enabled.

Returns:
  The flags representing the status of this call.

See also:
  callFlagsChanged()

CallStateReason Tp::CallChannel::callStateReason | ( |  | ) | const

Return the reason for the last change to the callState() and/or callFlags().

This function requires CallChannel::FeatureCallState to be enabled.

Returns:
  The reason for the last change to the callState() and/or callFlags().

See also:
  callStateChanged(), callFlagsChanged()

QVariantMap Tp::CallChannel::callStateDetails | ( |  | ) | const

Return optional extensible details for the callState(), callFlags() and/or callStateReason().

This function requires CallChannel::FeatureCallState to be enabled.

Returns:
  The optional extensible details for the callState(), callFlags() and/or callStateReason().

See also:
  callStateChanged(), callFlagsChanged()

Contacts Tp::CallChannel::remoteMembers | ( |  | ) | const

Return the remote members of this call.

This function requires CallChannel::FeatureCallMembers to be enabled.

Returns:
  The remote members of this call.

See also:
  remoteMemberFlags(), remoteMemberFlagsChanged(), remoteMembersRemoved()

CallMemberFlags Tp::CallChannel::remoteMemberFlags | ( | const ContactPtr & | member | ) | const

Return the flags that describe the status of a given member of this call.

This function requires CallChannel::FeatureCallMembers to be enabled.

Parameters:

  member | The member of interest.

Returns:
  The flags that describe the status of the requested member.

See also:
  remoteMemberFlagsChanged(), remoteMembers(), remoteMembersRemoved()

CallContents Tp::CallChannel::contents | ( |  | ) | const

Return a list of media contents in this channel.

This methods requires CallChannel::FeatureContents to be enabled.

Returns:
  The contents in this channel.

See also:
  contentAdded(), contentRemoved(), contentsForType(), contentByName(), requestContent()

CallContents Tp::CallChannel::contentsForType | ( | MediaStreamType | type | ) | const

Return a list of media contents in this channel for the given type type.

This methods requires CallChannel::FeatureContents to be enabled.

Parameters:

  type | The interested type.

Returns:
  A list of media contents in this channel for the given type type.

See also:
  contentAdded(), contentRemoved(), contents(), contentByName(), requestContent()

CallContentPtr Tp::CallChannel::contentByName | ( | const QString & | contentName | ) | const

Return the media content in this channel that has the specified name.

This methods requires CallChannel::FeatureContents to be enabled.

Parameters:

  name | The interested name.

Returns:
  The media content in this channel that has the specified name.

See also:
  contentAdded(), contentRemoved(), contents(), contentsForType(), requestContent()

PendingCallContent * Tp::CallChannel::requestContent | ( | const QString & | name,
|  | MediaStreamType | type,
|  | MediaStreamDirection | direction
| ) |  |

Request a new media content to be created to exchange the given type type of media.

This methods requires CallChannel::FeatureContents to be enabled.

Returns:
  A PendingCallContent which will emit PendingCallContent::finished when the call has finished.

See also:
  contentAdded(), contents(), contentsForType(), contentByName()

LocalHoldState Tp::CallChannel::localHoldState | ( |  | ) | const

Return whether the local user has placed this channel on hold.

This method requires CallChannel::FeatureHoldState to be enabled.

Returns:
  The channel's local hold state.

See also:
  requestHold(), localHoldStateChanged()

LocalHoldStateReason Tp::CallChannel::localHoldStateReason | ( |  | ) | const

Return the reason why localHoldState() changed to its current value.

This method requires CallChannel::FeatureLocalHoldState to be enabled.

Returns:
  The channel local hold state reason.

See also:
  requestHold(), localHoldStateChanged()

PendingOperation * Tp::CallChannel::requestHold | ( | bool | hold | ) |

Request that the channel be put on hold (be instructed not to send any media streams to you) or be taken off hold.

If the connection manager can immediately tell that the requested state change could not possibly succeed, the resulting PendingOperation will fail with error code TP_QT_ERROR_NOT_AVAILABLE. If the requested state is the same as the current state, the resulting PendingOperation will finish successfully.

Otherwise, the channel's local hold state will change to Tp::LocalHoldStatePendingHold or Tp::LocalHoldStatePendingUnhold (as appropriate), then the resulting PendingOperation will finish successfully.

The eventual success or failure of the request is indicated by a subsequent localHoldStateChanged() signal, changing the local hold state to Tp::LocalHoldStateHeld or Tp::LocalHoldStateUnheld.

If the channel has multiple streams, and the connection manager succeeds in changing the hold state of one stream but fails to change the hold state of another, it will attempt to revert all streams to their previous hold states.

If the channel does not support the TP_QT_IFACE_CHANNEL_INTERFACE_HOLD interface, the PendingOperation will fail with error code TP_QT_ERROR_NOT_IMPLEMENTED.

Parameters:

  hold | A boolean indicating whether or not the channel should be on hold

Returns:
  A PendingOperation, which will emit PendingOperation::finished when the request finishes.

See also:
  localHoldState(), localHoldStateReason(), localHoldStateChanged()

void Tp::CallChannel::callStateChanged | ( | Tp::CallState | state | ) | `[signal]`

This signal is emitted when the value of callState() changes.

Parameters:

  state | The new state.

void Tp::CallChannel::callFlagsChanged | ( | Tp::CallFlags | flags | ) | `[signal]`

This signal is emitted when the value of callFlags() changes.

Parameters:

  flags | The new flags.

void Tp::CallChannel::remoteMemberFlagsChanged | ( | const QHash< Tp::ContactPtr, Tp::CallMemberFlags > & | remoteMemberFlags,
|  | const Tp::CallStateReason & | reason
| ) |  | `[signal]`

This signal is emitted when the flags of members of the call change, or when new members are added in the call.

Parameters:

  remoteMemberFlags | A maping of all the call members whose flags were changed to their new flags, and of all the new members of the call to their initial flags.
  reason | The reason for this change.

void Tp::CallChannel::remoteMembersRemoved | ( | const Tp::Contacts & | remoteMembers,
|  | const Tp::CallStateReason & | reason
| ) |  | `[signal]`

This signal is emitted when remote members are removed from the call.

Parameters:

  remoteMembers | The members that were removed.
  reason | The reason for this removal.

void Tp::CallChannel::contentAdded | ( | const Tp::CallContentPtr & | content | ) | `[signal]`

This signal is emitted when a media content is added to this channel.

Parameters:

  content | The media content that was added.

See also:
  contents(), contentsForType()

void Tp::CallChannel::contentRemoved | ( | const Tp::CallContentPtr & | content,
|  | const Tp::CallStateReason & | reason
| ) |  | `[signal]`

This signal is emitted when a media content is removed from this channel.

Parameters:

  content | The media content that was removed.
  reason | The reason for this removal.

See also:
  contents(), contentsForType()

void Tp::CallChannel::localHoldStateChanged | ( | Tp::LocalHoldState | state,
|  | Tp::LocalHoldStateReason | reason
| ) |  | `[signal]`

This signal is emitted when the local hold state of this channel changes.

Parameters:

  state | The new local hold state of this channel.
  reason | The reason why the change occurred.

See also:
  localHoldState(), localHoldStateReason()

## Member Data Documentation

const Feature Tp::CallChannel::FeatureCore`[static]`

Feature representing the core that needs to become ready to make the CallChannel object usable.

When calling isReady(), becomeReady(), this feature is implicitly added to the requested features.

Reimplemented from Tp::Channel.

const Feature Tp::CallChannel::FeatureCallState`[static]`

Feature used in order to access call state specific methods.

See call state specific methods' documentation for more details.

const Feature Tp::CallChannel::FeatureCallMembers`[static]`

Feature used in order to access members specific methods.

See local members specific methods' documentation for more details.

const Feature Tp::CallChannel::FeatureContents`[static]`

Feature used in order to access content specific methods.

See media content specific methods' documentation for more details.

const Feature Tp::CallChannel::FeatureLocalHoldState`[static]`

Feature used in order to access local hold state info.

See local hold state specific methods' documentation for more details.