Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(88)

Side by Side Diff: extensions/common/api/networking_cast.idl

Issue 2726223004: Introduce networking.cast API (Closed)
Patch Set: . Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2017 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.
4
5 // The networking.cast API is a private API that exposes networking utilities
6 // needed by cast extension and setup app.
7 [nodoc] namespace networking.cast {
Devlin 2017/03/13 05:21:49 Does this belong at the //extensions level instead
tbarzic 2017/03/13 22:35:01 Hm, yeah, I guess we could move it to //chrome ins
8 enum TDLSStatus {
9 // TDLS is connected.
10 Connected,
Devlin 2017/03/13 05:21:49 If items have to migrate over anyway, make these S
tbarzic 2017/03/13 22:35:01 Done.
11 // TDLS is not supported.
12 Nonexistent,
13 // TDLS is supported, but disabled.
14 Disabled,
15 // TDLS is enabled, but not connected
16 Disconnected,
17 // TDLS status is not yet determined.
18 Unknown
19 };
20
21 dictionary VerificationProperties {
22 // A string containing a PEM-encoded (including the 'BEGIN CERTIFICATE'
23 // header and 'END CERTIFICATE' footer) X.509 certificate for use in
24 // verifying the signed data.
25 DOMString certificate;
26
27 // An array of PEM-encoded X.509 intermediate certificate authority
28 // certificates. Each PEM-encoded certificate is expected to have the
29 // 'BEGIN CERTIFICATE' header and 'END CERTIFICATE' footer.
30 DOMString[]? intermediateCertificates;
31
32 // A string containing a base64-encoded RSAPublicKey ASN.1 structure,
33 // representing the public key to be used by
34 // $(ref:verifyAndEncryptCredentials) and $(ref:verifyAndEncryptData)
35 // methods.
36 DOMString publicKey;
37
38 // A string containing a base64-encoded random binary data for use in
39 // verifying the signed data.
40 DOMString nonce;
41
42 // A string containing the identifying data string signed by the device.
43 DOMString signedData;
44
45 // A string containing the serial number of the device.
46 DOMString deviceSerial;
47
48 // A string containing the SSID of the device. Should be empty for new
49 // configurations.
50 DOMString deviceSsid;
51
52 // A string containing the BSSID of the device. Should be empty for new
53 // configurations.
54 DOMString deviceBssid;
55 };
56
57 callback BooleanCallback = void(boolean result);
58 callback StringCallback = void(DOMString result);
59 callback TDLSStatusCallback = void(TDLSStatus status);
60
61 interface Functions {
62 // Verifies that the device is a trusted device.
63 // |properties|: Properties of the destination to use in verifying that it
64 // is a trusted device.
65 // |callback|: A callback function that indicates whether or not the device
66 // is a trusted device.
67 static void verifyDestination(VerificationProperties properties,
68 BooleanCallback callback);
69
70 // Verifies that the device is a trusted device and retrieves encrypted
71 // network credentials.
72 // |properties|: Properties of the destination to use in verifying that it
73 // is a trusted device.
74 // |networkGuid|: The GUID of the Cellular network to activate.
75 // |callback|: A callback function that receives base64-encoded encrypted
76 // credential data to send to a trusted device.
77 static void verifyAndEncryptCredentials(VerificationProperties properties,
78 DOMString networkGuid,
79 StringCallback callback);
80
81 // Verifies that the device is a trusted device and encrypts supplied
82 // data with device public key.
83 // |properties|: Properties of the destination to use in verifying that it
84 // is a trusted device.
85 // |data|: A string containing the base64-encoded data to encrypt.
86 // |callback|: A callback function that receives base64-encoded encrypted
87 // data to send to a trusted device.
88 static void verifyAndEncryptData(VerificationProperties properties,
89 DOMString data,
90 StringCallback callback);
91
92 // Enables TDLS for WiFi traffic with a specified peer if available.
93 // |ip_or_mac_address|: The IP or MAC address of the peer with which to
94 // enable a TDLS connection.
95 // |enabled| If true, enable TDLS, otherwise disable TDLS.
Devlin 2017/03/13 05:21:49 nit: |enabled|: - missing ':'
tbarzic 2017/03/13 22:35:01 Done.
96 // |callback|: A callback function that receives a string with an error or
97 // the current TDLS status.
98 static void setWifiTDLSEnabledState(DOMString ip_or_mac_address,
99 boolean enabled,
100 optional TDLSStatusCallback callback);
101
102 // Returns the current TDLS status for the specified peer.
103 // |ip_or_mac_address|: The IP or MAC address of the peer.
104 // |callback|: A callback function that receives a string with the current
105 // TDLS status.
106 static void getWifiTDLSStatus(DOMString ip_or_mac_address,
107 TDLSStatusCallback callback);
108 };
109 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698