From 26a029d407be480d791972afb5975cf62c9360a6 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 02:47:55 +0200 Subject: Adding upstream version 124.0.1. Signed-off-by: Daniel Baumann --- .../extensions/schemas/network_status.json | 66 ++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 toolkit/components/extensions/schemas/network_status.json (limited to 'toolkit/components/extensions/schemas/network_status.json') diff --git a/toolkit/components/extensions/schemas/network_status.json b/toolkit/components/extensions/schemas/network_status.json new file mode 100644 index 0000000000..bf2c9cb494 --- /dev/null +++ b/toolkit/components/extensions/schemas/network_status.json @@ -0,0 +1,66 @@ +[ + { + "namespace": "manifest", + "types": [ + { + "$extend": "PermissionPrivileged", + "choices": [ + { + "type": "string", + "enum": ["networkStatus"] + } + ] + } + ] + }, + { + "namespace": "networkStatus", + "description": "This API provides the ability to determine the status of and detect changes in the network connection. This API can only be used in privileged extensions.", + "permissions": ["networkStatus"], + "types": [ + { + "id": "NetworkLinkInfo", + "type": "object", + "properties": { + "status": { + "type": "string", + "enum": ["unknown", "up", "down"], + "description": "Status of the network link, if \"unknown\" then link is usually assumed to be \"up\"" + }, + "type": { + "type": "string", + "enum": ["unknown", "ethernet", "usb", "wifi", "wimax", "mobile"], + "description": "If known, the type of network connection that is avialable." + }, + "id": { + "type": "string", + "optional": true, + "description": "If known, the network id or name." + } + } + } + ], + "functions": [ + { + "name": "getLinkInfo", + "type": "function", + "description": "Returns the $(ref:NetworkLinkInfo} of the current network connection.", + "async": true, + "parameters": [] + } + ], + "events": [ + { + "name": "onConnectionChanged", + "type": "function", + "description": "Fired when the network connection state changes.", + "parameters": [ + { + "name": "details", + "$ref": "NetworkLinkInfo" + } + ] + } + ] + } +] -- cgit v1.2.3