netwerk/base/public/nsINestedURI.idl

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/netwerk/base/public/nsINestedURI.idl	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,46 @@
     1.4 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
     1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.8 +
     1.9 +#include "nsISupports.idl"
    1.10 +
    1.11 +interface nsIURI;
    1.12 +
    1.13 +/**
    1.14 + * nsINestedURI is an interface that must be implemented by any nsIURI
    1.15 + * implementation which has an "inner" URI that it actually gets data
    1.16 + * from.
    1.17 + *
    1.18 + * For example, if URIs for the scheme "sanitize" have the structure:
    1.19 + *
    1.20 + *   sanitize:http://example.com
    1.21 + *
    1.22 + * and opening a channel on such a sanitize: URI gets the data from
    1.23 + * http://example.com, sanitizes it, and returns it, then the sanitize: URI
    1.24 + * should implement nsINestedURI and return the http://example.com URI as its
    1.25 + * inner URI.
    1.26 + */
    1.27 +[scriptable, uuid(6de2c874-796c-46bf-b57f-0d7bd7d6cab0)]
    1.28 +interface nsINestedURI : nsISupports
    1.29 +{
    1.30 +  /**
    1.31 +   * The inner URI for this nested URI.  This must not return null if the
    1.32 +   * getter succeeds; URIs that have no inner must not QI to this interface.
    1.33 +   * Dynamically changing whether there is an inner URI is not allowed.
    1.34 +   *
    1.35 +   * Modifying the returned URI must not in any way modify the nested URI; this
    1.36 +   * means the returned URI must be either immutable or a clone.
    1.37 +   */
    1.38 +  readonly attribute nsIURI innerURI;
    1.39 +
    1.40 +  /**
    1.41 +   * The innermost URI for this nested URI.  This must not return null if the
    1.42 +   * getter succeeds.  This is equivalent to repeatedly calling innerURI while
    1.43 +   * the returned URI QIs to nsINestedURI.
    1.44 +   *
    1.45 +   * Modifying the returned URI must not in any way modify the nested URI; this
    1.46 +   * means the returned URI must be either immutable or a clone.   
    1.47 +   */
    1.48 +  readonly attribute nsIURI innermostURI;
    1.49 +};

mercurial