From owner-freebsd-bluetooth@FreeBSD.ORG Thu Mar 5 20:15:26 2009 Return-Path: Delivered-To: freebsd-bluetooth@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 512791065670 for ; Thu, 5 Mar 2009 20:15:26 +0000 (UTC) (envelope-from plunky@rya-online.net) Received: from smtp01.one2one.net (smtp01.one2one.net [149.254.200.196]) by mx1.freebsd.org (Postfix) with ESMTP id DA3848FC0C for ; Thu, 5 Mar 2009 20:15:25 +0000 (UTC) (envelope-from plunky@rya-online.net) Received: from [127.0.0.1] (helo=localhost) by smtpbarns01 with esmtp (Exim 4.50) id 1LfJyS-0006ov-P7; Thu, 05 Mar 2009 20:15:20 +0000 Received: from smtpbarns01 ([127.0.0.1]) by localhost (smtpbarns01 [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 26163-02; Thu, 5 Mar 2009 20:15:20 +0000 (GMT) Received: from [10.35.201.38] (helo=rya-online.net) by smtpbarns01 with smtp (Exim 4.50) id 1LfJyP-0006ok-Oj; Thu, 05 Mar 2009 20:15:20 +0000 Received: (nullmailer pid 792 invoked by uid 1000); Thu, 05 Mar 2009 20:14:55 -0000 Date: Thu, 5 Mar 2009 20:14:55 +0000 (GMT) To: Maksim Yevmenkin In-Reply-To: References: <1233365217.00068654.1233354838@10.7.7.3> <4988EBAC.3080202@mavhome.dp.ua> <1233758519.360141.162.nullmailer@galant.ukfsn.org> <1233845167.798942.24919.nullmailer@galant.ukfsn.org> <1233919880.530235.10843.nullmailer@galant.ukfsn.org> <1234605178.990729.799.nullmailer@galant.ukfsn.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Message-Id: <1236284095.692711.620.nullmailer@galant.ukfsn.org> From: Iain Hibbert X-Virus-Scanned: by amavisd-new-20030616-p10 (Debian) at example.com X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: plunky@rya-online.net X-SA-Exim-Scanned: No (on smtpbarns01); SAEximRunCond expanded to false Cc: "freebsd-bluetooth@freebsd.org" Subject: Re: libhci X-BeenThere: freebsd-bluetooth@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using Bluetooth in FreeBSD environments List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Mar 2009 20:15:26 -0000 On Thu, 5 Mar 2009, Maksim Yevmenkin wrote: > [v2] seems fine, some documentation comments +The +.Fn bt_devenum +function enumerates up to +.Dv HCI_DEVMAX +Bluetooth devices present in the system. This should not be in the function API but in a CAVEATS or BUGS section as its implementation dependent :) +The +.Fn bt_devenum +uses the same socket for the duration of enumeration. Likewise I don't think this should be part of the specification as some implementations might not be able to reuse the socket. Perhaps just say that the socket handle provided will only be valid during the callback to make sure that the callback doesn't store it? (can put it in CAVEATS section that it is reused if you like?) +The function guarantees that the socket, +passed to the callback function, +will be bound and connected to the Bluetooth device being enumerated. +The function returns number of successfully enumerated devices, +otherwise -1. can we say 'or -1 if an error occurred', as I think it could be valid to successfully enumerate 0 devices..? +#define HCI_DEVFEATURES_SIZE NG_HCI_FEATURES_SIZE when I ported the include files I just chopped off the NG_, is there any gain in having another definition? + uint32_t state; I guess state is impementation dependent? (some kind of device flags not mentioned here?) + uint8_t _padding[20]; /* make it 128 bytes in size */ that comment shoud be 'leave space for future additions' rather than specifying the size as some platforms won't actually be that size anyway.. regards, iain