1/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5
6/*
7  For parsing JSON from http://httpwg.org/http-extensions/opsec.html
8*/
9
10#include "nsISupports.idl"
11
12%{C++
13#define NS_WELLKNOWNOPPORTUNISTICUTILS_CONTRACTID "@mozilla.org/network/well-known-opportunistic-utils;1"
14%}
15
16[scriptable, uuid(b4f96c89-5238-450c-8bda-e12c26f1d150)]
17interface nsIWellKnownOpportunisticUtils : nsISupports
18{
19    [must_use] void verify(in ACString aJSON,
20               in ACString  aOrigin,
21               in long      aAlternatePort);
22
23    [must_use] readonly attribute bool valid;
24    [must_use] readonly attribute bool mixed; /* mixed-scheme */
25    [must_use] readonly attribute long lifetime;
26};
27