Date: Thu, 5 Mar 2009 20:14:55 +0000 (GMT) From: Iain Hibbert <plunky@rya-online.net> To: Maksim Yevmenkin <maksim.yevmenkin@gmail.com> Cc: "freebsd-bluetooth@freebsd.org" <freebsd-bluetooth@freebsd.org> Subject: Re: libhci Message-ID: <1236284095.692711.620.nullmailer@galant.ukfsn.org> In-Reply-To: <bb4a86c70903051103q8937592sb117db281b20705f@mail.gmail.com> References: <1233365217.00068654.1233354838@10.7.7.3> <4988EBAC.3080202@mavhome.dp.ua> <bb4a86c70902031731q83bf261s49e5812a3c208f81@mail.gmail.com> <1233758519.360141.162.nullmailer@galant.ukfsn.org> <bb4a86c70902041000t26ad9b66q94a32ff37cfb7f4b@mail.gmail.com> <1233845167.798942.24919.nullmailer@galant.ukfsn.org> <bb4a86c70902051001j53f52e3dhb2e80e393b936f16@mail.gmail.com> <1233919880.530235.10843.nullmailer@galant.ukfsn.org> <bb4a86c70902131717o2ccc1fd2nd73f84b1a7765152@mail.gmail.com> <1234605178.990729.799.nullmailer@galant.ukfsn.org> <bb4a86c70903051103q8937592sb117db281b20705f@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1236284095.692711.620.nullmailer>
