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

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

Issue 2791813002: Add documentation for networking.onc API (Closed)
Patch Set: . Created 3 years, 8 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
« no previous file with comments | « chrome/common/extensions/docs/templates/public/apps/networking_onc.html ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 // <p>
6 // The <code>chrome.networking.onc</code> API is used for configuring
7 // network connections (Cellular, Ethernet, VPN, WiFi or WiMAX).
8 // This API is available in Chrome OS kiosk sessions. Additionally, the API is
9 // available in regular user session, but only to a white-listed set of
Devlin 2017/04/12 22:13:03 I'd just remove the part about whitelisted apps.
stevenjb 2017/04/12 22:42:01 sgtm
tbarzic 2017/04/12 23:46:59 Done.
10 // trusted apps and extensions.
11 // </p>
12 // <p>
13 // Network connection configurations are specified following
14 // <a href="https://chromium.googlesource.com/chromium/src/+/master/components /onc/docs/onc_spec.md">
15 // Open Network Configuration (ONC)</a> specification.
16 // </p>
17 // <p>
18 // <b>NOTE</b>: Most dictionary properties and enum values use UpperCamelCase
19 // to match the ONC specification instead of the JavaScript lowerCamelCase
20 // convention.
21 // </p>
22 namespace networking.onc {
23 enum ActivationStateType {
24 Activated, Activating, NotActivated, PartiallyActivated
25 };
26
27 enum CaptivePortalStatus {
28 Unknown, Offline, Online, Portal, ProxyAuthRequired
29 };
30
31 enum ConnectionStateType {
32 Connected, Connecting, NotConnected
33 };
34
35 enum DeviceStateType {
36 // Device is available but not initialized.
37 Uninitialized,
38 // Device is initialized but not enabled.
39 Disabled,
40 // Enabled state has been requested but has not completed.
41 Enabling,
42 // Device is enabled.
43 Enabled,
44 // Device is prohibited.
45 Prohibited
46 };
47
48 enum IPConfigType {
49 DHCP, Static
50 };
51
52 enum NetworkType {
53 All, Cellular, Ethernet, VPN, Wireless, WiFi, WiMAX
54 };
55
56 enum ProxySettingsType {
57 Direct, Manual, PAC, WPAD
58 };
59
60 enum ClientCertificateType {
61 Ref, Pattern
62 };
63
64 dictionary ManagedBoolean {
65 // The active value currently used by the network configuration manager
66 // (e.g. Shill).
67 boolean? Active;
68 // The source from which the effective property value was determined.
69 DOMString? Effective;
70 // The property value provided by the user policy.
71 boolean? UserPolicy;
72 // The property value provided by the device policy.
73 boolean? DevicePolicy;
74 // The property value set by the logged in user. Only provided if
75 // |UserEditable| is <code>true</code>.
76 boolean? UserSetting;
77 // The value set for all users of the device. Only provided if
78 // |DeviceEditiable| is <code>true</code>.
79 boolean? SharedSetting;
80 // Whether a UserPolicy for the property exists and allows the property to
81 // be edited (i.e. the policy set recommended property value).
82 // Defaults to <code>false</code>.
83 boolean? UserEditable;
84 // Whether a DevicePolicy for the property exists and allows the property to
85 // be edited (i.e. the policy set recommended property value).
86 // Defaults to <code>false</code>.
87 boolean? DeviceEditable;
88 };
89
90 dictionary ManagedLong {
91 // The active value currently used by the network configuration manager
92 // (e.g. Shill).
93 long? Active;
94 // The source from which the effective property value was determined.
95 DOMString? Effective;
96 // The property value provided by the user policy.
97 long? UserPolicy;
98 // The property value provided by the device policy.
99 long? DevicePolicy;
100 // The property value set by the logged in user. Only provided if
101 // |UserEditable| is <code>true</code>.
102 long? UserSetting;
103 // The value set for all users of the device. Only provided if
104 // |DeviceEditiable| is <code>true</code>.
105 long? SharedSetting;
106 // Whether a UserPolicy for the property exists and allows the property to
107 // be edited (i.e. the policy set recommended property value).
108 // Defaults to <code>false</code>.
109 boolean? UserEditable;
110 // Whether a DevicePolicy for the property exists and allows the property to
111 // be edited (i.e. the policy set recommended property value).
112 // Defaults to <code>false</code>.
113 boolean? DeviceEditable;
114 };
115
116 dictionary ManagedDOMString {
117 // The active value currently used by the network configuration manager
118 // (e.g. Shill).
119 DOMString? Active;
120 // The source from which the effective property value was determined.
121 DOMString? Effective;
122 // The property value provided by the user policy.
123 DOMString? UserPolicy;
124 // The property value provided by the device policy.
125 DOMString? DevicePolicy;
126 // The property value set by the logged in user. Only provided if
127 // |UserEditable| is <code>true</code>.
128 DOMString? UserSetting;
129 // The value set for all users of the device. Only provided if
130 // |DeviceEditiable| is <code>true</code>.
131 DOMString? SharedSetting;
132 // Whether a UserPolicy for the property exists and allows the property to
133 // be edited (i.e. the policy set recommended property value).
134 // Defaults to <code>false</code>.
135 boolean? UserEditable;
136 // Whether a DevicePolicy for the property exists and allows the property to
137 // be edited (i.e. the policy set recommended property value).
138 // Defaults to <code>false</code>.
139 boolean? DeviceEditable;
140 };
141
142 dictionary ManagedDOMStringList {
143 // The active value currently used by the network configuration manager
144 // (e.g. Shill).
145 DOMString[]? Active;
146 // The source from which the effective property value was determined.
147 DOMString? Effective;
148 // The property value provided by the user policy.
149 DOMString[]? UserPolicy;
150 // The property value provided by the device policy.
151 DOMString[]? DevicePolicy;
152 // The property value set by the logged in user. Only provided if
153 // |UserEditable| is <code>true</code>.
154 DOMString[]? UserSetting;
155 // The value set for all users of the device. Only provided if
156 // |DeviceEditiable| is <code>true</code>.
157 DOMString[]? SharedSetting;
158 // Whether a UserPolicy for the property exists and allows the property to
159 // be edited (i.e. the policy set recommended property value).
160 // Defaults to <code>false</code>.
161 boolean? UserEditable;
162 // Whether a DevicePolicy for the property exists and allows the property to
163 // be edited (i.e. the policy set recommended property value).
164 // Defaults to <code>false</code>.
165 boolean? DeviceEditable;
166 };
167
168 dictionary ManagedIPConfigType {
169 // The active value currently used by the network configuration manager
170 // (e.g. Shill).
171 IPConfigType? Active;
172 // The source from which the effective property value was determined.
173 DOMString? Effective;
174 // The property value provided by the user policy.
175 IPConfigType? UserPolicy;
176 // The property value provided by the device policy.
177 IPConfigType? DevicePolicy;
178 // The property value set by the logged in user. Only provided if
179 // |UserEditable| is <code>true</code>.
180 IPConfigType? UserSetting;
181 // The value set for all users of the device. Only provided if
182 // |DeviceEditiable| is <code>true</code>.
183 IPConfigType? SharedSetting;
184 // Whether a UserPolicy for the property exists and allows the property to
185 // be edited (i.e. the policy set recommended property value).
186 // Defaults to <code>false</code>.
187 boolean? UserEditable;
188 // Whether a DevicePolicy for the property exists and allows the property to
189 // be edited (i.e. the policy set recommended property value).
190 // Defaults to <code>false</code>.
191 boolean? DeviceEditable;
192 };
193
194 dictionary ManagedProxySettingsType {
195 // The active value currently used by the network configuration manager
196 // (e.g. Shill).
197 ProxySettingsType? Active;
198 // The source from which the effective property value was determined.
199 DOMString? Effective;
200 // The property value provided by the user policy.
201 ProxySettingsType? UserPolicy;
202 // The property value provided by the device policy.
203 ProxySettingsType? DevicePolicy;
204 // The property value set by the logged in user. Only provided if
205 // |UserEditable| is <code>true</code>.
206 ProxySettingsType? UserSetting;
207 // The value set for all users of the device. Only provided if
208 // |DeviceEditiable| is <code>true</code>.
209 ProxySettingsType? SharedSetting;
210 // Whether a UserPolicy for the property exists and allows the property to
211 // be edited (i.e. the policy set recommended property value).
212 // Defaults to <code>false</code>.
213 boolean? UserEditable;
214 // Whether a DevicePolicy for the property exists and allows the property to
215 // be edited (i.e. the policy set recommended property value).
216 // Defaults to <code>false</code>.
217 boolean? DeviceEditable;
218 };
219
220 // Sub-dictionary types.
221
222 [nodoc] dictionary APNProperties {
223 DOMString AccessPointName;
224 DOMString? Language;
225 DOMString? LocalizedName;
226 DOMString? Name;
227 DOMString? Password;
228 DOMString? Username;
229 };
230
231 [nodoc] dictionary ManagedAPNProperties {
232 ManagedDOMString AccessPointName;
233 ManagedDOMString? Language;
234 ManagedDOMString? LocalizedName;
235 ManagedDOMString? Name;
236 ManagedDOMString? Password;
237 ManagedDOMString? Username;
238 };
239
240 [nodoc] dictionary ManagedAPNList {
241 APNProperties[]? Active;
242 DOMString? Effective;
243 APNProperties[]? UserPolicy;
244 APNProperties[]? DevicePolicy;
245 APNProperties[]? UserSetting;
246 APNProperties[]? SharedSetting;
247 boolean? UserEditable;
248 boolean? DeviceEditable;
249 };
250
251 dictionary CellularProviderProperties {
252 // The operator name.
253 DOMString Name;
254 // Cellular network ID as a simple concatenation of the network's
255 // MCC (Mobile Country Code) and MNC (Mobile Network Code).
256 DOMString Code;
257 // The two-letter country code.
258 DOMString? Country;
259 };
260
261 [nodoc] dictionary CellularSimState {
262 // Whether or not a PIN should be required.
263 boolean requirePin;
264
265 // The current PIN (required for any change, even when the SIM is unlocked).
266 DOMString currentPin;
267
268 // If provided, change the PIN to |newPin|. |requirePin| must be true.
269 DOMString? newPin;
270 };
271
272 dictionary IssuerSubjectPattern {
273 // If set, the value against which to match the certificate subject's
274 // common name.
275 DOMString? CommonName;
276 // If set, the value against which to match the certificate subject's
277 // common location.
278 DOMString? Locality;
279 // If set, the value against which to match the certificate subject's
280 // organizations. At least one organization should match the value.
281 DOMString? Organization;
282 // If set, the value against which to match the certificate subject's
283 // organizational units. At least one organizational unit should match the
284 // value.
285 DOMString? OrganizationalUnit;
286 };
287
288 [nodoc] dictionary ManagedIssuerSubjectPattern {
289 ManagedDOMString? CommonName;
290 ManagedDOMString? Locality;
291 ManagedDOMString? Organization;
292 ManagedDOMString? OrganizationalUnit;
293 };
294
295 dictionary CertificatePattern {
296 // List of URIs to which the user can be directed in case no certificates
297 // that match this pattern are found.
298 DOMString[]? EnrollmentURI;
299 // If set, pattern against which X.509 issuer settings should be matched.
300 IssuerSubjectPattern? Issuer;
301 // List of certificate issuer CA certificates. A certificate must be signed
302 // by one of them in order to match this pattern.
303 DOMString[]? IssuerCARef;
304 // If set, pattern against which X.509 subject settings should be matched.
305 IssuerSubjectPattern? Subject;
306 };
307
308 [nodoc] dictionary ManagedCertificatePattern {
309 ManagedDOMStringList? EnrollmentURI;
310 ManagedIssuerSubjectPattern? Issuer;
311 ManagedDOMStringList? IssuerCARef;
312 ManagedIssuerSubjectPattern? Subject;
313 };
314
315 dictionary EAPProperties {
316 DOMString? AnonymousIdentity;
317 CertificatePattern? ClientCertPattern;
318 DOMString? ClientCertRef;
319 ClientCertificateType ClientCertType;
320 DOMString? Identity;
321 DOMString? Inner;
322 DOMString Outer;
323 DOMString? Password;
324 boolean? SaveCredentials;
325 DOMString[]? ServerCARefs;
326 boolean? UseProactiveKeyCaching;
327 boolean? UseSystemCAs;
328 };
329
330 [nodoc] dictionary ManagedEAPProperties {
331 ManagedDOMString? AnonymousIdentity;
332 ManagedCertificatePattern? ClientCertPattern;
333 ManagedDOMString? ClientCertRef;
334 ManagedDOMString? ClientCertType;
335 ManagedDOMString? Identity;
336 ManagedDOMString? Inner;
337 ManagedDOMString Outer;
338 ManagedDOMString? Password;
339 ManagedBoolean? SaveCredentials;
340 ManagedDOMStringList? ServerCARefs;
341 ManagedBoolean? UseProactiveKeyCaching;
342 ManagedBoolean? UseSystemCAs;
343 };
344
345 dictionary FoundNetworkProperties {
346 // Network availability.
347 DOMString Status;
348 // Network ID.
349 DOMString NetworkId;
350 // Access technology used by the network.
351 DOMString Technology;
352 // The network operator's short-format name.
353 DOMString? ShortName;
354 // The network operator's long-format name.
355 DOMString? LongName;
356 };
357
358 dictionary IPConfigProperties {
359 // Gateway address used for the IP configuration.
360 DOMString? Gateway;
361 // The IP address for a connection. Can be IPv4 or IPv6 address, depending
362 // on value of <code>Type</code>.
363 DOMString? IPAddress;
364 // Array of addresses used for name servers.
365 DOMString[]? NameServers;
366 // The routing prefix.
367 long? RoutingPrefix;
368 // The IP configuration type. Can be <code>IPv4</code> or <code>IPv6</code>.
369 DOMString? Type;
370 // The URL for WEb Proxy Auto-Discovery, as reported over DHCP.
371 DOMString? WebProxyAutoDiscoveryUrl;
372 };
373
374 dictionary ManagedIPConfigProperties {
375 // See $(ref:IPConfigProperties.Gateway).
376 ManagedDOMString? Gateway;
377 // See $(ref:IPConfigProperties.IPAddress).
378 ManagedDOMString? IPAddress;
379 // See $(ref:IPConfigProperties.NameServers).
380 ManagedDOMStringList? NameServers;
381 // See $(ref:IPConfigProperties.RoutingPrefix).
382 ManagedLong? RoutingPrefix;
383 // See $(ref:IPConfigProperties.Type).
384 ManagedDOMString? Type;
385 // See $(ref:IPConfigProperties.WebProxyAutoDiscoveryUrl).
386 ManagedDOMString? WebProxyAutoDiscoveryUrl;
387 };
388
389 [nodoc] dictionary XAUTHProperties {
390 DOMString? Password;
391 boolean? SaveCredentials;
392 DOMString? Username;
393 };
394
395 [nodoc] dictionary ManagedXAUTHProperties {
396 ManagedDOMString? Password;
397 ManagedBoolean? SaveCredentials;
398 ManagedDOMString? Username;
399 };
400
401 [nodoc] dictionary IPSecProperties {
402 DOMString AuthenticationType;
403 CertificatePattern? ClientCertPattern;
404 DOMString? ClientCertRef;
405 DOMString? ClientCertType;
406 EAPProperties? EAP;
407 DOMString? Group;
408 long? IKEVersion;
409 DOMString? PSK;
410 boolean? SaveCredentials;
411 DOMString[]? ServerCARefs;
412 XAUTHProperties? XAUTH;
413 };
414
415 [nodoc] dictionary ManagedIPSecProperties {
416 ManagedDOMString AuthenticationType;
417 ManagedCertificatePattern? ClientCertPattern;
418 ManagedDOMString? ClientCertRef;
419 ManagedDOMString? ClientCertType;
420 ManagedEAPProperties? EAP;
421 ManagedDOMString? Group;
422 ManagedLong? IKEVersion;
423 ManagedDOMString? PSK;
424 ManagedBoolean? SaveCredentials;
425 ManagedDOMStringList? ServerCARefs;
426 ManagedXAUTHProperties? XAUTH;
427 };
428
429 [nodoc] dictionary L2TPProperties {
430 boolean? LcpEchoDisabled;
431 DOMString? Password;
432 boolean? SaveCredentials;
433 DOMString? Username;
434 };
435
436 [nodoc] dictionary ManagedL2TPProperties {
437 ManagedBoolean? LcpEchoDisabled;
438 ManagedDOMString? Password;
439 ManagedBoolean? SaveCredentials;
440 ManagedDOMString? Username;
441 };
442
443 dictionary PaymentPortal {
444 // The HTTP method to use for the payment portal.
445 DOMString Method;
446 // The post data to send to the payment portal. Ignored unless
447 // <code>Method</code> is <code>POST</code>.
448 DOMString? PostData;
449 // The payment portal URL.
450 DOMString? Url;
451 };
452
453 dictionary ProxyLocation {
454 // The proxy IP address host.
455 DOMString Host;
456 // The port to use for the proxy.
457 long Port;
458 };
459
460 dictionary ManagedProxyLocation {
461 // See $(ref:ProxyLocation.Host).
462 ManagedDOMString Host;
463 // See $(ref:ProxyLocation.Port).
464 ManagedLong Port;
465 };
466
467 [noinline_doc] dictionary ManualProxySettings {
468 // Settings for HTTP proxy.
469 ProxyLocation? HTTPProxy;
470 // Settings for secure HTTP proxy.
471 ProxyLocation? SecureHTTPProxy;
472 // Settings for FTP proxy.
473 ProxyLocation? FTPProxy;
474 // Settings for SOCKS proxy.
475 ProxyLocation? SOCKS;
476 };
477
478 dictionary ManagedManualProxySettings {
479 // See $(ref:ManualProxySettings.HTTPProxy).
480 ManagedProxyLocation? HTTPProxy;
481 // See $(ref:ManualProxySettings.SecureHTTPProxy).
482 ManagedProxyLocation? SecureHTTPProxy;
483 // See $(ref:ManualProxySettings.FTPProxy).
484 ManagedProxyLocation? FTPProxy;
485 // See $(ref:ManualProxySettings.SOCKS).
486 ManagedProxyLocation? SOCKS;
487 };
488
489 [noinline_doc] dictionary ProxySettings {
490 // The type of proxy settings.
491 ProxySettingsType Type;
492 // Manual proxy settings - used only for <code>Manual</code> proxy settings.
493 ManualProxySettings? Manual;
494 // Domains and hosts for which manual proxy settings are excluded.
495 DOMString[]? ExcludeDomains;
496 // URL for proxy auto-configuration file.
497 DOMString? PAC;
498 };
499
500 dictionary ManagedProxySettings {
501 // See $(ref:ProxySettings.Type).
502 ManagedProxySettingsType Type;
503 // See $(ref:ProxySettings.Manual).
504 ManagedManualProxySettings? Manual;
505 // See $(ref:ProxySettings.ExcludeDomains).
506 ManagedDOMStringList? ExcludeDomains;
507 // See $(ref:ProxySettings.PAC).
508 ManagedDOMString? PAC;
509 };
510
511 [nodoc] dictionary VerifyX509 {
512 DOMString? Name;
513 DOMString? Type;
514 };
515
516 [nodoc] dictionary ManagedVerifyX509 {
517 ManagedDOMString? Name;
518 ManagedDOMString? Type;
519 };
520
521 [nodoc] dictionary OpenVPNProperties {
522 DOMString? Auth;
523 DOMString? AuthRetry;
524 boolean? AuthNoCache;
525 DOMString? Cipher;
526 DOMString? ClientCertRef;
527 CertificatePattern? ClientCertPattern;
528 DOMString? ClientCertType;
529 DOMString? CompLZO;
530 boolean? CompNoAdapt;
531 boolean? IgnoreDefaultRoute;
532 DOMString? KeyDirection;
533 DOMString? NsCertType;
534 DOMString? OTP;
535 DOMString? Password;
536 long? Port;
537 DOMString? Proto;
538 DOMString? PushPeerInfo;
539 DOMString? RemoteCertEKU;
540 DOMString[]? RemoteCertKU;
541 DOMString? RemoteCertTLS;
542 long? RenegSec;
543 boolean? SaveCredentials;
544 DOMString[]? ServerCARefs;
545 DOMString? ServerCertRef;
546 long? ServerPollTimeout;
547 long? Shaper;
548 DOMString? StaticChallenge;
549 DOMString? TLSAuthContents;
550 DOMString? TLSRemote;
551 DOMString? UserAuthenticationType;
552 DOMString? Username;
553 DOMString? Verb;
554 DOMString? VerifyHash;
555 VerifyX509? VerifyX509;
556 };
557
558 [nodoc] dictionary ManagedOpenVPNProperties {
559 ManagedDOMString? Auth;
560 ManagedDOMString? AuthRetry;
561 ManagedBoolean? AuthNoCache;
562 ManagedDOMString? Cipher;
563 ManagedDOMString? ClientCertRef;
564 ManagedCertificatePattern? ClientCertPattern;
565 ManagedDOMString? ClientCertType;
566 ManagedDOMString? CompLZO;
567 ManagedBoolean? CompNoAdapt;
568 ManagedBoolean? IgnoreDefaultRoute;
569 ManagedDOMString? KeyDirection;
570 ManagedDOMString? NsCertType;
571 ManagedDOMString? OTP;
572 ManagedDOMString? Password;
573 ManagedLong? Port;
574 ManagedDOMString? Proto;
575 ManagedDOMString? PushPeerInfo;
576 ManagedDOMString? RemoteCertEKU;
577 ManagedDOMStringList? RemoteCertKU;
578 ManagedDOMString? RemoteCertTLS;
579 ManagedLong? RenegSec;
580 ManagedBoolean? SaveCredentials;
581 ManagedDOMStringList? ServerCARefs;
582 ManagedDOMString? ServerCertRef;
583 ManagedLong? ServerPollTimeout;
584 ManagedLong? Shaper;
585 ManagedDOMString? StaticChallenge;
586 ManagedDOMString? TLSAuthContents;
587 ManagedDOMString? TLSRemote;
588 ManagedDOMString? UserAuthenticationType;
589 ManagedDOMString? Username;
590 ManagedDOMString? Verb;
591 ManagedDOMString? VerifyHash;
592 ManagedVerifyX509? VerifyX509;
593 };
594
595 dictionary SIMLockStatus {
596 // The status of SIM lock - possible values are <code>'sim-pin'</code>,
597 // <code>'sim-puk'</code> and <code>''</code>.
Devlin 2017/04/12 22:13:03 Why isn't this an enum? And why '' instead of und
stevenjb 2017/04/12 22:42:01 When I converted the API to use enums, using 'sim-
598 DOMString LockType;
599 // Whether SIM lock is enabled.
600 boolean LockEnabled;
601 // Number of PIN lock tries allowed before PUK is required to unlock the
602 // SIM.
603 long? RetriesLeft;
604 };
605
606 dictionary ThirdPartyVPNProperties {
607 // ID of the third-party VPN provider extension.
608 DOMString ExtensionID;
609 // The VPN provider name.
610 DOMString? ProviderName;
611 };
612
613 dictionary ManagedThirdPartyVPNProperties {
614 // See $(ref:ThirdPartyVPNProperties.ExtensionID).
615 ManagedDOMString ExtensionID;
616 // See $(ref:ThirdPartyVPNProperties.ProviderName).
617 DOMString? ProviderName;
618 };
619
620 // Network type dictionary types.
621
622 [noinline_doc] dictionary CellularProperties {
623 // Whether the cellular network should be connected automatically (when
624 // in range).
625 boolean? AutoConnect;
626 [nodoc] APNProperties? APN;
627 [nodoc] APNProperties[]? APNList;
628 // The cellular network activation type.
629 DOMString? ActivationType;
630 // Carrier account activation state.
631 ActivationStateType? ActivationState;
632 // Whether roaming is allowed for the network.
633 boolean? AllowRoaming;
634 // The name of the carrier for which the cellular device is configured.
635 DOMString? Carrier;
636 [nodoc] DOMString? ESN;
637 // Cellular device technology family - <code>CDMA</code> or
638 // <code>GSM</code>.
639 DOMString? Family;
640 // The firmware revision loaded in the cellular modem.
641 DOMString? FirmwareRevision;
642 // The list of networks found during the most recent network scan.
643 FoundNetworkProperties[]? FoundNetworks;
644 // The cellular modem hardware revision.
645 DOMString? HardwareRevision;
646 // Information about the operator that issued the SIM card currently
647 // installed in the modem.
648 CellularProviderProperties? HomeProvider;
649 [nodoc] DOMString? ICCID;
650 [nodoc] DOMString? IMEI;
651 [nodoc] APNProperties? LastGoodAPN;
652 // The cellular modem manufacturer.
653 DOMString? Manufacturer;
654 [nodoc] DOMString? MDN;
655 [nodoc] DOMString? MEID;
656 [nodoc] DOMString? MIN;
657 // The cellular modem model ID.
658 DOMString? ModelID;
659 // If the modem is registered on a network, the network technology
660 // currently in use.
661 DOMString? NetworkTechnology;
662 // Online payment portal a user can use to sign-up for or modify a mobile
663 // data plan.
664 PaymentPortal? PaymentPortal;
665 // The revision of the Preferred Roaming List loaded in the modem.
666 long? PRLVersion;
667 // The roaming state of the cellular modem on the current network.
668 DOMString? RoamingState;
669 // Information about the operator on whose network the modem is currently
670 // registered.
671 CellularProviderProperties? ServingOperator;
672 // The state of SIM lock for GSM family networks.
673 SIMLockStatus? SIMLockStatus;
674 // Whether a SIM card is present.
675 boolean? SIMPresent;
676 // The current network signal strength.
677 long? SignalStrength;
678 // Whether the cellular network supports scanning.
679 boolean? SupportNetworkScan;
680 // A list of supported carriers.
681 DOMString[]? SupportedCarriers;
682 };
683
684 dictionary ManagedCellularProperties {
685 // See $(ref:CellularProperties.AutoConnect).
686 ManagedBoolean? AutoConnect;
687 [nodoc] ManagedAPNProperties? APN;
688 [nodoc] ManagedAPNList? APNList;
689 // See $(ref:CellularProperties.ActivationType).
690 DOMString? ActivationType;
691 // See $(ref:CellularProperties.ActivationState).
692 ActivationStateType? ActivationState;
693 // See $(ref:CellularProperties.AllowRoaming).
694 boolean? AllowRoaming;
695 // See $(ref:CellularProperties.Carrier).
696 ManagedDOMString? Carrier;
697 [nodoc] DOMString? ESN;
698 // See $(ref:CellularProperties.Family).
699 DOMString? Family;
700 // See $(ref:CellularProperties.FirmwareRevision).
701 DOMString? FirmwareRevision;
702 // See $(ref:CellularProperties.FoundNetworks).
703 FoundNetworkProperties[]? FoundNetworks;
704 // See $(ref:CellularProperties.HardwareRevision).
705 DOMString? HardwareRevision;
706 // See $(ref:CellularProperties.HomeProvider).
707 CellularProviderProperties[]? HomeProvider;
708 [nodoc] DOMString? ICCID;
709 [nodoc] DOMString? IMEI;
710 [nodoc] APNProperties? LastGoodAPN;
711 // See $(ref:CellularProperties.Manufacturer).
712 DOMString? Manufacturer;
713 [nodoc] DOMString? MDN;
714 [nodoc] DOMString? MEID;
715 [nodoc] DOMString? MIN;
716 // See $(ref:CellularProperties.ModelID).
717 DOMString? ModelID;
718 // See $(ref:CellularProperties.NetworkTechnology).
719 DOMString? NetworkTechnology;
720 // See $(ref:CellularProperties.PaymentPortal).
721 PaymentPortal? PaymentPortal;
722 // See $(ref:CellularProperties.PRLVersion).
723 long? PRLVersion;
724 // See $(ref:CellularProperties.RoamingState).
725 DOMString? RoamingState;
726 // See $(ref:CellularProperties.ServingOperator).
727 CellularProviderProperties? ServingOperator;
728 // See $(ref:CellularProperties.SIMLockStatus).
729 SIMLockStatus? SIMLockStatus;
730 // See $(ref:CellularProperties.SIMPresent).
731 boolean? SIMPresent;
732 // See $(ref:CellularProperties.SignalStrength).
733 long? SignalStrength;
734 // See $(ref:CellularProperties.SupportNetworkScan).
735 boolean? SupportNetworkScan;
736 // See $(ref:CellularProperties.SupportedCarriers).
737 DOMString[]? SupportedCarriers;
738 };
739
740 dictionary CellularStateProperties {
741 // See $(ref:CellularProperties.ActivationState).
742 ActivationStateType? ActivationState;
743 // See $(ref:CellularProperties.NetworkTechnology).
744 DOMString? NetworkTechnology;
745 // See $(ref:CellularProperties.RoamingState).
746 DOMString? RoamingState;
747 // See $(ref:CellularProperties.SIMPresent).
748 boolean? SIMPresent;
749 // See $(ref:CellularProperties.SignalStrength).
750 long? SignalStrength;
751 };
752
753 dictionary EthernetProperties {
754 // Whether the Ethernet network should be connected automatically.
755 boolean? AutoConnect;
756 // The authentication used by the Ethernet network. Possible values are
757 // <code>None</code> and <code>8021X</code>.
758 DOMString? Authentication;
759 // Network's EAP settings. Required for 8021X authentication.
760 EAPProperties? EAP;
761 };
762
763 dictionary ManagedEthernetProperties {
764 // See $(ref:EthernetProperties.AutoConnect).
765 ManagedBoolean? AutoConnect;
766 // See $(ref:EthernetProperties.Authentication).
767 ManagedDOMString? Authentication;
768 [nodoc] ManagedEAPProperties? EAP;
769 };
770
771 dictionary EthernetStateProperties {
772 // See $(ref:EthernetProperties.Authentication).
773 DOMString Authentication;
774 };
775
776 dictionary VPNProperties {
777 // Whether the VPN network should be connected automatically.
778 boolean? AutoConnect;
779 // The VPN host.
780 DOMString? Host;
781 [nodoc] IPSecProperties? IPsec;
782 [nodoc] L2TPProperties? L2TP;
783 [nodoc] OpenVPNProperties? OpenVPN;
784 [nodoc] ThirdPartyVPNProperties? ThirdPartyVPN;
785 // The VPN type.
786 DOMString? Type;
787 };
788
789 dictionary ManagedVPNProperties {
790 // See $(ref:VPNProperties.AutoConnect).
791 ManagedBoolean? AutoConnect;
792 // See $(ref:VPNProperties.Host).
793 ManagedDOMString? Host;
794 [nodoc] ManagedIPSecProperties? IPsec;
795 [nodoc] ManagedL2TPProperties? L2TP;
796 [nodoc] ManagedOpenVPNProperties? OpenVPN;
797 [nodoc] ManagedThirdPartyVPNProperties? ThirdPartyVPN;
798 // See $(ref:VPNProperties.Type).
799 ManagedDOMString Type;
800 };
801
802 dictionary VPNStateProperties {
803 // See $(ref:VPNProperties.Type).
804 DOMString Type;
805 [nodoc] IPSecProperties? IPsec;
806 [nodoc] ThirdPartyVPNProperties? ThirdPartyVPN;
807 };
808
809 [noinline_doc] dictionary WiFiProperties {
810 // Whether ARP polling of default gateway is allowed. Defaults to true.
811 boolean? AllowGatewayARPPolling;
812 // Whether the WiFi network should be connected automatically when in range.
813 boolean? AutoConnect;
814 // The BSSID of the associated access point..
815 DOMString? BSSID;
816 // The network EAP properties. Required for <code>WEP-8021X</code> and
817 // <code>WPA-EAP</code> networks.
818 EAPProperties? EAP;
819 // The WiFi service operating frequency in MHz. For connected networks, the
820 // current frequency on which the network is connected. Otherwise, the
821 // frequency of the best available BSS.
822 long? Frequency;
823 // Contains all operating frequency recently seen for the WiFi network.
824 long[]? FrequencyList;
825 // HEX-encoded copy of the network SSID.
826 DOMString? HexSSID;
827 // Whether the network SSID will be broadcast.
828 boolean? HiddenSSID;
829 // Signal-to-noise value (in dB) below which roaming to a new network
830 // should be attempted.
831 long? RoamThreshold;
832 // The network SSID.
833 DOMString? SSID;
834 // The network security type.
835 DOMString? Security;
836 // The network signal strength.
837 long? SignalStrength;
838 };
839
840 dictionary ManagedWiFiProperties {
841 // See $(ref:WiFiProperties.AllowGatewayARPPolling).
842 ManagedBoolean? AllowGatewayARPPolling;
843 // See $(ref:WiFiProperties.AutoConnect).
844 ManagedBoolean? AutoConnect;
845 // See $(ref:WiFiProperties.BSSID).
846 DOMString? BSSID;
847 // See $(ref:WiFiProperties.EAP).
848 [nodoc] ManagedEAPProperties? EAP;
849 // See $(ref:WiFiProperties.Frequency).
850 long? Frequency;
851 // See $(ref:WiFiProperties.FrequencyList).
852 long[]? FrequencyList;
853 // See $(ref:WiFiProperties.HexSSID).
854 ManagedDOMString? HexSSID;
855 // See $(ref:WiFiProperties.HiddenSSID).
856 ManagedBoolean? HiddenSSID;
857 // See $(ref:WiFiProperties.RoamThreshold).
858 ManagedLong? RoamThreshold;
859 // See $(ref:WiFiProperties.SSID).
860 ManagedDOMString? SSID;
861 // See $(ref:WiFiProperties.Security).
862 ManagedDOMString Security;
863 // See $(ref:WiFiProperties.SignalStrength).
864 long? SignalStrength;
865 };
866
867 dictionary WiFiStateProperties {
868 // See $(ref:WiFiProperties.BSSID).
869 DOMString? BSSID;
870 // See $(ref:WiFiProperties.Frequency).
871 long? Frequency;
872 // See $(ref:WiFiProperties.Security).
873 DOMString Security;
874 // See $(ref:WiFiProperties.SignalStrength).
875 long? SignalStrength;
876 };
877
878 dictionary WiMAXProperties {
879 // Whether the network should be connected automatically.
880 boolean? AutoConnect;
881 // The network EAP properties.
882 EAPProperties? EAP;
883 // The network signal strength.
884 long? SignalStrength;
885 };
886
887 dictionary ManagedWiMAXProperties {
888 // See $(ref:WiMAXProperties.AutoConnect).
889 ManagedBoolean? AutoConnect;
890 [nodoc] ManagedEAPProperties? EAP;
891 // See $(ref:WiMAXProperties.SignalStrength).
892 long? SignalStrength;
893 };
894
895 dictionary WiMAXStateProperties {
896 // See $(ref:WiMAXProperties.SignalStrength).
897 long? SignalStrength;
898 };
899
900 dictionary NetworkConfigProperties {
901 // See $(ref:NetworkProperties.Cellular).
902 CellularProperties? Cellular;
903 // See $(ref:NetworkProperties.Ethernet).
904 EthernetProperties? Ethernet;
905 // See $(ref:NetworkProperties.GUID).
906 DOMString? GUID;
907 // See $(ref:NetworkProperties.IPAddressConfigType).
908 IPConfigType? IPAddressConfigType;
909 // See $(ref:NetworkProperties.Name).
910 DOMString? Name;
911 // See $(ref:NetworkProperties.NameServersConfigType).
912 IPConfigType? NameServersConfigType;
913 // See $(ref:NetworkProperties.Priority).
914 long? Priority;
915 [nodoc]
916 ProxySettings? ProxySettings;
917 [nodoc]
918 IPConfigProperties? StaticIPConfig;
919 // See $(ref:NetworkProperties.Type).
920 NetworkType? Type;
921 // See $(ref:NetworkProperties.VPN).
922 VPNProperties? VPN;
923 // See $(ref:NetworkProperties.WiFi).
924 WiFiProperties? WiFi;
925 // See $(ref:NetworkProperties.WiMAX).
926 WiMAXProperties? WiMAX;
927 };
928
929 [noinline_doc]
930 dictionary NetworkProperties {
931 // For cellular networks, cellular network properties.
932 CellularProperties? Cellular;
933 // Whether the network is connectable.
934 boolean? Connectable;
935 // The network's current connection state.
936 ConnectionStateType? ConnectionState;
937 // The last recorded network error state.
938 DOMString? ErrorState;
939 // For Ethernet networks, the Ethernet network properties.
940 EthernetProperties? Ethernet;
941 // The network GUID.
942 DOMString GUID;
943 // The network's IP address configuration type.
944 IPConfigType? IPAddressConfigType;
945 // The network's IP configuration.
946 IPConfigProperties[]? IPConfigs;
947 // The network's MAC address.
948 DOMString? MacAddress;
949 // A user friendly network name.
950 DOMString? Name;
951 // The IP configuration type for the name servers used by the network.
952 IPConfigType? NameServersConfigType;
953 // The network priority.
954 long? Priority;
955 // The network's proxy settings.
956 ProxySettings? ProxySettings;
957 // For a connected network, whether the network connectivity to the
958 // Internet is limited, e.g. if the network is behind a portal, or a
959 // cellular network is not activated.
960 boolean? RestrictedConnectivity;
961 // The network's static IP configuration.
962 IPConfigProperties? StaticIPConfig;
963 // IP configuration that was received from the DHCP server before applying
964 // static IP configuration.
965 IPConfigProperties? SavedIPConfig;
966 // Indicates whether and how the network is configured.
967 DOMString? Source;
968 // The network type.
969 NetworkType Type;
970 // For VPN networks, the network VPN properties.
971 VPNProperties? VPN;
972 // For WiFi networks, the network WiFi properties.
973 WiFiProperties? WiFi;
974 // For WiMAX networks, the network WiMAX properties.
975 WiMAXProperties? WiMAX;
976 };
977
978 [noinline_doc]
979 dictionary ManagedProperties {
980 // See $(ref:NetworkProperties.Cellular).
981 ManagedCellularProperties? Cellular;
982 // See $(ref:NetworkProperties.Connectable).
983 boolean? Connectable;
984 // See $(ref:NetworkProperties.ConnectionState).
985 ConnectionStateType? ConnectionState;
986 // See $(ref:NetworkProperties.ErrorState).
987 DOMString? ErrorState;
988 // See $(ref:NetworkProperties.Ethernet).
989 ManagedEthernetProperties? Ethernet;
990 // See $(ref:NetworkProperties.GUID).
991 DOMString GUID;
992 // See $(ref:NetworkProperties.IPAddressConfigType).
993 ManagedIPConfigType? IPAddressConfigType;
994 // See $(ref:NetworkProperties.IPConfigs).
995 IPConfigProperties[]? IPConfigs;
996 // See $(ref:NetworkProperties.MacAddress).
997 DOMString? MacAddress;
998 // See $(ref:NetworkProperties.Name).
999 ManagedDOMString? Name;
1000 // See $(ref:NetworkProperties.NameServersConfigType).
1001 ManagedIPConfigType? NameServersConfigType;
1002 // See $(ref:NetworkProperties.Priority).
1003 ManagedLong? Priority;
1004 // See $(ref:NetworkProperties.ProxySettings).
1005 ManagedProxySettings? ProxySettings;
1006 // See $(ref:NetworkProperties.RestrictedConnectivity).
1007 boolean? RestrictedConnectivity;
1008 // See $(ref:NetworkProperties.StaticIPConfig).
1009 ManagedIPConfigProperties? StaticIPConfig;
1010 // See $(ref:NetworkProperties.SavedIPConfig).
1011 IPConfigProperties? SavedIPConfig;
1012 // See $(ref:NetworkProperties.Source).
1013 DOMString? Source;
1014 // See $(ref:NetworkProperties.Type).
1015 NetworkType Type;
1016 // See $(ref:NetworkProperties.VPN).
1017 ManagedVPNProperties? VPN;
1018 // See $(ref:NetworkProperties.WiFi).
1019 ManagedWiFiProperties? WiFi;
1020 // See $(ref:NetworkProperties.WiMAX).
1021 ManagedWiMAXProperties? WiMAX;
1022 };
1023
1024 dictionary NetworkStateProperties {
1025 // See $(ref:NetworkProperties.Cellular).
1026 CellularStateProperties? Cellular;
1027 // See $(ref:NetworkProperties.Connectable).
1028 boolean? Connectable;
1029 // See $(ref:NetworkProperties.ConnectionState).
1030 ConnectionStateType? ConnectionState;
1031 // See $(ref:NetworkProperties.Ethernet).
1032 EthernetStateProperties? Ethernet;
1033 // See $(ref:NetworkProperties.ErrorState).
1034 DOMString? ErrorState;
1035 // See $(ref:NetworkProperties.GUID).
1036 DOMString GUID;
1037 // See $(ref:NetworkProperties.Name).
1038 DOMString? Name;
1039 // See $(ref:NetworkProperties.Priority).
1040 long? Priority;
1041 // See $(ref:NetworkProperties.Source).
1042 DOMString? Source;
1043 // See $(ref:NetworkProperties.Type).
1044 NetworkType Type;
1045 // See $(ref:NetworkProperties.VPN).
1046 VPNStateProperties? VPN;
1047 // See $(ref:NetworkProperties.WiFi).
1048 WiFiStateProperties? WiFi;
1049 // See $(ref:NetworkProperties.WiMAX).
1050 WiMAXStateProperties? WiMAX;
1051 };
1052
1053 dictionary DeviceStateProperties {
1054 // Set if the device is enabled. True if the device is currently scanning.
1055 boolean? Scanning;
1056
1057 // Set to the SIM lock type if the device type is Cellular and the device
1058 // is locked.
1059 DOMString? SimLockType;
1060
1061 // Set to the SIM present state if the device type is Cellular.
1062 boolean? SimPresent;
1063
1064 // The current state of the device.
1065 DeviceStateType State;
1066
1067 // The network type associated with the device (Cellular, Ethernet, WiFi, or
1068 // WiMAX).
1069 NetworkType Type;
1070 };
1071
1072 [nodoc] dictionary VerificationProperties {
1073 // A string containing a PEM-encoded (including the 'BEGIN CERTIFICATE'
1074 // header and 'END CERTIFICATE' footer) X.509 certificate for use in
1075 // verifying the signed data.
1076 DOMString certificate;
1077
1078 // An array of PEM-encoded X.509 intermediate certificate authority
1079 // certificates. Each PEM-encoded certificate is expected to have the
1080 // 'BEGIN CERTIFICATE' header and 'END CERTIFICATE' footer.
1081 DOMString[]? intermediateCertificates;
1082
1083 // A string containing a base64-encoded RSAPublicKey ASN.1 structure,
1084 // representing the public key to be used by
1085 // $(ref:verifyAndEncryptCredentials) and $(ref:verifyAndEncryptData)
1086 // methods.
1087 DOMString publicKey;
1088
1089 // A string containing a base64-encoded random binary data for use in
1090 // verifying the signed data.
1091 DOMString nonce;
1092
1093 // A string containing the identifying data string signed by the device.
1094 DOMString signedData;
1095
1096 // A string containing the serial number of the device.
1097 DOMString deviceSerial;
1098
1099 // A string containing the SSID of the device. Should be empty for new
1100 // configurations.
1101 DOMString deviceSsid;
1102
1103 // A string containing the BSSID of the device. Should be empty for new
1104 // configurations.
1105 DOMString deviceBssid;
1106 };
1107
1108 dictionary NetworkFilter {
1109 // The type of networks to return.
1110 NetworkType networkType;
1111
1112 // If true, only include visible (physically connected or in-range)
1113 // networks. Defaults to 'false'.
1114 boolean? visible;
1115
1116 // If true, only include configured (saved) networks. Defaults to 'false'.
1117 boolean? configured;
1118
1119 // Maximum number of networks to return. Defaults to 1000 if unspecified.
1120 // Use 0 for no limit.
1121 long? limit;
1122 };
1123
1124 dictionary GlobalPolicy {
1125 // If true, only policy networks may auto connect. Defaults to false.
1126 boolean? AllowOnlyPolicyNetworksToAutoconnect;
1127
1128 // If true, only policy networks may be connected to and no new networks may
1129 // be added or configured. Defaults to false.
1130 boolean? AllowOnlyPolicyNetworksToConnect;
1131 };
1132
1133 callback VoidCallback = void();
1134 callback BooleanCallback = void(boolean result);
1135 callback StringCallback = void(DOMString result);
1136 callback GetPropertiesCallback = void(NetworkProperties result);
1137 callback GetManagedPropertiesCallback = void(ManagedProperties result);
1138 callback GetStatePropertiesCallback = void(NetworkStateProperties result);
1139 callback GetNetworksCallback = void(NetworkStateProperties[] result);
1140 callback GetDeviceStatesCallback = void(DeviceStateProperties[] result);
1141 callback GetEnabledNetworkTypesCallback = void(NetworkType[] result);
1142 callback CaptivePortalStatusCallback = void(CaptivePortalStatus result);
1143 callback GetGlobalPolicyCallback = void(GlobalPolicy result);
1144
1145 interface Functions {
1146 // Gets all the properties of the network with id networkGuid. Includes all
1147 // properties of the network (read-only and read/write values).
1148 // |networkGuid|: The GUID of the network to get properties for.
1149 // |callback|: Called with the network properties when received.
1150 static void getProperties(DOMString networkGuid,
1151 GetPropertiesCallback callback);
1152
1153 // Gets the merged properties of the network with id networkGuid from the
1154 // sources: User settings, shared settings, user policy, device policy and
1155 // the currently active settings.
1156 // |networkGuid|: The GUID of the network to get properties for.
1157 // |callback|: Called with the managed network properties when received.
1158 static void getManagedProperties(DOMString networkGuid,
1159 GetManagedPropertiesCallback callback);
1160
1161 // Gets the cached read-only properties of the network with id networkGuid.
1162 // This is meant to be a higher performance function than
1163 // $(ref:getProperties), which requires a round trip to query the networking
1164 // subsystem. The following properties are returned for all networks: GUID,
1165 // Type, Name, WiFi.Security. Additional properties are provided for visible
1166 // networks: ConnectionState, ErrorState, WiFi.SignalStrength,
1167 // Cellular.NetworkTechnology, Cellular.ActivationState,
1168 // Cellular.RoamingState.
1169 // |networkGuid|: The GUID of the network to get properties for.
1170 // |callback|: Called immediately with the network state properties.
1171 static void getState(DOMString networkGuid,
1172 GetStatePropertiesCallback callback);
1173
1174 // Sets the properties of the network with id networkGuid.
1175 // <b>
1176 // In kiosk sessions, calling this method on a shared network will fail.
1177 // </b>
1178 // |networkGuid|: The GUID of the network to set properties for.
1179 // |properties|: The properties to set.
1180 // |callback|: Called when the operation has completed.
1181 static void setProperties(DOMString networkGuid,
1182 NetworkConfigProperties properties,
1183 optional VoidCallback callback);
1184
1185 // Creates a new network configuration from properties. If a matching
1186 // configured network already exists, this will fail. Otherwise returns the
1187 // GUID of the new network.
1188 // |shared|: <p>
1189 // If <code>true</code>, share this network configuration with
1190 // other users.
1191 // </p>
1192 // <p>
1193 // <b>This option is exposed only to Chrome's Web UI.</b>
1194 // When called by apps, <code>false</code> is the only allowed value.
1195 // </p>
1196 // |properties|: The properties to configure the new network with.
1197 // |callback|: Called with the GUID for the new network configuration once
1198 // the network has been created.
1199 static void createNetwork(boolean shared,
1200 NetworkConfigProperties properties,
1201 optional StringCallback callback);
1202
1203 // <p>
1204 // Forgets a network configuration by clearing any configured properties
1205 // for the network with GUID <code>networkGuid</code>. This may also
1206 // include any other networks with matching identifiers (e.g. WiFi SSID
1207 // and Security). If no such configuration exists, an error will be set
1208 // and the operation will fail.
1209 // </p>
1210 // <p>
1211 // <b>In kiosk sessions, this method will not be able to forget shared
1212 // network configurations.</b>
1213 // </p>
1214 // |networkGuid|: The GUID of the network to forget.
1215 // |callback|: Called when the operation has completed.
1216 static void forgetNetwork(DOMString networkGuid,
1217 optional VoidCallback callback);
1218
1219 // Returns a list of network objects with the same properties provided by
1220 // $(ref:getState). A filter is provided to specify the
1221 // type of networks returned and to limit the number of networks. Networks
1222 // are ordered by the system based on their priority, with connected or
1223 // connecting networks listed first.
1224 // |filter|: Describes which networks to return.
1225 // |callback|: Called with a dictionary of networks and their state
1226 // properties when received.
1227 static void getNetworks(NetworkFilter filter,
1228 GetNetworksCallback callback);
1229
1230 // Deprecated. Please use $(ref:getNetworks) with
1231 // filter.visible = true instead.
1232 [nodoc, deprecated="Use getNetworks."]
1233 static void getVisibleNetworks(NetworkType networkType,
1234 GetNetworksCallback callback);
1235
1236 // Deprecated. Please use $(ref:getDeviceStates) instead.
1237 [nodoc, deprecated="Use getDeviceStates."]
1238 static void getEnabledNetworkTypes(GetEnabledNetworkTypesCallback callback);
1239
1240 // Returns states of available networking devices.
1241 // |callback|: Called with a list of devices and their state.
1242 static void getDeviceStates(GetDeviceStatesCallback callback);
1243
1244 // Enables any devices matching the specified network type. Note, the type
1245 // might represent multiple network types (e.g. 'Wireless').
1246 // |networkType|: The type of network to enable.
1247 static void enableNetworkType(NetworkType networkType);
1248
1249 // Disables any devices matching the specified network type. See note for
1250 // $(ref:enableNetworkType).
1251 // |networkType|: The type of network to disable.
1252 static void disableNetworkType(NetworkType networkType);
1253
1254 // Requests that the networking subsystem scan for new networks and
1255 // update the list returned by $(ref:getNetworks). This is only a
1256 // request: the network subsystem can choose to ignore it. If the list
1257 // is updated, then the $(ref:onNetworkListChanged) event will be fired.
1258 static void requestNetworkScan();
1259
1260 // Starts a connection to the network with networkGuid.
1261 // |networkGuid|: The GUID of the network to connect to.
1262 // |callback|: Called when the connect request has been sent. Note: the
1263 // connection may not have completed. Observe $(ref:onNetworksChanged)
1264 // to be notified when a network state changes.
1265 static void startConnect(DOMString networkGuid,
1266 optional VoidCallback callback);
1267
1268 // Starts a disconnect from the network with networkGuid.
1269 // |networkGuid|: The GUID of the network to disconnect from.
1270 // |callback|: Called when the disconnect request has been sent. See note
1271 // for $(ref:startConnect).
1272 static void startDisconnect(DOMString networkGuid,
1273 optional VoidCallback callback);
1274
1275 // Starts activation of the Cellular network with networkGuid. If called
1276 // for a network that is already activated, or for a network with a carrier
1277 // that can not be directly activated, this will show the account details
1278 // page for the carrier if possible.
1279 // |networkGuid|: The GUID of the Cellular network to activate.
1280 // |carrier|: Optional name of carrier to activate.
1281 // |callback|: Called when the activation request has been sent. See note
1282 // for $(ref:startConnect).
1283 [nodoc] static void startActivate(DOMString networkGuid,
1284 optional DOMString carrier,
1285 optional VoidCallback callback);
1286
1287 // Verifies that the device is a trusted device.
1288 // |properties|: Properties of the destination to use in verifying that it
1289 // is a trusted device.
1290 // |callback|: A callback function that indicates whether or not the device
1291 // is a trusted device.
1292 [nodoc, deprecated = "Use networking.castPrivate API."]
1293 static void verifyDestination(VerificationProperties properties,
1294 BooleanCallback callback);
1295
1296 // Verifies that the device is a trusted device and retrieves encrypted
1297 // network credentials.
1298 // |properties|: Properties of the destination to use in verifying that it
1299 // is a trusted device.
1300 // |networkGuid|: The GUID of the Cellular network to activate.
1301 // |callback|: A callback function that receives base64-encoded encrypted
1302 // credential data to send to a trusted device.
1303 [nodoc, deprecated = "Use networking.castPrivate API."]
1304 static void verifyAndEncryptCredentials(VerificationProperties properties,
1305 DOMString networkGuid,
1306 StringCallback callback);
1307
1308 // Verifies that the device is a trusted device and encrypts supplied
1309 // data with device public key.
1310 // |properties|: Properties of the destination to use in verifying that it
1311 // is a trusted device.
1312 // |data|: A string containing the base64-encoded data to encrypt.
1313 // |callback|: A callback function that receives base64-encoded encrypted
1314 // data to send to a trusted device.
1315 [nodoc, deprecated = "Use networking.castPrivate API."]
1316 static void verifyAndEncryptData(VerificationProperties properties,
1317 DOMString data,
1318 StringCallback callback);
1319
1320 // Enables TDLS for WiFi traffic with a specified peer if available.
1321 // |ip_or_mac_address|: The IP or MAC address of the peer with which to
1322 // enable a TDLS connection.
1323 // |enabled| If true, enable TDLS, otherwise disable TDLS.
1324 // |callback|: A callback function that receives a string with an error or
1325 // the current TDLS status. 'Failed' indicates that the request failed
1326 // (e.g. MAC address lookup failed). 'Timeout' indicates that the lookup
1327 // timed out. Otherwise a valid status is returned (see
1328 // $(ref:getWifiTDLSStatus)).
1329 [nodoc, deprecated = "Use networking.castPrivate API."]
1330 static void setWifiTDLSEnabledState(DOMString ip_or_mac_address,
1331 boolean enabled,
1332 optional StringCallback callback);
1333
1334 // Returns the current TDLS status for the specified peer.
1335 // |ip_or_mac_address|: The IP or MAC address of the peer.
1336 // |callback|: A callback function that receives a string with the current
1337 // TDLS status which can be 'Connected', 'Disabled', 'Disconnected',
1338 // 'Nonexistent', or 'Unknown'.
1339 [nodoc, deprecated = "Use networking.castPrivate API."]
1340 static void getWifiTDLSStatus(DOMString ip_or_mac_address,
1341 StringCallback callback);
1342
1343 // Returns captive portal status for the network matching 'networkGuid'.
1344 // |networkGuid|: The GUID of the network to get captive portal status for.
1345 // |callback|: A callback function that returns the results of the query for
1346 // network captive portal status.
1347 static void getCaptivePortalStatus(DOMString networkGuid,
1348 CaptivePortalStatusCallback callback);
1349
1350 // Unlocks a Cellular SIM card.
1351 // * If the SIM is PIN locked, |pin| will be used to unlock the SIM and
1352 // the |puk| argument will be ignored if provided.
1353 // * If the SIM is PUK locked, |puk| and |pin| must be provided. If the
1354 // operation succeeds (|puk| is valid), the PIN will be set to |pin|.
1355 // (If |pin| is empty or invalid the operation will fail).
1356 // |networkGuid|: The GUID of the cellular network to unlock.
1357 // If empty, the default cellular device will be used.
1358 // |pin|: The current SIM PIN, or the new PIN if PUK is provided.
1359 // |puk|: The operator provided PUK for unblocking a blocked SIM.
1360 // |callback|: Called when the operation has completed.
1361 [nodoc] static void unlockCellularSim(DOMString networkGuid,
1362 DOMString pin,
1363 optional DOMString puk,
1364 optional VoidCallback callback);
1365
1366 // Sets whether or not SIM locking is enabled (i.e a PIN will be required
1367 // when the device is powered) and changes the PIN if a new PIN is
1368 // specified. If the new PIN is provided but not valid (e.g. too short)
1369 // the operation will fail. This will not lock the SIM; that is handled
1370 // automatically by the device. NOTE: If the SIM is locked, it must first be
1371 // unlocked with unlockCellularSim() before this can be called (otherwise it
1372 // will fail and chrome.runtime.lastError will be set to Error.SimLocked).
1373 // |networkGuid|: The GUID of the cellular network to set the SIM state of.
1374 // If empty, the default cellular device will be used.
1375 // |simState|: The SIM state to set.
1376 // |callback|: Called when the operation has completed.
1377 [nodoc] static void setCellularSimState(DOMString networkGuid,
1378 CellularSimState simState,
1379 optional VoidCallback callback);
1380
1381 // Gets the global policy properties. These properties are not expected to
1382 // change during a session.
1383 static void getGlobalPolicy(GetGlobalPolicyCallback callback);
1384 };
1385
1386 interface Events {
1387 // Fired when the properties change on any of the networks. Sends a list of
1388 // GUIDs for networks whose properties have changed.
1389 static void onNetworksChanged(DOMString[] changes);
1390
1391 // Fired when the list of networks has changed. Sends a complete list of
1392 // GUIDs for all the current networks.
1393 static void onNetworkListChanged(DOMString[] changes);
1394
1395 // Fired when the list of devices has changed or any device state properties
1396 // have changed.
1397 static void onDeviceStateListChanged();
1398
1399 // Fired when a portal detection for a network completes. Sends the GUID of
1400 // the network and the corresponding captive portal status.
1401 static void onPortalDetectionCompleted(DOMString networkGuid,
1402 CaptivePortalStatus status);
1403 };
1404 };
OLDNEW
« no previous file with comments | « chrome/common/extensions/docs/templates/public/apps/networking_onc.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698