linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Szymon Janc <szymon.janc@gmail.com>
To: Grzegorz Kolodziejczyk <grzegorz.kolodziejczyk@tieto.com>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH 02/10] android/map-client: Add stubs for MAP client commands handlers
Date: Mon, 13 Oct 2014 21:58:13 +0200	[thread overview]
Message-ID: <1797034.Wjt854TcTE@athlon> (raw)
In-Reply-To: <1412858714-2845-3-git-send-email-grzegorz.kolodziejczyk@tieto.com>

Hi Grzegorz,

On Thursday 09 October 2014 14:45:06 Grzegorz Kolodziejczyk wrote:
> Add empty handlers for MAP client IPC commands.
> ---
>  android/map-client.c | 33 ++++++++++++++++++++++++++++++++-
>  1 file changed, 32 insertions(+), 1 deletion(-)
> 
> diff --git a/android/map-client.c b/android/map-client.c
> index 4556461..1001b36 100644
> --- a/android/map-client.c
> +++ b/android/map-client.c
> @@ -28,17 +28,48 @@
>  #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[] = {
> +	{handle_get_instances, false,
> +			sizeof(struct hal_cmd_map_client_get_instances)},

Style issue: there should be spaces after { and before }.
Also please add comment about define type just like in other handlers (I'm 
aware that there is just 1 handler here but lets be consistent).

> +};
> 
>  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;
>  }

-- 
Szymon K. Janc
szymon.janc@gmail.com

  reply	other threads:[~2014-10-13 19:58 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-09 12:45 [PATCH 00/10] android/map-client: Add MAP client daemon implementation Grzegorz Kolodziejczyk
2014-10-09 12:45 ` [PATCH 01/10] android/map-client: Add initial files Grzegorz Kolodziejczyk
2014-10-09 12:45 ` [PATCH 02/10] android/map-client: Add stubs for MAP client commands handlers Grzegorz Kolodziejczyk
2014-10-13 19:58   ` Szymon Janc [this message]
2014-10-14  8:58     ` Grzegorz Kolodziejczyk
2014-10-09 12:45 ` [PATCH 03/10] android/map-client: Add support for get remote MAS instances Grzegorz Kolodziejczyk
2014-10-13 20:19   ` Szymon Janc
2014-10-14  9:01     ` Grzegorz Kolodziejczyk
2014-10-09 12:45 ` [PATCH 04/10] android/ipc-tester: Add missing service opcode boundries test cases Grzegorz Kolodziejczyk
2014-10-13 20:32   ` Szymon Janc
2014-10-14  9:02     ` Grzegorz Kolodziejczyk
2014-10-09 12:45 ` [PATCH 05/10] android/ipc-tester: Add case for MAP client service opcode boundries Grzegorz Kolodziejczyk
2014-10-09 12:45 ` [PATCH 06/10] android/ipc-tester: Add cases for MAP client msg size Grzegorz Kolodziejczyk
2014-10-09 12:45 ` [PATCH 07/10] android/client: Add skeleton for mce calls Grzegorz Kolodziejczyk
2014-10-09 12:45 ` [PATCH 08/10] android/client: Add code for mce callback Grzegorz Kolodziejczyk
2014-10-09 12:45 ` [PATCH 09/10] android/client: Add code for mce method Grzegorz Kolodziejczyk
2014-10-09 12:45 ` [PATCH 10/10] android/client: Add completion " Grzegorz Kolodziejczyk
2014-10-13 20:47 ` [PATCH 00/10] android/map-client: Add MAP client daemon implementation Szymon Janc

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1797034.Wjt854TcTE@athlon \
    --to=szymon.janc@gmail.com \
    --cc=grzegorz.kolodziejczyk@tieto.com \
    --cc=linux-bluetooth@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).