diff options
author | Matt Porter <mporter@konsulko.com> | 2017-08-08 09:05:14 -0400 |
---|---|---|
committer | Matt Porter <mporter@konsulko.com> | 2017-08-08 09:29:57 -0400 |
commit | e598975c8374effa043eb83dcae1c08749f3ea91 (patch) | |
tree | 0312c5c04060a1baabf51b9a976ca67234a50e95 /telephony-binding/gdbus/ofono_voicecall.c | |
parent | 597ed5434f369ab614fa2ce543aab3f49101b5f1 (diff) |
telephony-binding: convert to v2 binding
Convert the telephony-binding to the v2 binding format.
Also move to AFB_ message macros and remove propagation
of the interface struct.
Bug-AGL: SPEC-814
Change-Id: Ic9ce86f59af01ce00cece4e29cd5fe36afa7d74c
Signed-off-by: Matt Porter <mporter@konsulko.com>
Diffstat (limited to 'telephony-binding/gdbus/ofono_voicecall.c')
-rw-r--r-- | telephony-binding/gdbus/ofono_voicecall.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/telephony-binding/gdbus/ofono_voicecall.c b/telephony-binding/gdbus/ofono_voicecall.c index 585bf5f..cdc0da9 100644 --- a/telephony-binding/gdbus/ofono_voicecall.c +++ b/telephony-binding/gdbus/ofono_voicecall.c @@ -19,12 +19,11 @@ #include <string.h> #include <unistd.h> +#define AFB_BINDING_VERSION 2 #include <afb/afb-binding.h> #include "ofono_voicecall_interface.h" -const struct afb_binding_interface *interface; - static void property_changed(OrgOfonoVoiceCall *voice_call, gchar *property, GVariant *value) @@ -39,13 +38,11 @@ static void property_changed(OrgOfonoVoiceCall *voice_call, } } -OrgOfonoVoiceCall *ofono_voicecall_new(const struct afb_binding_interface *iface, - gchar *op, +OrgOfonoVoiceCall *ofono_voicecall_new(gchar *op, void (*call_state_changed)(OrgOfonoVoiceCall *,gchar *)) { OrgOfonoVoiceCall *voice_call; - interface = iface; 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); @@ -63,11 +60,11 @@ OrgOfonoVoiceCall *ofono_voicecall_new(const struct afb_binding_interface *iface G_TYPE_STRING); if (g_signal_connect(G_OBJECT(voice_call), "call-state-changed", G_CALLBACK(call_state_changed), NULL) <= 0) { - ERROR(interface, "Failed to connect to signal call-state-changed\n"); + AFB_ERROR("Failed to connect to signal call-state-changed\n"); } if (g_signal_connect(voice_call, "property-changed", G_CALLBACK(property_changed), NULL) <= 0) { - ERROR(interface, "Failed to connect to signal call-added\n"); + AFB_ERROR("Failed to connect to signal call-added\n"); } } |