summaryrefslogtreecommitdiffstats
path: root/plugins/lib/bluetooth/hal-bt.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/lib/bluetooth/hal-bt.c')
-rw-r--r--plugins/lib/bluetooth/hal-bt.c77
1 files changed, 41 insertions, 36 deletions
diff --git a/plugins/lib/bluetooth/hal-bt.c b/plugins/lib/bluetooth/hal-bt.c
index a4791e1..3f38012 100644
--- a/plugins/lib/bluetooth/hal-bt.c
+++ b/plugins/lib/bluetooth/hal-bt.c
@@ -64,7 +64,7 @@ CTLP_INIT(plugin, callbacks)
return 0;
}
- if(! (ctrlConfig = (CtlConfigT *) afb_dynapi_get_userdata(plugin->api))) {
+ if(! (ctrlConfig = (CtlConfigT *) AFB_ApiGetUserData(plugin->api))) {
AFB_ApiError(plugin->api, "Can't get current hal controller config");
return -1;
}
@@ -232,57 +232,62 @@ CTLP_CAPI(init, source, argsJ, queryJ)
AFB_ApiInfo(source->api, "Controller onload initialization of %s plugin", HAL_BT_PLUGIN_NAME);
// Loading hal BT plugin specific verbs
- if(afb_dynapi_add_verb(source->api,
- HAL_BT_GET_STREAMING_STATUS_VERB,
- "Get Bluetooth streaming status",
- HalBtGetStreamingStatus,
- (void *) &localHalBtPluginData,
- NULL,
- 0)) {
+ if(AFB_ApiAddVerb(source->api,
+ HAL_BT_GET_STREAMING_STATUS_VERB,
+ "Get Bluetooth streaming status",
+ HalBtGetStreamingStatus,
+ (void *) &localHalBtPluginData,
+ NULL,
+ 0,
+ 0)) {
AFB_ApiError(source->api, "Error while creating verb for bluetooth plugin : '%s'", HAL_BT_GET_STREAMING_STATUS_VERB);
return -1;
}
- if(afb_dynapi_add_verb(source->api,
- HAL_BT_SET_STREAMING_STATUS_VERB,
- "Set Bluetooth streaming status",
- HalBtSetStreamingStatus,
- (void *) &localHalBtPluginData,
- NULL,
- 0)) {
+ if(AFB_ApiAddVerb(source->api,
+ HAL_BT_SET_STREAMING_STATUS_VERB,
+ "Set Bluetooth streaming status",
+ HalBtSetStreamingStatus,
+ (void *) &localHalBtPluginData,
+ NULL,
+ 0,
+ 0)) {
AFB_ApiError(source->api, "Error while creating verb for bluetooth plugin : '%s'", HAL_BT_SET_STREAMING_STATUS_VERB);
return -2;
}
- if(afb_dynapi_add_verb(source->api,
- HAL_BT_GET_CONNECTED_A2DP_DEVICES_VERB,
- "Get connected Bluetooth A2DP devices list",
- HalBtGetA2DPBluetoothDevices,
- (void *) &localHalBtPluginData,
- NULL,
- 0)) {
+ if(AFB_ApiAddVerb(source->api,
+ HAL_BT_GET_CONNECTED_A2DP_DEVICES_VERB,
+ "Get connected Bluetooth A2DP devices list",
+ HalBtGetA2DPBluetoothDevices,
+ (void *) &localHalBtPluginData,
+ NULL,
+ 0,
+ 0)) {
AFB_ApiError(source->api, "Error while creating verb for bluetooth plugin : '%s'", HAL_BT_GET_CONNECTED_A2DP_DEVICES_VERB);
return -3;
}
- if(afb_dynapi_add_verb(source->api,
- HAL_BT_GET_SELECTED_A2DP_DEVICE_VERB,
- "Get selected Bluetooth A2DP device",
- HalBtGetSelectedA2DPBluetoothDevice,
- (void *) &localHalBtPluginData,
- NULL,
- 0)) {
+ if(AFB_ApiAddVerb(source->api,
+ HAL_BT_GET_SELECTED_A2DP_DEVICE_VERB,
+ "Get selected Bluetooth A2DP device",
+ HalBtGetSelectedA2DPBluetoothDevice,
+ (void *) &localHalBtPluginData,
+ NULL,
+ 0,
+ 0)) {
AFB_ApiError(source->api, "Error while creating verb for bluetooth plugin : '%s'", HAL_BT_GET_SELECTED_A2DP_DEVICE_VERB);
return -4;
}
- if(afb_dynapi_add_verb(source->api,
- HAL_BT_SET_SELECTED_A2DP_DEVICE_VERB,
- "Set selected Bluetooth A2DP device",
- HalBtSetSelectedA2DPBluetoothDevice,
- (void *) &localHalBtPluginData,
- NULL,
- 0)) {
+ if(AFB_ApiAddVerb(source->api,
+ HAL_BT_SET_SELECTED_A2DP_DEVICE_VERB,
+ "Set selected Bluetooth A2DP device",
+ HalBtSetSelectedA2DPBluetoothDevice,
+ (void *) &localHalBtPluginData,
+ NULL,
+ 0,
+ 0)) {
AFB_ApiError(source->api, "Error while creating verb for bluetooth plugin : '%s'", HAL_BT_SET_SELECTED_A2DP_DEVICE_VERB);
return -5;
}