2012-05-21 15:12:37 +04:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2007-02-28 02:49:44 +03:00
|
|
|
|
|
|
|
#include "nsISupports.idl"
|
|
|
|
/**
|
|
|
|
* Some utility methods used by the url classifier.
|
|
|
|
*/
|
|
|
|
|
2007-07-26 10:38:43 +04:00
|
|
|
interface nsIURI;
|
|
|
|
|
|
|
|
[scriptable, uuid(e4f0e59c-b922-48b0-a7b6-1735c1f96fed)]
|
2007-02-28 02:49:44 +03:00
|
|
|
interface nsIUrlClassifierUtils : nsISupports
|
|
|
|
{
|
|
|
|
/**
|
2007-07-26 10:38:43 +04:00
|
|
|
* Get the lookup string for a given URI. This normalizes the hostname,
|
|
|
|
* url-decodes the string, and strips off the protocol.
|
2007-02-28 02:49:44 +03:00
|
|
|
*
|
2007-07-26 10:38:43 +04:00
|
|
|
* @param uri URI to get the lookup key for.
|
2007-02-28 02:49:44 +03:00
|
|
|
*
|
2007-07-26 10:38:43 +04:00
|
|
|
* @returns String containing the canonicalized URI.
|
2007-03-05 08:58:05 +03:00
|
|
|
*/
|
2007-07-26 10:38:43 +04:00
|
|
|
ACString getKeyForURI(in nsIURI uri);
|
2016-05-19 01:07:00 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Get the protocol version for the given provider.
|
|
|
|
*
|
|
|
|
* @param provider String the provider name. e.g. "google"
|
|
|
|
*
|
|
|
|
* @returns String to indicate the protocol version. e.g. "2.2"
|
|
|
|
*/
|
|
|
|
ACString getProtocolVersion(in ACString provider);
|
2007-02-28 02:49:44 +03:00
|
|
|
};
|