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

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.
9 // </p>
10 // <p>
11 // Network connection configurations are specified following
12 // <a href="https://chromium.googlesource.com/chromium/src/+/master/components /onc/docs/onc_spec.md">
13 // Open Network Configuration (ONC)</a> specification.
14 // </p>
15 // <p>
16 // <b>NOTE</b>: Most dictionary properties and enum values use UpperCamelCase
17 // to match the ONC specification instead of the JavaScript lowerCamelCase
18 // convention.
19 // </p>
20 namespace networking.onc {
21 enum ActivationStateType {
22 Activated, Activating, NotActivated, PartiallyActivated
23 };
24
25 enum CaptivePortalStatus {
26 Unknown, Offline, Online, Portal, ProxyAuthRequired
27 };
28
29 enum ConnectionStateType {
30 Connected, Connecting, NotConnected
31 };
32
33 enum DeviceStateType {
34 // Device is available but not initialized.
35 Uninitialized,
36 // Device is initialized but not enabled.
37 Disabled,
38 // Enabled state has been requested but has not completed.
39 Enabling,
40 // Device is enabled.
41 Enabled,
42 // Device is prohibited.
43 Prohibited
44 };
45
46 enum IPConfigType {
47 DHCP, Static
48 };
49
50 enum NetworkType {
51 All, Cellular, Ethernet, VPN, Wireless, WiFi, WiMAX
52 };
53
54 enum ProxySettingsType {
55 Direct, Manual, PAC, WPAD
56 };
57
58 enum ClientCertificateType {
59 Ref, Pattern
60 };
61
62 dictionary ManagedBoolean {
63 // The active value currently used by the network configuration manager
64 // (e.g. Shill).
65 boolean? Active;
66 // The source from which the effective property value was determined.
67 DOMString? Effective;
68 // The property value provided by the user policy.
69 boolean? UserPolicy;
70 // The property value provided by the device policy.
71 boolean? DevicePolicy;
72 // The property value set by the logged in user. Only provided if
73 // |UserEditable| is <code>true</code>.
74 boolean? UserSetting;
75 // The value set for all users of the device. Only provided if
76 // |DeviceEditiable| is <code>true</code>.
77 boolean? SharedSetting;
78 // Whether a UserPolicy for the property exists and allows the property to
79 // be edited (i.e. the policy set recommended property value).
80 // Defaults to <code>false</code>.
81 boolean? UserEditable;
82 // Whether a DevicePolicy for the property exists and allows the property to
83 // be edited (i.e. the policy set recommended property value).
84 // Defaults to <code>false</code>.
85 boolean? DeviceEditable;
86 };
87
88 dictionary ManagedLong {
89 // The active value currently used by the network configuration manager
90 // (e.g. Shill).
91 long? Active;
92 // The source from which the effective property value was determined.
93 DOMString? Effective;
94 // The property value provided by the user policy.
95 long? UserPolicy;
96 // The property value provided by the device policy.
97 long? DevicePolicy;
98 // The property value set by the logged in user. Only provided if
99 // |UserEditable| is <code>true</code>.
100 long? UserSetting;
101 // The value set for all users of the device. Only provided if
102 // |DeviceEditiable| is <code>true</code>.
103 long? SharedSetting;
104 // Whether a UserPolicy for the property exists and allows the property to
105 // be edited (i.e. the policy set recommended property value).
106 // Defaults to <code>false</code>.
107 boolean? UserEditable;
108 // Whether a DevicePolicy for the property exists and allows the property to
109 // be edited (i.e. the policy set recommended property value).
110 // Defaults to <code>false</code>.
111 boolean? DeviceEditable;
112 };
113
114 dictionary ManagedDOMString {
115 // The active value currently used by the network configuration manager
116 // (e.g. Shill).
117 DOMString? Active;
118 // The source from which the effective property value was determined.
119 DOMString? Effective;
120 // The property value provided by the user policy.
121 DOMString? UserPolicy;
122 // The property value provided by the device policy.
123 DOMString? DevicePolicy;
124 // The property value set by the logged in user. Only provided if
125 // |UserEditable| is <code>true</code>.
126 DOMString? UserSetting;
127 // The value set for all users of the device. Only provided if
128 // |DeviceEditiable| is <code>true</code>.
129 DOMString? SharedSetting;
130 // Whether a UserPolicy for the property exists and allows the property to
131 // be edited (i.e. the policy set recommended property value).
132 // Defaults to <code>false</code>.
133 boolean? UserEditable;
134 // Whether a DevicePolicy for the property exists and allows the property to
135 // be edited (i.e. the policy set recommended property value).
136 // Defaults to <code>false</code>.
137 boolean? DeviceEditable;
138 };
139
140 dictionary ManagedDOMStringList {
141 // The active value currently used by the network configuration manager
142 // (e.g. Shill).
143 DOMString[]? Active;
144 // The source from which the effective property value was determined.
145 DOMString? Effective;
146 // The property value provided by the user policy.
147 DOMString[]? UserPolicy;
148 // The property value provided by the device policy.
149 DOMString[]? DevicePolicy;
150 // The property value set by the logged in user. Only provided if
151 // |UserEditable| is <code>true</code>.
152 DOMString[]? UserSetting;
153 // The value set for all users of the device. Only provided if
154 // |DeviceEditiable| is <code>true</code>.
155 DOMString[]? SharedSetting;
156 // Whether a UserPolicy for the property exists and allows the property to
157 // be edited (i.e. the policy set recommended property value).
158 // Defaults to <code>false</code>.
159 boolean? UserEditable;
160 // Whether a DevicePolicy for the property exists and allows the property to
161 // be edited (i.e. the policy set recommended property value).
162 // Defaults to <code>false</code>.
163 boolean? DeviceEditable;
164 };
165
166 dictionary ManagedIPConfigType {
167 // The active value currently used by the network configuration manager
168 // (e.g. Shill).
169 IPConfigType? Active;
170 // The source from which the effective property value was determined.
171 DOMString? Effective;
172 // The property value provided by the user policy.
173 IPConfigType? UserPolicy;
174 // The property value provided by the device policy.
175 IPConfigType? DevicePolicy;
176 // The property value set by the logged in user. Only provided if
177 // |UserEditable| is <code>true</code>.
178 IPConfigType? UserSetting;
179 // The value set for all users of the device. Only provided if
180 // |DeviceEditiable| is <code>true</code>.
181 IPConfigType? SharedSetting;
182 // Whether a UserPolicy for the property exists and allows the property to
183 // be edited (i.e. the policy set recommended property value).
184 // Defaults to <code>false</code>.
185 boolean? UserEditable;
186 // Whether a DevicePolicy for the property exists and allows the property to
187 // be edited (i.e. the policy set recommended property value).
188 // Defaults to <code>false</code>.
189 boolean? DeviceEditable;
190 };
191
192 dictionary ManagedProxySettingsType {
193 // The active value currently used by the network configuration manager
194 // (e.g. Shill).
195 ProxySettingsType? Active;
196 // The source from which the effective property value was determined.
197 DOMString? Effective;
198 // The property value provided by the user policy.
199 ProxySettingsType? UserPolicy;
200 // The property value provided by the device policy.
201 ProxySettingsType? DevicePolicy;
202 // The property value set by the logged in user. Only provided if
203 // |UserEditable| is <code>true</code>.
204 ProxySettingsType? UserSetting;
205 // The value set for all users of the device. Only provided if
206 // |DeviceEditiable| is <code>true</code>.
207 ProxySettingsType? SharedSetting;
208 // Whether a UserPolicy for the property exists and allows the property to
209 // be edited (i.e. the policy set recommended property value).
210 // Defaults to <code>false</code>.
211 boolean? UserEditable;
212 // Whether a DevicePolicy for the property exists and allows the property to
213 // be edited (i.e. the policy set recommended property value).
214 // Defaults to <code>false</code>.
215 boolean? DeviceEditable;
216 };
217
218 // Sub-dictionary types.
219
220 dictionary CellularProviderProperties {
221 // The operator name.
222 DOMString Name;
223 // Cellular network ID as a simple concatenation of the network's
224 // MCC (Mobile Country Code) and MNC (Mobile Network Code).
225 DOMString Code;
226 // The two-letter country code.
227 DOMString? Country;
228 };
229
230 dictionary IssuerSubjectPattern {
231 // If set, the value against which to match the certificate subject's
232 // common name.
233 DOMString? CommonName;
234 // If set, the value against which to match the certificate subject's
235 // common location.
236 DOMString? Locality;
237 // If set, the value against which to match the certificate subject's
238 // organizations. At least one organization should match the value.
239 DOMString? Organization;
240 // If set, the value against which to match the certificate subject's
241 // organizational units. At least one organizational unit should match the
242 // value.
243 DOMString? OrganizationalUnit;
244 };
245
246 dictionary CertificatePattern {
247 // List of URIs to which the user can be directed in case no certificates
248 // that match this pattern are found.
249 DOMString[]? EnrollmentURI;
250 // If set, pattern against which X.509 issuer settings should be matched.
251 IssuerSubjectPattern? Issuer;
252 // List of certificate issuer CA certificates. A certificate must be signed
253 // by one of them in order to match this pattern.
254 DOMString[]? IssuerCARef;
255 // If set, pattern against which X.509 subject settings should be matched.
256 IssuerSubjectPattern? Subject;
257 };
258
259 dictionary EAPProperties {
260 DOMString? AnonymousIdentity;
261 CertificatePattern? ClientCertPattern;
262 DOMString? ClientCertRef;
263 ClientCertificateType ClientCertType;
264 DOMString? Identity;
265 DOMString? Inner;
266 DOMString Outer;
267 DOMString? Password;
268 boolean? SaveCredentials;
269 DOMString[]? ServerCARefs;
270 boolean? UseProactiveKeyCaching;
271 boolean? UseSystemCAs;
272 };
273
274 dictionary FoundNetworkProperties {
275 // Network availability.
276 DOMString Status;
277 // Network ID.
278 DOMString NetworkId;
279 // Access technology used by the network.
280 DOMString Technology;
281 // The network operator's short-format name.
282 DOMString? ShortName;
283 // The network operator's long-format name.
284 DOMString? LongName;
285 };
286
287 dictionary IPConfigProperties {
288 // Gateway address used for the IP configuration.
289 DOMString? Gateway;
290 // The IP address for a connection. Can be IPv4 or IPv6 address, depending
291 // on value of <code>Type</code>.
292 DOMString? IPAddress;
293 // Array of addresses used for name servers.
294 DOMString[]? NameServers;
295 // The routing prefix.
296 long? RoutingPrefix;
297 // The IP configuration type. Can be <code>IPv4</code> or <code>IPv6</code>.
298 DOMString? Type;
299 // The URL for WEb Proxy Auto-Discovery, as reported over DHCP.
300 DOMString? WebProxyAutoDiscoveryUrl;
301 };
302
303 dictionary ManagedIPConfigProperties {
304 // See $(ref:IPConfigProperties.Gateway).
305 ManagedDOMString? Gateway;
306 // See $(ref:IPConfigProperties.IPAddress).
307 ManagedDOMString? IPAddress;
308 // See $(ref:IPConfigProperties.NameServers).
309 ManagedDOMStringList? NameServers;
310 // See $(ref:IPConfigProperties.RoutingPrefix).
311 ManagedLong? RoutingPrefix;
312 // See $(ref:IPConfigProperties.Type).
313 ManagedDOMString? Type;
314 // See $(ref:IPConfigProperties.WebProxyAutoDiscoveryUrl).
315 ManagedDOMString? WebProxyAutoDiscoveryUrl;
316 };
317
318 dictionary PaymentPortal {
319 // The HTTP method to use for the payment portal.
320 DOMString Method;
321 // The post data to send to the payment portal. Ignored unless
322 // <code>Method</code> is <code>POST</code>.
323 DOMString? PostData;
324 // The payment portal URL.
325 DOMString? Url;
326 };
327
328 dictionary ProxyLocation {
329 // The proxy IP address host.
330 DOMString Host;
331 // The port to use for the proxy.
332 long Port;
333 };
334
335 dictionary ManagedProxyLocation {
336 // See $(ref:ProxyLocation.Host).
337 ManagedDOMString Host;
338 // See $(ref:ProxyLocation.Port).
339 ManagedLong Port;
340 };
341
342 [noinline_doc] dictionary ManualProxySettings {
343 // Settings for HTTP proxy.
344 ProxyLocation? HTTPProxy;
345 // Settings for secure HTTP proxy.
346 ProxyLocation? SecureHTTPProxy;
347 // Settings for FTP proxy.
348 ProxyLocation? FTPProxy;
349 // Settings for SOCKS proxy.
350 ProxyLocation? SOCKS;
351 };
352
353 dictionary ManagedManualProxySettings {
354 // See $(ref:ManualProxySettings.HTTPProxy).
355 ManagedProxyLocation? HTTPProxy;
356 // See $(ref:ManualProxySettings.SecureHTTPProxy).
357 ManagedProxyLocation? SecureHTTPProxy;
358 // See $(ref:ManualProxySettings.FTPProxy).
359 ManagedProxyLocation? FTPProxy;
360 // See $(ref:ManualProxySettings.SOCKS).
361 ManagedProxyLocation? SOCKS;
362 };
363
364 [noinline_doc] dictionary ProxySettings {
365 // The type of proxy settings.
366 ProxySettingsType Type;
367 // Manual proxy settings - used only for <code>Manual</code> proxy settings.
368 ManualProxySettings? Manual;
369 // Domains and hosts for which manual proxy settings are excluded.
370 DOMString[]? ExcludeDomains;
371 // URL for proxy auto-configuration file.
372 DOMString? PAC;
373 };
374
375 dictionary ManagedProxySettings {
376 // See $(ref:ProxySettings.Type).
377 ManagedProxySettingsType Type;
378 // See $(ref:ProxySettings.Manual).
379 ManagedManualProxySettings? Manual;
380 // See $(ref:ProxySettings.ExcludeDomains).
381 ManagedDOMStringList? ExcludeDomains;
382 // See $(ref:ProxySettings.PAC).
383 ManagedDOMString? PAC;
384 };
385
386 dictionary SIMLockStatus {
387 // The status of SIM lock - possible values are <code>'sim-pin'</code>,
388 // <code>'sim-puk'</code> and <code>''</code>.
389 DOMString LockType;
390 // Whether SIM lock is enabled.
391 boolean LockEnabled;
392 // Number of PIN lock tries allowed before PUK is required to unlock the
393 // SIM.
394 long? RetriesLeft;
395 };
396
397 dictionary ThirdPartyVPNProperties {
398 // ID of the third-party VPN provider extension.
399 DOMString ExtensionID;
400 // The VPN provider name.
401 DOMString? ProviderName;
402 };
403
404 dictionary ManagedThirdPartyVPNProperties {
405 // See $(ref:ThirdPartyVPNProperties.ExtensionID).
406 ManagedDOMString ExtensionID;
407 // See $(ref:ThirdPartyVPNProperties.ProviderName).
408 DOMString? ProviderName;
409 };
410
411 // Network type dictionary types.
412
413 [noinline_doc] dictionary CellularProperties {
414 // Whether the cellular network should be connected automatically (when
415 // in range).
416 boolean? AutoConnect;
417 // The cellular network activation type.
418 DOMString? ActivationType;
419 // Carrier account activation state.
420 ActivationStateType? ActivationState;
421 // Whether roaming is allowed for the network.
422 boolean? AllowRoaming;
423 // The name of the carrier for which the cellular device is configured.
424 DOMString? Carrier;
425 // Cellular device technology family - <code>CDMA</code> or
426 // <code>GSM</code>.
427 DOMString? Family;
428 // The firmware revision loaded in the cellular modem.
429 DOMString? FirmwareRevision;
430 // The list of networks found during the most recent network scan.
431 FoundNetworkProperties[]? FoundNetworks;
432 // The cellular modem hardware revision.
433 DOMString? HardwareRevision;
434 // Information about the operator that issued the SIM card currently
435 // installed in the modem.
436 CellularProviderProperties? HomeProvider;
437 // The cellular modem manufacturer.
438 DOMString? Manufacturer;
439 // The cellular modem model ID.
440 DOMString? ModelID;
441 // If the modem is registered on a network, the network technology
442 // currently in use.
443 DOMString? NetworkTechnology;
444 // Online payment portal a user can use to sign-up for or modify a mobile
445 // data plan.
446 PaymentPortal? PaymentPortal;
447 // The revision of the Preferred Roaming List loaded in the modem.
448 long? PRLVersion;
449 // The roaming state of the cellular modem on the current network.
450 DOMString? RoamingState;
451 // Information about the operator on whose network the modem is currently
452 // registered.
453 CellularProviderProperties? ServingOperator;
454 // The state of SIM lock for GSM family networks.
455 SIMLockStatus? SIMLockStatus;
456 // Whether a SIM card is present.
457 boolean? SIMPresent;
458 // The current network signal strength.
459 long? SignalStrength;
460 // Whether the cellular network supports scanning.
461 boolean? SupportNetworkScan;
462 // A list of supported carriers.
463 DOMString[]? SupportedCarriers;
464 };
465
466 dictionary ManagedCellularProperties {
467 // See $(ref:CellularProperties.AutoConnect).
468 ManagedBoolean? AutoConnect;
469 // See $(ref:CellularProperties.ActivationType).
470 DOMString? ActivationType;
471 // See $(ref:CellularProperties.ActivationState).
472 ActivationStateType? ActivationState;
473 // See $(ref:CellularProperties.AllowRoaming).
474 boolean? AllowRoaming;
475 // See $(ref:CellularProperties.Carrier).
476 ManagedDOMString? Carrier;
477 // See $(ref:CellularProperties.Family).
478 DOMString? Family;
479 // See $(ref:CellularProperties.FirmwareRevision).
480 DOMString? FirmwareRevision;
481 // See $(ref:CellularProperties.FoundNetworks).
482 FoundNetworkProperties[]? FoundNetworks;
483 // See $(ref:CellularProperties.HardwareRevision).
484 DOMString? HardwareRevision;
485 // See $(ref:CellularProperties.HomeProvider).
486 CellularProviderProperties[]? HomeProvider;
487 // See $(ref:CellularProperties.Manufacturer).
488 DOMString? Manufacturer;
489 // See $(ref:CellularProperties.ModelID).
490 DOMString? ModelID;
491 // See $(ref:CellularProperties.NetworkTechnology).
492 DOMString? NetworkTechnology;
493 // See $(ref:CellularProperties.PaymentPortal).
494 PaymentPortal? PaymentPortal;
495 // See $(ref:CellularProperties.PRLVersion).
496 long? PRLVersion;
497 // See $(ref:CellularProperties.RoamingState).
498 DOMString? RoamingState;
499 // See $(ref:CellularProperties.ServingOperator).
500 CellularProviderProperties? ServingOperator;
501 // See $(ref:CellularProperties.SIMLockStatus).
502 SIMLockStatus? SIMLockStatus;
503 // See $(ref:CellularProperties.SIMPresent).
504 boolean? SIMPresent;
505 // See $(ref:CellularProperties.SignalStrength).
506 long? SignalStrength;
507 // See $(ref:CellularProperties.SupportNetworkScan).
508 boolean? SupportNetworkScan;
509 // See $(ref:CellularProperties.SupportedCarriers).
510 DOMString[]? SupportedCarriers;
511 };
512
513 dictionary CellularStateProperties {
514 // See $(ref:CellularProperties.ActivationState).
515 ActivationStateType? ActivationState;
516 // See $(ref:CellularProperties.NetworkTechnology).
517 DOMString? NetworkTechnology;
518 // See $(ref:CellularProperties.RoamingState).
519 DOMString? RoamingState;
520 // See $(ref:CellularProperties.SIMPresent).
521 boolean? SIMPresent;
522 // See $(ref:CellularProperties.SignalStrength).
523 long? SignalStrength;
524 };
525
526 dictionary EthernetProperties {
527 // Whether the Ethernet network should be connected automatically.
528 boolean? AutoConnect;
529 // The authentication used by the Ethernet network. Possible values are
530 // <code>None</code> and <code>8021X</code>.
531 DOMString? Authentication;
532 // Network's EAP settings. Required for 8021X authentication.
533 EAPProperties? EAP;
534 };
535
536 dictionary ManagedEthernetProperties {
537 // See $(ref:EthernetProperties.AutoConnect).
538 ManagedBoolean? AutoConnect;
539 // See $(ref:EthernetProperties.Authentication).
540 ManagedDOMString? Authentication;
541 };
542
543 dictionary EthernetStateProperties {
544 // See $(ref:EthernetProperties.Authentication).
545 DOMString Authentication;
546 };
547
548 dictionary VPNProperties {
549 // Whether the VPN network should be connected automatically.
550 boolean? AutoConnect;
551 // The VPN host.
552 DOMString? Host;
553 // The VPN type.
554 DOMString? Type;
555 };
556
557 dictionary ManagedVPNProperties {
558 // See $(ref:VPNProperties.AutoConnect).
559 ManagedBoolean? AutoConnect;
560 // See $(ref:VPNProperties.Host).
561 ManagedDOMString? Host;
562 // See $(ref:VPNProperties.Type).
563 ManagedDOMString Type;
564 };
565
566 dictionary VPNStateProperties {
567 // See $(ref:VPNProperties.Type).
568 DOMString Type;
569 };
570
571 [noinline_doc] dictionary WiFiProperties {
572 // Whether ARP polling of default gateway is allowed. Defaults to true.
573 boolean? AllowGatewayARPPolling;
574 // Whether the WiFi network should be connected automatically when in range.
575 boolean? AutoConnect;
576 // The BSSID of the associated access point..
577 DOMString? BSSID;
578 // The network EAP properties. Required for <code>WEP-8021X</code> and
579 // <code>WPA-EAP</code> networks.
580 EAPProperties? EAP;
581 // The WiFi service operating frequency in MHz. For connected networks, the
582 // current frequency on which the network is connected. Otherwise, the
583 // frequency of the best available BSS.
584 long? Frequency;
585 // Contains all operating frequency recently seen for the WiFi network.
586 long[]? FrequencyList;
587 // HEX-encoded copy of the network SSID.
588 DOMString? HexSSID;
589 // Whether the network SSID will be broadcast.
590 boolean? HiddenSSID;
591 // Signal-to-noise value (in dB) below which roaming to a new network
592 // should be attempted.
593 long? RoamThreshold;
594 // The network SSID.
595 DOMString? SSID;
596 // The network security type.
597 DOMString? Security;
598 // The network signal strength.
599 long? SignalStrength;
600 };
601
602 dictionary ManagedWiFiProperties {
603 // See $(ref:WiFiProperties.AllowGatewayARPPolling).
604 ManagedBoolean? AllowGatewayARPPolling;
605 // See $(ref:WiFiProperties.AutoConnect).
606 ManagedBoolean? AutoConnect;
607 // See $(ref:WiFiProperties.BSSID).
608 DOMString? BSSID;
609 // See $(ref:WiFiProperties.Frequency).
610 long? Frequency;
611 // See $(ref:WiFiProperties.FrequencyList).
612 long[]? FrequencyList;
613 // See $(ref:WiFiProperties.HexSSID).
614 ManagedDOMString? HexSSID;
615 // See $(ref:WiFiProperties.HiddenSSID).
616 ManagedBoolean? HiddenSSID;
617 // See $(ref:WiFiProperties.RoamThreshold).
618 ManagedLong? RoamThreshold;
619 // See $(ref:WiFiProperties.SSID).
620 ManagedDOMString? SSID;
621 // See $(ref:WiFiProperties.Security).
622 ManagedDOMString Security;
623 // See $(ref:WiFiProperties.SignalStrength).
624 long? SignalStrength;
625 };
626
627 dictionary WiFiStateProperties {
628 // See $(ref:WiFiProperties.BSSID).
629 DOMString? BSSID;
630 // See $(ref:WiFiProperties.Frequency).
631 long? Frequency;
632 // See $(ref:WiFiProperties.Security).
633 DOMString Security;
634 // See $(ref:WiFiProperties.SignalStrength).
635 long? SignalStrength;
636 };
637
638 dictionary WiMAXProperties {
639 // Whether the network should be connected automatically.
640 boolean? AutoConnect;
641 // The network EAP properties.
642 EAPProperties? EAP;
643 // The network signal strength.
644 long? SignalStrength;
645 };
646
647 dictionary ManagedWiMAXProperties {
648 // See $(ref:WiMAXProperties.AutoConnect).
649 ManagedBoolean? AutoConnect;
650 // See $(ref:WiMAXProperties.SignalStrength).
651 long? SignalStrength;
652 };
653
654 dictionary WiMAXStateProperties {
655 // See $(ref:WiMAXProperties.SignalStrength).
656 long? SignalStrength;
657 };
658
659 dictionary NetworkConfigProperties {
660 // See $(ref:NetworkProperties.Cellular).
661 CellularProperties? Cellular;
662 // See $(ref:NetworkProperties.Ethernet).
663 EthernetProperties? Ethernet;
664 // See $(ref:NetworkProperties.GUID).
665 DOMString? GUID;
666 // See $(ref:NetworkProperties.IPAddressConfigType).
667 IPConfigType? IPAddressConfigType;
668 // See $(ref:NetworkProperties.Name).
669 DOMString? Name;
670 // See $(ref:NetworkProperties.NameServersConfigType).
671 IPConfigType? NameServersConfigType;
672 // See $(ref:NetworkProperties.Priority).
673 long? Priority;
674 // See $(ref:NetworkProperties.Type).
675 NetworkType? Type;
676 // See $(ref:NetworkProperties.VPN).
677 VPNProperties? VPN;
678 // See $(ref:NetworkProperties.WiFi).
679 WiFiProperties? WiFi;
680 // See $(ref:NetworkProperties.WiMAX).
681 WiMAXProperties? WiMAX;
682 };
683
684 [noinline_doc]
685 dictionary NetworkProperties {
686 // For cellular networks, cellular network properties.
687 CellularProperties? Cellular;
688 // Whether the network is connectable.
689 boolean? Connectable;
690 // The network's current connection state.
691 ConnectionStateType? ConnectionState;
692 // The last recorded network error state.
693 DOMString? ErrorState;
694 // For Ethernet networks, the Ethernet network properties.
695 EthernetProperties? Ethernet;
696 // The network GUID.
697 DOMString GUID;
698 // The network's IP address configuration type.
699 IPConfigType? IPAddressConfigType;
700 // The network's IP configuration.
701 IPConfigProperties[]? IPConfigs;
702 // The network's MAC address.
703 DOMString? MacAddress;
704 // A user friendly network name.
705 DOMString? Name;
706 // The IP configuration type for the name servers used by the network.
707 IPConfigType? NameServersConfigType;
708 // The network priority.
709 long? Priority;
710 // The network's proxy settings.
711 ProxySettings? ProxySettings;
712 // For a connected network, whether the network connectivity to the
713 // Internet is limited, e.g. if the network is behind a portal, or a
714 // cellular network is not activated.
715 boolean? RestrictedConnectivity;
716 // The network's static IP configuration.
717 IPConfigProperties? StaticIPConfig;
718 // IP configuration that was received from the DHCP server before applying
719 // static IP configuration.
720 IPConfigProperties? SavedIPConfig;
721 // Indicates whether and how the network is configured.
722 DOMString? Source;
723 // The network type.
724 NetworkType Type;
725 // For VPN networks, the network VPN properties.
726 VPNProperties? VPN;
727 // For WiFi networks, the network WiFi properties.
728 WiFiProperties? WiFi;
729 // For WiMAX networks, the network WiMAX properties.
730 WiMAXProperties? WiMAX;
731 };
732
733 [noinline_doc]
734 dictionary ManagedProperties {
735 // See $(ref:NetworkProperties.Cellular).
736 ManagedCellularProperties? Cellular;
737 // See $(ref:NetworkProperties.Connectable).
738 boolean? Connectable;
739 // See $(ref:NetworkProperties.ConnectionState).
740 ConnectionStateType? ConnectionState;
741 // See $(ref:NetworkProperties.ErrorState).
742 DOMString? ErrorState;
743 // See $(ref:NetworkProperties.Ethernet).
744 ManagedEthernetProperties? Ethernet;
745 // See $(ref:NetworkProperties.GUID).
746 DOMString GUID;
747 // See $(ref:NetworkProperties.IPAddressConfigType).
748 ManagedIPConfigType? IPAddressConfigType;
749 // See $(ref:NetworkProperties.IPConfigs).
750 IPConfigProperties[]? IPConfigs;
751 // See $(ref:NetworkProperties.MacAddress).
752 DOMString? MacAddress;
753 // See $(ref:NetworkProperties.Name).
754 ManagedDOMString? Name;
755 // See $(ref:NetworkProperties.NameServersConfigType).
756 ManagedIPConfigType? NameServersConfigType;
757 // See $(ref:NetworkProperties.Priority).
758 ManagedLong? Priority;
759 // See $(ref:NetworkProperties.ProxySettings).
760 ManagedProxySettings? ProxySettings;
761 // See $(ref:NetworkProperties.RestrictedConnectivity).
762 boolean? RestrictedConnectivity;
763 // See $(ref:NetworkProperties.StaticIPConfig).
764 ManagedIPConfigProperties? StaticIPConfig;
765 // See $(ref:NetworkProperties.SavedIPConfig).
766 IPConfigProperties? SavedIPConfig;
767 // See $(ref:NetworkProperties.Source).
768 DOMString? Source;
769 // See $(ref:NetworkProperties.Type).
770 NetworkType Type;
771 // See $(ref:NetworkProperties.VPN).
772 ManagedVPNProperties? VPN;
773 // See $(ref:NetworkProperties.WiFi).
774 ManagedWiFiProperties? WiFi;
775 // See $(ref:NetworkProperties.WiMAX).
776 ManagedWiMAXProperties? WiMAX;
777 };
778
779 dictionary NetworkStateProperties {
780 // See $(ref:NetworkProperties.Cellular).
781 CellularStateProperties? Cellular;
782 // See $(ref:NetworkProperties.Connectable).
783 boolean? Connectable;
784 // See $(ref:NetworkProperties.ConnectionState).
785 ConnectionStateType? ConnectionState;
786 // See $(ref:NetworkProperties.Ethernet).
787 EthernetStateProperties? Ethernet;
788 // See $(ref:NetworkProperties.ErrorState).
789 DOMString? ErrorState;
790 // See $(ref:NetworkProperties.GUID).
791 DOMString GUID;
792 // See $(ref:NetworkProperties.Name).
793 DOMString? Name;
794 // See $(ref:NetworkProperties.Priority).
795 long? Priority;
796 // See $(ref:NetworkProperties.Source).
797 DOMString? Source;
798 // See $(ref:NetworkProperties.Type).
799 NetworkType Type;
800 // See $(ref:NetworkProperties.VPN).
801 VPNStateProperties? VPN;
802 // See $(ref:NetworkProperties.WiFi).
803 WiFiStateProperties? WiFi;
804 // See $(ref:NetworkProperties.WiMAX).
805 WiMAXStateProperties? WiMAX;
806 };
807
808 dictionary DeviceStateProperties {
809 // Set if the device is enabled. True if the device is currently scanning.
810 boolean? Scanning;
811
812 // Set to the SIM lock type if the device type is Cellular and the device
813 // is locked.
814 DOMString? SimLockType;
815
816 // Set to the SIM present state if the device type is Cellular.
817 boolean? SimPresent;
818
819 // The current state of the device.
820 DeviceStateType State;
821
822 // The network type associated with the device (Cellular, Ethernet, WiFi, or
823 // WiMAX).
824 NetworkType Type;
825 };
826
827 dictionary NetworkFilter {
828 // The type of networks to return.
829 NetworkType networkType;
830
831 // If true, only include visible (physically connected or in-range)
832 // networks. Defaults to 'false'.
833 boolean? visible;
834
835 // If true, only include configured (saved) networks. Defaults to 'false'.
836 boolean? configured;
837
838 // Maximum number of networks to return. Defaults to 1000 if unspecified.
839 // Use 0 for no limit.
840 long? limit;
841 };
842
843 dictionary GlobalPolicy {
844 // If true, only policy networks may auto connect. Defaults to false.
845 boolean? AllowOnlyPolicyNetworksToAutoconnect;
846
847 // If true, only policy networks may be connected to and no new networks may
848 // be added or configured. Defaults to false.
849 boolean? AllowOnlyPolicyNetworksToConnect;
850 };
851
852 callback VoidCallback = void();
853 callback BooleanCallback = void(boolean result);
854 callback StringCallback = void(DOMString result);
855 callback GetPropertiesCallback = void(NetworkProperties result);
856 callback GetManagedPropertiesCallback = void(ManagedProperties result);
857 callback GetStatePropertiesCallback = void(NetworkStateProperties result);
858 callback GetNetworksCallback = void(NetworkStateProperties[] result);
859 callback GetDeviceStatesCallback = void(DeviceStateProperties[] result);
860 callback GetEnabledNetworkTypesCallback = void(NetworkType[] result);
861 callback CaptivePortalStatusCallback = void(CaptivePortalStatus result);
862 callback GetGlobalPolicyCallback = void(GlobalPolicy result);
863
864 interface Functions {
865 // Gets all the properties of the network with id networkGuid. Includes all
866 // properties of the network (read-only and read/write values).
867 // |networkGuid|: The GUID of the network to get properties for.
868 // |callback|: Called with the network properties when received.
869 static void getProperties(DOMString networkGuid,
870 GetPropertiesCallback callback);
871
872 // Gets the merged properties of the network with id networkGuid from the
873 // sources: User settings, shared settings, user policy, device policy and
874 // the currently active settings.
875 // |networkGuid|: The GUID of the network to get properties for.
876 // |callback|: Called with the managed network properties when received.
877 static void getManagedProperties(DOMString networkGuid,
878 GetManagedPropertiesCallback callback);
879
880 // Gets the cached read-only properties of the network with id networkGuid.
881 // This is meant to be a higher performance function than
882 // $(ref:getProperties), which requires a round trip to query the networking
883 // subsystem. The following properties are returned for all networks: GUID,
884 // Type, Name, WiFi.Security. Additional properties are provided for visible
885 // networks: ConnectionState, ErrorState, WiFi.SignalStrength,
886 // Cellular.NetworkTechnology, Cellular.ActivationState,
887 // Cellular.RoamingState.
888 // |networkGuid|: The GUID of the network to get properties for.
889 // |callback|: Called immediately with the network state properties.
890 static void getState(DOMString networkGuid,
891 GetStatePropertiesCallback callback);
892
893 // Sets the properties of the network with id networkGuid.
894 // <b>
895 // In kiosk sessions, calling this method on a shared network will fail.
896 // </b>
897 // |networkGuid|: The GUID of the network to set properties for.
898 // |properties|: The properties to set.
899 // |callback|: Called when the operation has completed.
900 static void setProperties(DOMString networkGuid,
901 NetworkConfigProperties properties,
902 optional VoidCallback callback);
903
904 // Creates a new network configuration from properties. If a matching
905 // configured network already exists, this will fail. Otherwise returns the
906 // GUID of the new network.
907 // |shared|: <p>
908 // If <code>true</code>, share this network configuration with
909 // other users.
910 // </p>
911 // <p>
912 // <b>This option is exposed only to Chrome's Web UI.</b>
913 // When called by apps, <code>false</code> is the only allowed value.
914 // </p>
915 // |properties|: The properties to configure the new network with.
916 // |callback|: Called with the GUID for the new network configuration once
917 // the network has been created.
918 static void createNetwork(boolean shared,
919 NetworkConfigProperties properties,
920 optional StringCallback callback);
921
922 // <p>
923 // Forgets a network configuration by clearing any configured properties
924 // for the network with GUID <code>networkGuid</code>. This may also
925 // include any other networks with matching identifiers (e.g. WiFi SSID
926 // and Security). If no such configuration exists, an error will be set
927 // and the operation will fail.
928 // </p>
929 // <p>
930 // <b>In kiosk sessions, this method will not be able to forget shared
931 // network configurations.</b>
932 // </p>
933 // |networkGuid|: The GUID of the network to forget.
934 // |callback|: Called when the operation has completed.
935 static void forgetNetwork(DOMString networkGuid,
936 optional VoidCallback callback);
937
938 // Returns a list of network objects with the same properties provided by
939 // $(ref:getState). A filter is provided to specify the
940 // type of networks returned and to limit the number of networks. Networks
941 // are ordered by the system based on their priority, with connected or
942 // connecting networks listed first.
943 // |filter|: Describes which networks to return.
944 // |callback|: Called with a dictionary of networks and their state
945 // properties when received.
946 static void getNetworks(NetworkFilter filter,
947 GetNetworksCallback callback);
948
949 // Returns states of available networking devices.
950 // |callback|: Called with a list of devices and their state.
951 static void getDeviceStates(GetDeviceStatesCallback callback);
952
953 // Enables any devices matching the specified network type. Note, the type
954 // might represent multiple network types (e.g. 'Wireless').
955 // |networkType|: The type of network to enable.
956 static void enableNetworkType(NetworkType networkType);
957
958 // Disables any devices matching the specified network type. See note for
959 // $(ref:enableNetworkType).
960 // |networkType|: The type of network to disable.
961 static void disableNetworkType(NetworkType networkType);
962
963 // Requests that the networking subsystem scan for new networks and
964 // update the list returned by $(ref:getNetworks). This is only a
965 // request: the network subsystem can choose to ignore it. If the list
966 // is updated, then the $(ref:onNetworkListChanged) event will be fired.
967 static void requestNetworkScan();
968
969 // Starts a connection to the network with networkGuid.
970 // |networkGuid|: The GUID of the network to connect to.
971 // |callback|: Called when the connect request has been sent. Note: the
972 // connection may not have completed. Observe $(ref:onNetworksChanged)
973 // to be notified when a network state changes.
974 static void startConnect(DOMString networkGuid,
975 optional VoidCallback callback);
976
977 // Starts a disconnect from the network with networkGuid.
978 // |networkGuid|: The GUID of the network to disconnect from.
979 // |callback|: Called when the disconnect request has been sent. See note
980 // for $(ref:startConnect).
981 static void startDisconnect(DOMString networkGuid,
982 optional VoidCallback callback);
983
984 // Returns captive portal status for the network matching 'networkGuid'.
985 // |networkGuid|: The GUID of the network to get captive portal status for.
986 // |callback|: A callback function that returns the results of the query for
987 // network captive portal status.
988 static void getCaptivePortalStatus(DOMString networkGuid,
989 CaptivePortalStatusCallback callback);
990
991 // Gets the global policy properties. These properties are not expected to
992 // change during a session.
993 static void getGlobalPolicy(GetGlobalPolicyCallback callback);
994 };
995
996 interface Events {
997 // Fired when the properties change on any of the networks. Sends a list of
998 // GUIDs for networks whose properties have changed.
999 static void onNetworksChanged(DOMString[] changes);
1000
1001 // Fired when the list of networks has changed. Sends a complete list of
1002 // GUIDs for all the current networks.
1003 static void onNetworkListChanged(DOMString[] changes);
1004
1005 // Fired when the list of devices has changed or any device state properties
1006 // have changed.
1007 static void onDeviceStateListChanged();
1008
1009 // Fired when a portal detection for a network completes. Sends the GUID of
1010 // the network and the corresponding captive portal status.
1011 static void onPortalDetectionCompleted(DOMString networkGuid,
1012 CaptivePortalStatus status);
1013 };
1014 };
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