summaryrefslogtreecommitdiff
path: root/android/map-client.c
diff options
context:
space:
mode:
authorGrzegorz Kolodziejczyk <grzegorz.kolodziejczyk@tieto.com>2014-10-15 16:27:58 +0200
committerSzymon Janc <szymon.janc@tieto.com>2014-10-20 14:40:39 +0200
commitcd1187e90baf9a01f6c8016fc2ac3a42efba3cd0 (patch)
tree1d30d97cee3cc98727c95e83320852b5b42d9dac /android/map-client.c
parent8d42d400759c7ce9033bbc96552ad5a14bbf06e1 (diff)
downloadbluez-cd1187e90baf9a01f6c8016fc2ac3a42efba3cd0.tar.gz
android/map-client: Add stubs for MAP client commands handlers
Add empty handlers for MAP client IPC commands.
Diffstat (limited to 'android/map-client.c')
-rw-r--r--android/map-client.c34
1 files changed, 33 insertions, 1 deletions
diff --git a/android/map-client.c b/android/map-client.c
index 455646166..142c6809a 100644
--- a/android/map-client.c
+++ b/android/map-client.c
@@ -28,17 +28,49 @@
#include <stdbool.h>
#include <stdlib.h>
#include <stdint.h>
+#include <glib.h>
#include "ipc.h"
#include "lib/bluetooth.h"
#include "map-client.h"
+#include "src/log.h"
+#include "hal-msg.h"
+
+static struct ipc *hal_ipc = NULL;
+static bdaddr_t adapter_addr;
+
+static void handle_get_instances(const void *buf, uint16_t len)
+{
+ DBG("");
+
+ ipc_send_rsp(hal_ipc, HAL_SERVICE_ID_MAP_CLIENT,
+ HAL_OP_MAP_CLIENT_GET_INSTANCES, HAL_STATUS_FAILED);
+}
+
+static const struct ipc_handler cmd_handlers[] = {
+ /* HAL_OP_MAP_CLIENT_GET_INSTANCES */
+ { handle_get_instances, false,
+ sizeof(struct hal_cmd_map_client_get_instances) },
+};
bool bt_map_client_register(struct ipc *ipc, const bdaddr_t *addr, uint8_t mode)
{
- return false;
+ DBG("");
+
+ bacpy(&adapter_addr, addr);
+
+ hal_ipc = ipc;
+
+ ipc_register(hal_ipc, HAL_SERVICE_ID_MAP_CLIENT, cmd_handlers,
+ G_N_ELEMENTS(cmd_handlers));
+
+ return true;
}
void bt_map_client_unregister(void)
{
+ DBG("");
+ ipc_unregister(hal_ipc, HAL_SERVICE_ID_MAP_CLIENT);
+ hal_ipc = NULL;
}