From: Frédéric Danis <frederic.danis.oss@xxxxxxxxx> --- profiles/audio/telephony.c | 26 ++++++++++++++++++++++++++ profiles/audio/telephony.h | 4 ++++ 2 files changed, 30 insertions(+) diff --git a/profiles/audio/telephony.c b/profiles/audio/telephony.c index 83a7ff40c..2a4c19a58 100644 --- a/profiles/audio/telephony.c +++ b/profiles/audio/telephony.c @@ -204,6 +204,30 @@ static DBusMessage *hangup_all(DBusConnection *conn, DBusMessage *msg, return btd_error_not_supported(msg); } +static DBusMessage *hangup_active(DBusConnection *conn, DBusMessage *msg, + void *user_data) +{ + struct telephony *telephony = user_data; + + if (telephony->cbs && telephony->cbs->hangup_active) + return telephony->cbs->hangup_active(conn, msg, + telephony->profile_data); + + return btd_error_not_supported(msg); +} + +static DBusMessage *hangup_held(DBusConnection *conn, DBusMessage *msg, + void *user_data) +{ + struct telephony *telephony = user_data; + + if (telephony->cbs && telephony->cbs->hangup_held) + return telephony->cbs->hangup_held(conn, msg, + telephony->profile_data); + + return btd_error_not_supported(msg); +} + static DBusMessage *create_multiparty(DBusConnection *conn, DBusMessage *msg, void *user_data) { @@ -340,6 +364,8 @@ static const GDBusMethodTable telephony_methods[] = { { GDBUS_ASYNC_METHOD("HoldAndAnswer", NULL, NULL, hold_and_answer) }, { GDBUS_ASYNC_METHOD("HangupAll", NULL, NULL, hangup_all) }, + { GDBUS_ASYNC_METHOD("HangupActive", NULL, NULL, hangup_active) }, + { GDBUS_ASYNC_METHOD("HangupHeld", NULL, NULL, hangup_held) }, { GDBUS_ASYNC_METHOD("CreateMultiparty", NULL, GDBUS_ARGS({ "calls", "ao" }), create_multiparty) }, diff --git a/profiles/audio/telephony.h b/profiles/audio/telephony.h index aaf41888d..b02111264 100644 --- a/profiles/audio/telephony.h +++ b/profiles/audio/telephony.h @@ -43,6 +43,10 @@ struct telephony_callbacks { void *profile_data); DBusMessage *(*hangup_all)(DBusConnection *conn, DBusMessage *msg, void *profile_data); + DBusMessage *(*hangup_active)(DBusConnection *conn, DBusMessage *msg, + void *profile_data); + DBusMessage *(*hangup_held)(DBusConnection *conn, DBusMessage *msg, + void *profile_data); DBusMessage *(*create_multiparty)(DBusConnection *conn, DBusMessage *msg, void *profile_data); -- 2.43.0