W3C home > Mailing lists > Public > public-device-apis@w3.org > November 2011

Re: Vibrator API: extract from Navigator

From: Justin Lebar <justin.lebar@gmail.com>
Date: Tue, 8 Nov 2011 09:12:26 -0500
Message-ID: <CAFWcpZ47P2xv=uwXUq6P3gZeSQ6FFEDBg_b3x=3w-XqViu7h3A@mail.gmail.com>
To: Anssi Kostiainen <anssi.kostiainen@nokia.com>
Cc: "public-device-apis@w3.org WG" <public-device-apis@w3.org>
> partial interface Vibration {

But now it's no longer a partial interface, right?

On Tue, Nov 8, 2011 at 6:23 AM, Anssi Kostiainen
<anssi.kostiainen@nokia.com> wrote:
> Hi,
>
> On 8.11.2011, at 10.37, ext Dave Raggett wrote:
>
>> On 07/11/11 21:44, Justin Lebar wrote:
>>>> Having a Vibrator interface, which then Gamepad and Navigator implement,
>>>> hence being reusable.
>>>>
>>>> So we then get navigator.vibrate() and gamepad.vibrate(). Same API, same
>>>> behavior.
>>
>> Isn't this just a matter of replacing "Navigator" below with a more appropriate name, e.g. "Vibrator" and then specifying that the navigator object implements the Vibrator interface, e.g. as navigator.vibrate(1000);
>>
>> partial interfaceNavigator  {
>>    void  vibrate  <http://dev.w3.org/2009/dap/vibration/#widl-Navigator-vibrate-void-long-time>  (optionallong  time);
>>    void  vibrate  <http://dev.w3.org/2009/dap/vibration/#widl-Navigator-vibrate-void-longArray-pattern>  (optionallong[]  pattern);
>> };
>
> Yes. Here's the new IDL which should address João's reusability concerns:
>
> Navigator implements Vibration;
>
> partial interface Vibration {
>    void vibrate (optional long time);
>    void vibrate (optional long[] pattern);
> };
>
> I updated the Editor's Draft accordingly. Let me know if there are any concerns with this change.
>
> -Anssi
>
Received on Wednesday, 9 November 2011 08:30:25 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 9 May 2012 00:14:24 GMT