toolkit/components/captivedetect/nsICaptivePortalDetector.idl

branch
TOR_BUG_9701
changeset 14
925c144e1f1f
equal deleted inserted replaced
-1:000000000000 0:ccb5d6a57f8a
1 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
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 #include "nsISupports.idl"
7
8 [scriptable, uuid(593fdeec-6284-4de8-b416-8e63cbdc695e)]
9 interface nsICaptivePortalCallback : nsISupports
10 {
11 /**
12 * Preparation for network interface before captive portal detection started.
13 */
14 void prepare();
15
16 /**
17 * Invoke callbacks after captive portal detection finished.
18 */
19 void complete(in bool success);
20 };
21
22 [scriptable, uuid(2f827c5a-f551-477f-af09-71adbfbd854a)]
23 interface nsICaptivePortalDetector : nsISupports
24 {
25 /**
26 * Perform captive portal detection on specific network interface.
27 * @param ifname The name of network interface, exception will be thrwon
28 * if the same interface has unfinished request.
29 * @param callback Callbacks when detection procedure starts and finishes.
30 */
31 void checkCaptivePortal(in wstring ifname,
32 in nsICaptivePortalCallback callback);
33
34 /**
35 * Abort captive portal detection for specific network interface
36 * due to system failure, callback will not be invoked.
37 * @param ifname The name of network interface.
38 */
39 void abort(in wstring ifname);
40
41 /**
42 * Cancel captive portal login procedure by user, callback will be invoked.
43 * @param eventId Login event id provided in |captive-portal-login| event.
44 */
45 void cancelLogin(in wstring eventId);
46
47 /**
48 * Notify prepare phase is finished, routing and dns must be ready for sending
49 * out XMLHttpRequest. this is callback for CaptivePortalDetector API user.
50 * @param ifname The name of network interface, must be unique.
51 */
52 void finishPreparation(in wstring ifname);
53 };

mercurial