Tp::Service::CallContentInterfaceDTMFAdaptor Class Reference

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

Public Slots | Signals | Public Member Functions | List of all members
Tp::Service::CallContentInterfaceDTMFAdaptor Class Reference

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

Inherits Tp::AbstractAdaptor.

## Public Slots
void | StartTone (uchar event, const QDBusMessage &dbusMessage)
void | StopTone (const QDBusMessage &dbusMessage)
void | MultipleTones (const QString &tones, const QDBusMessage &dbusMessage)

## Signals
void | TonesDeferred (const QString &tones)
void | SendingTones (const QString &tones)
void | StoppedTones (bool cancelled)

## Public Member Functions
bool | CurrentlySendingTones () const
QString | DeferredTones () const
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.Call1.Content.Interface.DTMF".

## Member Function Documentation

bool Tp::Service::CallContentInterfaceDTMFAdaptor::CurrentlySendingTones | ( |  | ) | const

Return the value of the exported D-Bus object property `CurrentlySendingTones` of type `bool`.

Adaptees should export this property as a Qt property named 'currentlySendingTones' with type bool.

Indicates whether there are DTMF tones currently being sent in the channel. If so, the client should wait for StoppedTones signal before trying to send more tones.

Returns
  The value of exported property `CurrentlySendingTones`.

QString Tp::Service::CallContentInterfaceDTMFAdaptor::DeferredTones | ( |  | ) | const

Return the value of the exported D-Bus object property `DeferredTones` of type `QString`.

Adaptees should export this property as a Qt property named 'deferredTones' with type QString.

The tones waiting for the user to continue, if any.

When this property is set to a non-empty value, TonesDeferred() is emitted. When any tones are played (i.e. whenever SendingTones() is emitted), this property is reset to the empty string.

Returns
  The value of exported property `DeferredTones`.

void Tp::Service::CallContentInterfaceDTMFAdaptor::StartTone | ( | uchar | event,
|  | const QDBusMessage & | dbusMessage
| ) |  |
| slot

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

Adaptees should export this method as a Qt slot with the following signature: void startTone(uchar event, const Tp::Service::CallContentInterfaceDTMFAdaptor::StartToneContextPtr &context);

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

Start sending a DTMF tone to all eligible streams in the channel. Where possible, the tone will continue until StopTone is called. On certain protocols, it may only be possible to send events with a predetermined length. In this case, the implementation MAY emit a fixed-length tone, and the StopTone method call SHOULD return NotAvailable. The client may wish to control the exact duration and timing of the tones sent as a result of user's interaction with the dialpad, thus starting and stopping the tone sending explicitly. Tone overlaping or queueing is not supported, so this method can only be called if no DTMF tones are already being played.

Parameters

  event |
      A numeric event code from the DTMF_Event enum.

void Tp::Service::CallContentInterfaceDTMFAdaptor::StopTone | ( | const QDBusMessage & | dbusMessage | ) |
| slot

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

Adaptees should export this method as a Qt slot with the following signature: void stopTone(const Tp::Service::CallContentInterfaceDTMFAdaptor::StopToneContextPtr &context);

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

Stop sending any DTMF tones which have been started using the StartTone or MultipleTones methods. If there is no current tone, this method will do nothing. If MultipleTones was used, the client should not assume the sending has stopped immediately; instead, the client should wait for the StoppedTones signal. On some protocols it might be impossible to cancel queued tones immediately.

void Tp::Service::CallContentInterfaceDTMFAdaptor::MultipleTones | ( | const QString & | tones,
|  | const QDBusMessage & | dbusMessage
| ) |  |
| slot

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

Adaptees should export this method as a Qt slot with the following signature: void multipleTones(const QString& tones, const Tp::Service::CallContentInterfaceDTMFAdaptor::MultipleTonesContextPtr &context);

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

Send multiple DTMF events to all eligible streams in the channel. Each tone will be played for an implementation-defined number of milliseconds (typically 250ms), followed by a gap before the next tone is played (typically 100ms). The duration and gap are defined by the protocol or connection manager. In cases where the client knows in advance the tone sequence it wants to send, it's easier to use this method than manually start and stop each tone in the sequence. The tone and gap lengths may need to vary for interoperability, according to the protocol and other implementations' ability to recognise tones. At the time of writing, GStreamer uses a minimum of 250ms tones and 100ms gaps when playing in-band DTMF in the normal audio stream, or 70ms tones and 50ms gaps when encoding DTMF as audio/telephone-event. Tone overlaping or queueing is not supported, so this method can only be called if no DTMF tones are already being played.

Parameters

  tones | A string representation of one or more DTMF events. Implementations of this method MUST support all of the following characters in this string: the digits 0-9, letters A-D and a-d, and symbols '*' and '#' correspond to the members of DTMF_Event any of 'p', 'P', 'x', 'X' or ',' (comma) results in an implementation-defined pause, typically for 3 seconds 'w' or 'W' waits for the user to continue, by stopping interpretation of the string, and if there is more to be played, emitting the \\\ TonesDeferred() \\htmlonly signal with the rest of the string as its argument: see that signal for details

void Tp::Service::CallContentInterfaceDTMFAdaptor::TonesDeferred | ( | const QString & | tones | ) |
| signal

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

Adaptees should export this signal as a Qt signal with the following signature: void tonesDeferred(const QString& tones);

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

Parameters

  tones |
      The new non-empty value of DeferredTones.

void Tp::Service::CallContentInterfaceDTMFAdaptor::SendingTones | ( | const QString & | tones | ) |
| signal

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

Adaptees should export this signal as a Qt signal with the following signature: void sendingTones(const QString& tones);

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

Parameters

  tones |
      DTMF string (one or more events) that is to be played.

void Tp::Service::CallContentInterfaceDTMFAdaptor::StoppedTones | ( | bool | cancelled | ) |
| signal

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

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

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

Parameters

  cancelled |
      True if the DTMF tones were actively cancelled via StopTone.