IOnionAliasService.idl (914B)
1 #include "nsISupports.idl" 2 3 /** 4 * Service used for .tor.onion aliases. 5 * It stores the real .onion address that correspond to .tor.onion addresses, 6 * so that both C++ code and JS can access them. 7 */ 8 [scriptable, uuid(0df7784b-7316-486d-bc99-bf47b7a05974)] 9 interface IOnionAliasService : nsISupports 10 { 11 /** 12 * Add a new Onion alias 13 * @param aShortHostname 14 * The short hostname that is being rewritten 15 * @param aLongHostname 16 * The complete onion v3 hostname 17 */ 18 void addOnionAlias(in ACString aShortHostname, 19 in ACString aLongHostname); 20 21 /** 22 * Return an onion alias. 23 * 24 * @param aShortHostname 25 * The .tor.onion hostname to resolve 26 * @return a v3 address, or the input, if the short hostname is not known 27 */ 28 ACString getOnionAlias(in ACString aShortHostname); 29 30 /** 31 * Clears Onion aliases. 32 */ 33 void clearOnionAliases(); 34 };