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 * TXFMBaseC14n := Class that performs C14n canonicalisation 00021 * 00022 * $Id: TXFMC14n.hpp,v 1.9 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/XSECNameSpaceExpander.hpp> 00030 00036 class DSIG_EXPORT TXFMC14n : public TXFMBase { 00037 00038 private: 00039 00040 XSECC14n20010315 * mp_c14n; // The actual canonicaliser 00041 00042 public: 00043 00044 TXFMC14n(XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument *doc); 00045 ~TXFMC14n(); 00046 00047 // Methods to set the inputs 00048 00049 void setInput(TXFMBase *newInput); 00050 00051 // Methods to get tranform output type and input requirement 00052 00053 virtual TXFMBase::ioType getInputType(void); 00054 virtual TXFMBase::ioType getOutputType(void); 00055 virtual TXFMBase::nodeType getNodeType(void); 00056 00057 // Overrid comment acivation 00058 virtual void activateComments(void); 00059 00060 // Set exclusive 00061 virtual void setExclusive(); 00062 virtual void setExclusive(safeBuffer & NSList); 00063 00064 // Methods to get output data 00065 00066 virtual unsigned int readBytes(XMLByte * const toFill, const unsigned int maxToFill); 00067 virtual XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument *getDocument(); 00068 virtual XERCES_CPP_NAMESPACE_QUALIFIER DOMNode *getFragmentNode(); 00069 virtual const XMLCh * getFragmentId(); 00070 00071 private: 00072 TXFMC14n(); 00073 }; 00074