toolkit/components/captivedetect/nsICaptivePortalDetector.idl

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

michael@0 1 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
michael@0 2 /* This Source Code Form is subject to the terms of the Mozilla Public
michael@0 3 * License, v. 2.0. If a copy of the MPL was not distributed with this
michael@0 4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
michael@0 5
michael@0 6 #include "nsISupports.idl"
michael@0 7
michael@0 8 [scriptable, uuid(593fdeec-6284-4de8-b416-8e63cbdc695e)]
michael@0 9 interface nsICaptivePortalCallback : nsISupports
michael@0 10 {
michael@0 11 /**
michael@0 12 * Preparation for network interface before captive portal detection started.
michael@0 13 */
michael@0 14 void prepare();
michael@0 15
michael@0 16 /**
michael@0 17 * Invoke callbacks after captive portal detection finished.
michael@0 18 */
michael@0 19 void complete(in bool success);
michael@0 20 };
michael@0 21
michael@0 22 [scriptable, uuid(2f827c5a-f551-477f-af09-71adbfbd854a)]
michael@0 23 interface nsICaptivePortalDetector : nsISupports
michael@0 24 {
michael@0 25 /**
michael@0 26 * Perform captive portal detection on specific network interface.
michael@0 27 * @param ifname The name of network interface, exception will be thrwon
michael@0 28 * if the same interface has unfinished request.
michael@0 29 * @param callback Callbacks when detection procedure starts and finishes.
michael@0 30 */
michael@0 31 void checkCaptivePortal(in wstring ifname,
michael@0 32 in nsICaptivePortalCallback callback);
michael@0 33
michael@0 34 /**
michael@0 35 * Abort captive portal detection for specific network interface
michael@0 36 * due to system failure, callback will not be invoked.
michael@0 37 * @param ifname The name of network interface.
michael@0 38 */
michael@0 39 void abort(in wstring ifname);
michael@0 40
michael@0 41 /**
michael@0 42 * Cancel captive portal login procedure by user, callback will be invoked.
michael@0 43 * @param eventId Login event id provided in |captive-portal-login| event.
michael@0 44 */
michael@0 45 void cancelLogin(in wstring eventId);
michael@0 46
michael@0 47 /**
michael@0 48 * Notify prepare phase is finished, routing and dns must be ready for sending
michael@0 49 * out XMLHttpRequest. this is callback for CaptivePortalDetector API user.
michael@0 50 * @param ifname The name of network interface, must be unique.
michael@0 51 */
michael@0 52 void finishPreparation(in wstring ifname);
michael@0 53 };

mercurial