Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp4651537iob; Sun, 8 May 2022 20:39:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJydGoutEbqxggMECBrkEeBiREU4J1KuwY077qeVWQ4YMAtOhvjq/z1X5xsxC5Q6YlAhlY1e X-Received: by 2002:a17:90b:1d83:b0:1dc:4362:61bd with SMTP id pf3-20020a17090b1d8300b001dc436261bdmr24266942pjb.126.1652067543039; Sun, 08 May 2022 20:39:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652067543; cv=none; d=google.com; s=arc-20160816; b=hG/x1XJyDlwyItNLnwTLApz+/nxxLupp/bMztLfLG/uqGZAxYcjS7Ky4+LmLiwENBt hJNX17f1yTLt7cKbpaQCiWHYoL7TEB6KEgYojid0kHQxyPXc4euV0fHXF+HJwn0Bpmb4 RIF59uBzvgprYRu5wVLXCUHwVaRVqnXGGzqko2qihNVHFv7mo63+Ua+7gR/wM8XGtAnY xZClc+LhOynRFRA/T4aqimtP8baL+Jw5CF/aNCgVUMRyCGBjO4ov0orZE3yUjJgpe6Ai y/fSE19kpoqAOB+KxdQ5klRQVrofWAeC+OM7rSLBk1pwu/8BnIiMQ/W34Ah7lugSwQoX DD6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=3PENCAX1FrS0t7CtTF0v18ZKj8TqqyTZuIXGTxRioV0=; b=XDgQZinZ8SOldsYxcIB+M0Bjf/GUZWfqCulKTzYw4KfXdUhOZ5w/DHd+TqFIGquI6y 22wdR28AXAj22WrpItsX2wPa0xKsgdzW4Ur16J2M9P09hYnab5LiHOzzmFNp7ewZKG7k dxAvBEeJtKooHF5FW5QCrgVpG8b0185PSZkjwm4AyUxPIq6m8Cw3oYSXVNa0RS+hkn/P oDcvd+g5MU/bAxGohGt0KAG3YU9YoINaliBidXUZL7gIzVJfF5kFtCxNw2/nP5pKJZmP g2BxYKOc/Y6STX6NnVD/178q+JaxQeM3M0Aow3Z98oPh0CZS/1/WK7qI62uju+4cw/WO 1DLQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=HC323SE6; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id w1-20020a6556c1000000b003c17253e66asi11322912pgs.829.2022.05.08.20.39.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 08 May 2022 20:39:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=HC323SE6; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 70849AD103; Sun, 8 May 2022 20:38:51 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230437AbiEDVxR (ORCPT + 99 others); Wed, 4 May 2022 17:53:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44748 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230087AbiEDVxQ (ORCPT ); Wed, 4 May 2022 17:53:16 -0400 Received: from mail-pj1-x1029.google.com (mail-pj1-x1029.google.com [IPv6:2607:f8b0:4864:20::1029]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D66C750B36 for ; Wed, 4 May 2022 14:49:39 -0700 (PDT) Received: by mail-pj1-x1029.google.com with SMTP id cq17-20020a17090af99100b001dc0386cd8fso2381154pjb.5 for ; Wed, 04 May 2022 14:49:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=3PENCAX1FrS0t7CtTF0v18ZKj8TqqyTZuIXGTxRioV0=; b=HC323SE6jXcILDLraSWgsO6U0ZVBO+ByOLiPryt7UCuyc64mZqp5O4t2LdTcfqJfb4 dAvREkBo6zGzgN3pjRMYbpEFBRfzZGMZVS7aoqNZa+9idZbmruiP2EWjUy52YZc/jlxd LwDQqiuXgFrAexonz7mAO8uRQKmoseKkaRNCyJih+1MdTVmoZ3/rlodVW4lNAodbvbRC 5hsUnxIdLRFkCXPJ49QsLamM4IFUWN3r0ZarPIFrSFUPsahwRUhKREGmZy9t+VCkloW1 +wl4tnw/Sbe8gugURGfvxUK9HDtTiZTa1ysdNLoOOkiSdTCzb0a9nON65urXYEni7g6+ t/Xw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=3PENCAX1FrS0t7CtTF0v18ZKj8TqqyTZuIXGTxRioV0=; b=WXZvDg1XNrfj1uCXgW92IYsnZjL3MwxEcW79tIAMWCs1PcFamiCdDX9kJ0W8lddmA4 XUkgLdPS49dCEtuSpLVQmtoXaJP/t+s6cnCYhfOrMFDQngMj2orSpiiSKgkJg92IUNBz gGvaEi0q81G5r5Cl1aYmHRdj89CBDqvJVUkVEi0FyoOQTOe9Y97XxLfTeSbSrz9FSPv+ 1NbPW2zPbJJnCeDDzOfhhlVcTksU/LcBWVyPSPmTRnDANfjxBIiAFJa5zliuMragzrQN Z2u4TTk6Rsy2Bpg5JLvCtkkwYKBSxd9ojZxzw7+oSaVT9UR4qW9Mdc+yg3hw8rNJ6QSD fvDQ== X-Gm-Message-State: AOAM531hr2FT6oAAZvrV2GL59AxOPGQE4yiU5Idwi8fxwg9JChfGadSx h439C0/u8D0s6Tjfpb9Sc+CM/+YihIXq9WhQ5PE= X-Received: by 2002:a17:902:da8b:b0:15e:c0e8:d846 with SMTP id j11-20020a170902da8b00b0015ec0e8d846mr7169164plx.34.1651700979360; Wed, 04 May 2022 14:49:39 -0700 (PDT) MIME-Version: 1.0 References: <20220504210948.2968827-1-jiangzp@google.com> In-Reply-To: <20220504210948.2968827-1-jiangzp@google.com> From: Luiz Augusto von Dentz Date: Wed, 4 May 2022 14:49:27 -0700 Message-ID: Subject: Re: [Bluez PATCH v3 0/3] Adding bonded flag to D-Bus property To: Zhengping Jiang Cc: "linux-bluetooth@vger.kernel.org" , ChromeOS Bluetooth Upstreaming Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Hi Zhengping, On Wed, May 4, 2022 at 2:09 PM Zhengping Jiang wrote: > > Currently BlueZ client can't know easily whether a device is bonded or > not. This is causing issues for a number of applications. For example, > in the Nearby Share case, the peer device is paired, but not bonded. > This series will add the "Bonded" property in org.bluez.Device1 D-Bus > interface. Changes are also made in bluetoothctl to show the status of > the bonded flag as well as a list of bonded devices. > > Changes in v3: > - Move documentation update to a separate patch > - Add description to bonded and paired > - Add an optional argument to the devices command to filter device list > - Remove paired-devices command > > Changes in v2: > - Move one variable declaration to the top following C90 standard > > Changes in v1: > - Add "Bonded" to D-Bus interface > - Send property changed signal if the bonded flag is changed > - Show the status of the "Bonded" flag in bluetoothctl > - Add option to show list of bonded devices > > Zhengping Jiang (3): > device: Add "Bonded" flag to dbus property > doc: add "Bonded" flag to dbus property > client: Add filter to devices and show Bonded in info > > client/main.c | 72 ++++++++++++++++++++++++++++++---------------- > doc/device-api.txt | 12 +++++++- > src/device.c | 38 ++++++++++++++++++++---- > 3 files changed, 91 insertions(+), 31 deletions(-) > > -- > 2.36.0.464.gb9c8b46e94-goog src/device.c: In function =E2=80=98device_set_bonded=E2=80=99: src/device.c:6141:9: error: ISO C90 forbids mixed declarations and code [-Werror=3Ddeclaration-after-statement] 6141 | struct bearer_state *state =3D get_state(device, bdaddr_typ= e); | --=20 Luiz Augusto von Dentz