00001 /* 00002 * Copyright 2002-2005 The Apache Software Foundation. 00003 * 00004 * Licensed under the Apache License, Version 2.0 (the "License"); 00005 * you may not use this file except in compliance with the License. 00006 * You may obtain a copy of the License at 00007 * 00008 * http://www.apache.org/licenses/LICENSE-2.0 00009 * 00010 * Unless required by applicable law or agreed to in writing, software 00011 * distributed under the License is distributed on an "AS IS" BASIS, 00012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00013 * See the License for the specific language governing permissions and 00014 * limitations under the License. 00015 */ 00016 00017 /* 00018 * XSEC 00019 * 00020 * TXFMEnvelope := Class that calculates an Envelope with an XPath evaluator 00021 * 00022 * $Id: TXFMEnvelope.hpp,v 1.8 2005/02/03 13:50:12 milan Exp $ 00023 * 00024 */ 00025 00026 #include <xsec/transformers/TXFMBase.hpp> 00027 #include <xsec/utils/XSECSafeBuffer.hpp> 00028 #include <xsec/canon/XSECC14n20010315.hpp> 00029 #include <xsec/utils/XSECSafeBufferFormatter.hpp> 00030 00031 // Xerces 00032 00033 #include <xercesc/dom/DOM.hpp> 00034 00040 class DSIG_EXPORT TXFMEnvelope : public TXFMBase { 00041 00042 private: 00043 00044 XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument * mp_document; 00045 XERCES_CPP_NAMESPACE_QUALIFIER DOMNode * mp_startNode; 00046 00047 public: 00048 00049 TXFMEnvelope(XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument *doc); 00050 ~TXFMEnvelope(); 00051 00052 // Methods to set the inputs 00053 00054 void setInput(TXFMBase *newInput); 00055 00056 // Methods to get tranform output type and input requirement 00057 00058 virtual TXFMBase::ioType getInputType(void); 00059 virtual TXFMBase::ioType getOutputType(void); 00060 virtual TXFMBase::nodeType getNodeType(void); 00061 00062 // Envelope unique 00063 00064 void evaluateEnvelope(XERCES_CPP_NAMESPACE_QUALIFIER DOMNode *t); 00065 00066 // Methods to get output data 00067 00068 virtual unsigned int readBytes(XMLByte * const toFill, const unsigned int maxToFill); 00069 virtual XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument *getDocument(); 00070 virtual XERCES_CPP_NAMESPACE_QUALIFIER DOMNode *getFragmentNode(); 00071 virtual const XMLCh * getFragmentId(); 00072 virtual XSECXPathNodeList & getXPathNodeList(); 00073 private: 00074 TXFMEnvelope(); 00075 }; 00076