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

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

Inherits Tp::AbstractAdaptor.

Public Slots

void StartTone (uint streamID, uchar event, const QDBusMessage &dbusMessage)
 
void StopTone (uint streamID, 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 InitialTones () 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.Channel.Interface.DTMF".

Member Function Documentation

◆ CurrentlySendingTones()

bool Tp::Service::ChannelInterfaceDTMFAdaptor::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.

◆ InitialTones()

QString Tp::Service::ChannelInterfaceDTMFAdaptor::InitialTones ( ) const

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

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

If non-empty in a channel request that will create a new channel, the connection manager should send the tones immediately after at least one eligible audio stream has been created in the channel. This should only be used with InitialAudio=true. This property is immutable (cannot change).

Returns
The value of exported property InitialTones.

◆ DeferredTones()

QString Tp::Service::ChannelInterfaceDTMFAdaptor::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.

◆ StartTone

void Tp::Service::ChannelInterfaceDTMFAdaptor::StartTone ( uint  streamID,
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(uint streamID, uchar event, const Tp::Service::ChannelInterfaceDTMFAdaptor::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
streamID
A stream ID as defined in the StreamedMedia channel type. This 
argument is included for backwards compatibility and MUST be 
ignored by the implementations - the tone SHOULD be sent to all 
eligible streams in the channel.
event
A numeric event code from the DTMF_Event enum.

◆ StopTone

void Tp::Service::ChannelInterfaceDTMFAdaptor::StopTone ( uint  streamID,
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(uint streamID, const Tp::Service::ChannelInterfaceDTMFAdaptor::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.

Parameters
streamID
A stream ID as defined in the StreamedMedia channel type. This 
argument is included for backwards compatibility and MUST be 
ignored by the implementations - the sending SHOULD be stoped in 
all eligible streams in the channel.

◆ MultipleTones

void Tp::Service::ChannelInterfaceDTMFAdaptor::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::ChannelInterfaceDTMFAdaptor::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

◆ TonesDeferred

void Tp::Service::ChannelInterfaceDTMFAdaptor::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.

◆ SendingTones

void Tp::Service::ChannelInterfaceDTMFAdaptor::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.

◆ StoppedTones

void Tp::Service::ChannelInterfaceDTMFAdaptor::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.