nsIMockNetworkLayerController.idl (934B)
1 /* This Source Code Form is subject to the terms of the Mozilla Public 2 * License, v. 2.0. If a copy of the MPL was not distributed with this 3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 4 5 #include "nsISupports.idl" 6 7 interface nsINetAddr; 8 9 [scriptable, builtinclass, uuid(8ef68853-dbea-4113-9dce-273b45d431c5)] 10 interface nsIMockNetworkLayerController : nsISupports 11 { 12 13 nsINetAddr createScriptableNetAddr(in AUTF8String aIP, in uint16_t aPort); 14 15 /** 16 * Adds an override for this specific NetAddr. 17 */ 18 void addNetAddrOverride(in nsINetAddr aFrom, in nsINetAddr aTo); 19 20 /** 21 * Clears all the NetAddr overrides that were previously set. 22 */ 23 void clearNetAddrOverrides(); 24 25 /** 26 * This method prevents any UDP traffic to and from the given network address. 27 */ 28 void blockUDPAddrIO(in nsINetAddr aAddr); 29 30 /** 31 * Removes all entries from the UDP blocklist. 32 */ 33 void clearBlockedUDPAddr(); 34 };