ModemManager::Call Class

class ModemManager::Call

Provides an interface to manipulate and control a call. More...

Header: #include <ModemManagerQt/Call>
CMake: find_package(KF6 REQUIRED COMPONENTS ModemManagerQt)
target_link_libraries(mytarget PRIVATE KF6::ModemManagerQt)

Public Types

Public Functions

Call(const QString &path, QObject *parent = nullptr)
QDBusPendingReply<> accept()
(since 6.24.0) QVariantMap audioFormat() const
(since 6.24.0) QString audioPort() const
(since 6.24.0) QDBusPendingReply<> deflect(const QString &number)
MMCallDirection direction() const
QDBusPendingReply<> hangup()
(since 6.24.0) bool isMultiparty() const
(since 6.24.0) QDBusPendingReply<> joinMultiparty()
(since 6.24.0) QDBusPendingReply<> leaveMultiparty()
QString number() const
QDBusPendingReply<> sendDtmf(const QString &dtmf)
void setTimeout(int timeout)
QDBusPendingReply<> start()
MMCallState state() const
MMCallStateReason stateReason() const
int timeout() const
QString uni() const

Signals

(since 6.24.0) void audioFormatChanged(const QVariantMap &audioFormat)
(since 6.24.0) void audioPortChanged(const QString &audioPort)
void dtmfReceived(const QString &dtmf)
(since 6.24.0) void multipartyChanged(bool multiparty)
void numberChanged(const QString &number)
void stateChanged(MMCallState oldState, MMCallState newState, MMCallStateReason reason)

Detailed Description

Note: MMCallState, MMCallStateReason and MMCallDirection enums are defined in <ModemManager/ModemManager-enums.h> See http://www.freedesktop.org/software/ModemManager/api/latest/ModemManager-Flags-and-Enumerations.html .

Member Type Documentation

Call::List

Call::Ptr

Member Function Documentation

[explicit] Call::Call(const QString &path, QObject *parent = nullptr)

QDBusPendingReply<> Call::accept()

Accept incoming call (answer).

Applicable only if state is MM_CALL_STATE_RINGING_IN and direction is MM_CALL_DIRECTION_INCOMING.

[since 6.24.0] QVariantMap Call::audioFormat() const

If call audio is routed via the host, returns a description of the audio format supported by the audio port.

The returned map may include the following items:

"encoding" - The audio encoding format (e.g. "pcm").

"resolution" - The sampling precision and encoding format (e.g. "s16le").

"rate" - The sampling rate as an unsigned integer (e.g. 8000).

This function was introduced in 6.24.0.

[signal, since 6.24.0] void Call::audioFormatChanged(const QVariantMap &audioFormat)

This function was introduced in 6.24.0.

[since 6.24.0] QString Call::audioPort() const

If call audio is routed via the host, returns the name of the kernel device that provides the audio. For example, with certain Huawei USB modems, this might be "ttyUSB2" indicating audio is available via ttyUSB2 in the format described by the audioFormat property.

This function was introduced in 6.24.0.

[signal, since 6.24.0] void Call::audioPortChanged(const QString &audioPort)

This function was introduced in 6.24.0.

[since 6.24.0] QDBusPendingReply<> Call::deflect(const QString &number)

Deflect an incoming or waiting call to a new number. The call will be considered terminated once the deflection is performed.

Applicable only if state is MM_CALL_STATE_RINGING_IN or MM_CALL_STATE_WAITING and direction is MM_CALL_DIRECTION_INCOMING.

This function was introduced in 6.24.0.

MMCallDirection Call::direction() const

Returns the MMCallDirection value describing the direction of the call.

[signal] void Call::dtmfReceived(const QString &dtmf)

QDBusPendingReply<> Call::hangup()

Hangup the active call.

Applicable only if state is MM_CALL_STATE_UNKNOWN.

[since 6.24.0] bool Call::isMultiparty() const

Returns whether the call is currently part of a multiparty conference call.

This function was introduced in 6.24.0.

[since 6.24.0] QDBusPendingReply<> Call::joinMultiparty()

Join the currently held call into a single multiparty call with another already active call.

The calls will be flagged with the Multiparty property while they are part of the multiparty call.

Applicable only if state is MM_CALL_STATE_HELD.

This function was introduced in 6.24.0.

[since 6.24.0] QDBusPendingReply<> Call::leaveMultiparty()

If this call is part of an ongoing multiparty call, detach it from the multiparty call, put the multiparty call on hold, and activate this one alone. This operation makes this call private again between both ends of the call.

Applicable only if state is MM_CALL_STATE_ACTIVE or MM_CALL_STATE_HELD and the call is a multiparty call.

This function was introduced in 6.24.0.

[signal, since 6.24.0] void Call::multipartyChanged(bool multiparty)

This function was introduced in 6.24.0.

QString Call::number() const

Returns the remote phone number.

[signal] void Call::numberChanged(const QString &number)

QDBusPendingReply<> Call::sendDtmf(const QString &dtmf)

Send a DTMF tone (Dual Tone Multi-Frequency) (only on supported modems).

dtmf is the DTMF tone identifier [0-9A-D*#].

Applicable only if state is MM_CALL_STATE_ACTIVE.

void Call::setTimeout(int timeout)

Sets the timeout in milliseconds for all async method DBus calls. -1 means the default DBus timeout (usually 25 seconds).

See also timeout().

QDBusPendingReply<> Call::start()

If the outgoing call has not yet been started, start it.

Applicable only if state is MM_CALL_STATE_UNKNOWN and direction is MM_CALL_DIRECTION_OUTGOING.

MMCallState Call::state() const

Returns the current MMCallState value describing the state of the call.

[signal] void Call::stateChanged(MMCallState oldState, MMCallState newState, MMCallStateReason reason)

MMCallStateReason Call::stateReason() const

Returns the MMCallStateReason value describing why the state changed.

int Call::timeout() const

Returns the current value of the DBus timeout in milliseconds. -1 means the default DBus timeout (usually 25 seconds).

See also setTimeout().

QString Call::uni() const