summaryrefslogtreecommitdiffstats
path: root/telephony-binding/gdbus/ofono_voicecall.c
diff options
context:
space:
mode:
authorMatt Porter <mporter@konsulko.com>2017-08-08 09:05:14 -0400
committerMatt Ranostay <matt.ranostay@konsulko.com>2017-09-26 12:00:31 -0700
commitedae16e793b2ef2dd680821357128b5165b34b78 (patch)
tree7d55f199b86853f46cd2adf865bc4639cf79da2e /telephony-binding/gdbus/ofono_voicecall.c
parent8d587e0062c6d6373e7e2102423562391fcd14f2 (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 SPEC-913 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.c11
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");
}
}