1/*
2 * Copyright (C) 2014 Igalia S.L
3 * Copyright (C) 2016 Apple Inc. All rights reserved.
4 *
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version.
9 *
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18 */
19
20#ifndef WKUserMediaPermissionRequest_h
21#define WKUserMediaPermissionRequest_h
22
23#include <WebKit/WKBase.h>
24
25#ifdef __cplusplus
26extern "C" {
27#endif
28
29WK_EXPORT WKTypeID WKUserMediaPermissionRequestGetTypeID();
30
31enum {
32 kWKNoConstraints = 0,
33 kWKUserMediaDisabled,
34 kWKNoCaptureDevices,
35 kWKInvalidConstraint,
36 kWKHardwareError,
37 kWKPermissionDenied,
38 kWKOtherFailure
39};
40typedef uint32_t UserMediaPermissionRequestDenialReason;
41
42WK_EXPORT void WKUserMediaPermissionRequestAllow(WKUserMediaPermissionRequestRef, WKStringRef audioDeviceUID, WKStringRef videoDeviceUID);
43WK_EXPORT void WKUserMediaPermissionRequestDeny(WKUserMediaPermissionRequestRef, UserMediaPermissionRequestDenialReason);
44
45WK_EXPORT WKArrayRef WKUserMediaPermissionRequestVideoDeviceUIDs(WKUserMediaPermissionRequestRef);
46WK_EXPORT WKArrayRef WKUserMediaPermissionRequestAudioDeviceUIDs(WKUserMediaPermissionRequestRef);
47
48#ifdef __cplusplus
49}
50#endif
51
52#endif /* WKUserMediaPermissionRequest_h */
53