diff options
Diffstat (limited to 'telephony-binding/gdbus')
-rw-r--r-- | telephony-binding/gdbus/ofono_voicecall.c | 18 | ||||
-rw-r--r-- | telephony-binding/gdbus/ofono_voicecall.h | 6 |
2 files changed, 18 insertions, 6 deletions
diff --git a/telephony-binding/gdbus/ofono_voicecall.c b/telephony-binding/gdbus/ofono_voicecall.c index 44b6cec..b602c89 100644 --- a/telephony-binding/gdbus/ofono_voicecall.c +++ b/telephony-binding/gdbus/ofono_voicecall.c @@ -16,13 +16,21 @@ #include "ofono_voicecall_interface.h" -void ofono_hangup(const gchar *op) +OrgOfonoVoiceCall *ofono_voicecall_new(gchar *op) { - GError *error = NULL; + return org_ofono_voice_call_proxy_new_for_bus_sync( + G_BUS_TYPE_SYSTEM, G_DBUS_PROXY_FLAGS_NONE, + "org.ofono", op, NULL, NULL); +} - OrgOfonoVoiceCall *voice_call = org_ofono_voice_call_proxy_new_for_bus_sync( - G_BUS_TYPE_SYSTEM, G_DBUS_PROXY_FLAGS_NONE, - "org.ofono", op, NULL, NULL); +void ofono_voicecall_free(OrgOfonoVoiceCall *voice_call) +{ + g_object_unref(G_OBJECT(voice_call)); +} + +void ofono_voicecall_hangup(OrgOfonoVoiceCall *voice_call) +{ + GError *error = NULL; org_ofono_voice_call_call_hangup_sync(voice_call, NULL, &error); } diff --git a/telephony-binding/gdbus/ofono_voicecall.h b/telephony-binding/gdbus/ofono_voicecall.h index efabc84..0e33dd5 100644 --- a/telephony-binding/gdbus/ofono_voicecall.h +++ b/telephony-binding/gdbus/ofono_voicecall.h @@ -16,4 +16,8 @@ #include <glib.h> -void ofono_hangup(gchar *); +#include "ofono_voicecall_interface.h" + +OrgOfonoVoiceCall *ofono_voicecall_new(gchar *); +void ofono_voicecall_free(OrgOfonoVoiceCall *); +void ofono_voicecall_hangup(OrgOfonoVoiceCall *); |