1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/dom/xslt/nsIDocumentTransformer.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,63 @@ 1.4 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.5 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.6 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.7 + 1.8 +#ifndef nsIDocumentTransformer_h__ 1.9 +#define nsIDocumentTransformer_h__ 1.10 + 1.11 +#include "nsISupports.h" 1.12 + 1.13 +class nsIDOMNode; 1.14 +class nsILoadGroup; 1.15 +class nsIURI; 1.16 +class nsIPrincipal; 1.17 +class nsString; 1.18 + 1.19 +#define NS_ITRANSFORMOBSERVER_IID \ 1.20 +{ 0x04b2d17c, 0xe98d, 0x45f5, \ 1.21 + { 0x9a, 0x67, 0xb7, 0x01, 0x19, 0x59, 0x7d, 0xe7 } } 1.22 + 1.23 +class nsITransformObserver : public nsISupports 1.24 +{ 1.25 +public: 1.26 + 1.27 + NS_DECLARE_STATIC_IID_ACCESSOR(NS_ITRANSFORMOBSERVER_IID) 1.28 + 1.29 + NS_IMETHOD OnDocumentCreated(nsIDocument *aResultDocument) = 0; 1.30 + 1.31 + NS_IMETHOD OnTransformDone(nsresult aResult, 1.32 + nsIDocument *aResultDocument) = 0; 1.33 + 1.34 +}; 1.35 + 1.36 +NS_DEFINE_STATIC_IID_ACCESSOR(nsITransformObserver, NS_ITRANSFORMOBSERVER_IID) 1.37 + 1.38 +#define NS_IDOCUMENTTRANSFORMER_IID \ 1.39 + {0x17c83d91, 0xac2f, 0x4658, \ 1.40 + { 0x91, 0x6c, 0xcb, 0xc4, 0xd2, 0xb5, 0x2c, 0xe }} 1.41 + 1.42 +class nsIDocumentTransformer : public nsISupports 1.43 +{ 1.44 +public: 1.45 + 1.46 + NS_DECLARE_STATIC_IID_ACCESSOR(NS_IDOCUMENTTRANSFORMER_IID) 1.47 + 1.48 + NS_IMETHOD Init(nsIPrincipal* aPrincipal) = 0; 1.49 + NS_IMETHOD SetTransformObserver(nsITransformObserver* aObserver) = 0; 1.50 + NS_IMETHOD LoadStyleSheet(nsIURI* aUri, nsILoadGroup* aLoadGroup) = 0; 1.51 + NS_IMETHOD SetSourceContentModel(nsIDOMNode* aSource) = 0; 1.52 + NS_IMETHOD CancelLoads() = 0; 1.53 + 1.54 + NS_IMETHOD AddXSLTParamNamespace(const nsString& aPrefix, 1.55 + const nsString& aNamespace) = 0; 1.56 + NS_IMETHOD AddXSLTParam(const nsString& aName, 1.57 + const nsString& aNamespace, 1.58 + const nsString& aValue, 1.59 + const nsString& aSelect, 1.60 + nsIDOMNode* aContextNode) = 0; 1.61 +}; 1.62 + 1.63 +NS_DEFINE_STATIC_IID_ACCESSOR(nsIDocumentTransformer, 1.64 + NS_IDOCUMENTTRANSFORMER_IID) 1.65 + 1.66 +#endif //nsIDocumentTransformer_h__