summaryrefslogtreecommitdiffstats
path: root/toolkit/components/extensions/schemas/captive_portal.json
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 09:22:09 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 09:22:09 +0000
commit43a97878ce14b72f0981164f87f2e35e14151312 (patch)
tree620249daf56c0258faa40cbdcf9cfba06de2a846 /toolkit/components/extensions/schemas/captive_portal.json
parentInitial commit. (diff)
downloadfirefox-43a97878ce14b72f0981164f87f2e35e14151312.tar.xz
firefox-43a97878ce14b72f0981164f87f2e35e14151312.zip
Adding upstream version 110.0.1.upstream/110.0.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'toolkit/components/extensions/schemas/captive_portal.json')
-rw-r--r--toolkit/components/extensions/schemas/captive_portal.json75
1 files changed, 75 insertions, 0 deletions
diff --git a/toolkit/components/extensions/schemas/captive_portal.json b/toolkit/components/extensions/schemas/captive_portal.json
new file mode 100644
index 0000000000..b6f4392d43
--- /dev/null
+++ b/toolkit/components/extensions/schemas/captive_portal.json
@@ -0,0 +1,75 @@
+[
+ {
+ "namespace": "manifest",
+ "types": [
+ {
+ "$extend": "PermissionNoPrompt",
+ "choices": [{
+ "type": "string",
+ "enum": [
+ "captivePortal"
+ ]
+ }]
+ }
+ ]
+ },
+ {
+ "namespace": "captivePortal",
+ "description": "This API provides the ability detect the captive portal state of the users connection.",
+ "permissions": ["captivePortal"],
+ "properties": {
+ "canonicalURL": {
+ "$ref": "types.Setting",
+ "description": "Return the canonical captive-portal detection URL. Read-only."
+ }
+ },
+ "functions": [
+ {
+ "name": "getState",
+ "type": "function",
+ "description": "Returns the current portal state, one of `unknown`, `not_captive`, `unlocked_portal`, `locked_portal`.",
+ "async": true,
+ "parameters": []
+ },
+ {
+ "name": "getLastChecked",
+ "type": "function",
+ "description": "Returns the time difference between NOW and the last time a request was completed in milliseconds.",
+ "async": true,
+ "parameters": []
+ }
+ ],
+ "events": [
+ {
+ "name": "onStateChanged",
+ "type": "function",
+ "description": "Fired when the captive portal state changes.",
+ "parameters": [
+ {
+ "type": "object",
+ "name": "details",
+ "properties": {
+ "state": {
+ "type": "string",
+ "enum": ["unknown", "not_captive", "unlocked_portal", "locked_portal"],
+ "description": "The current captive portal state."
+ }
+ }
+ }
+ ]
+ },
+ {
+ "name": "onConnectivityAvailable",
+ "type": "function",
+ "description": "This notification will be emitted when the captive portal service has determined that we can connect to the internet. The service will pass either `captive` if there is an unlocked captive portal present, or `clear` if no captive portal was detected.",
+ "parameters": [
+ {
+ "name": "status",
+ "enum": ["captive", "clear"],
+ "type": "string"
+ }
+ ]
+ }
+ ]
+ }
+]