1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
6 namespace webcamPrivate
{
7 enum PanDirection
{ stop
, right
, left
};
8 enum TiltDirection
{ stop
, up
, down
};
9 enum Protocol
{ visca
};
11 dictionary ProtocolConfiguration
{
15 dictionary WebcamConfiguration
{
17 PanDirection? panDirection
;
19 TiltDirection? tiltDirection
;
23 callback WebcamIdCallback
= void(DOMString webcamId
);
24 callback WebcamConfigurationCallback
=
25 void(WebcamConfiguration configuration
);
28 // Open a serial port that controls a webcam.
29 static
void openSerialWebcam
(DOMString path
, ProtocolConfiguration protocol
,
30 WebcamIdCallback
callback);
32 // Close a serial port connection to a webcam.
33 static
void closeWebcam
(DOMString webcamId
);
35 static
void get
(DOMString webcamId
, WebcamConfigurationCallback
callback);
36 static
void set
(DOMString webcamId
, WebcamConfiguration config
);
37 static
void reset
(DOMString webcamId
, WebcamConfiguration config
);