Thu, 22 Jan 2015 13:21:57 +0100
Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6
michael@0 | 1 | /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ |
michael@0 | 2 | /* This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 3 | * License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
michael@0 | 5 | |
michael@0 | 6 | #include "nsISupports.idl" |
michael@0 | 7 | |
michael@0 | 8 | interface nsIURI; |
michael@0 | 9 | |
michael@0 | 10 | /** |
michael@0 | 11 | * nsINestedURI is an interface that must be implemented by any nsIURI |
michael@0 | 12 | * implementation which has an "inner" URI that it actually gets data |
michael@0 | 13 | * from. |
michael@0 | 14 | * |
michael@0 | 15 | * For example, if URIs for the scheme "sanitize" have the structure: |
michael@0 | 16 | * |
michael@0 | 17 | * sanitize:http://example.com |
michael@0 | 18 | * |
michael@0 | 19 | * and opening a channel on such a sanitize: URI gets the data from |
michael@0 | 20 | * http://example.com, sanitizes it, and returns it, then the sanitize: URI |
michael@0 | 21 | * should implement nsINestedURI and return the http://example.com URI as its |
michael@0 | 22 | * inner URI. |
michael@0 | 23 | */ |
michael@0 | 24 | [scriptable, uuid(6de2c874-796c-46bf-b57f-0d7bd7d6cab0)] |
michael@0 | 25 | interface nsINestedURI : nsISupports |
michael@0 | 26 | { |
michael@0 | 27 | /** |
michael@0 | 28 | * The inner URI for this nested URI. This must not return null if the |
michael@0 | 29 | * getter succeeds; URIs that have no inner must not QI to this interface. |
michael@0 | 30 | * Dynamically changing whether there is an inner URI is not allowed. |
michael@0 | 31 | * |
michael@0 | 32 | * Modifying the returned URI must not in any way modify the nested URI; this |
michael@0 | 33 | * means the returned URI must be either immutable or a clone. |
michael@0 | 34 | */ |
michael@0 | 35 | readonly attribute nsIURI innerURI; |
michael@0 | 36 | |
michael@0 | 37 | /** |
michael@0 | 38 | * The innermost URI for this nested URI. This must not return null if the |
michael@0 | 39 | * getter succeeds. This is equivalent to repeatedly calling innerURI while |
michael@0 | 40 | * the returned URI QIs to nsINestedURI. |
michael@0 | 41 | * |
michael@0 | 42 | * Modifying the returned URI must not in any way modify the nested URI; this |
michael@0 | 43 | * means the returned URI must be either immutable or a clone. |
michael@0 | 44 | */ |
michael@0 | 45 | readonly attribute nsIURI innermostURI; |
michael@0 | 46 | }; |