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 * TXFMURL := Class that takes an input URL to start of a transform pipe 00021 * 00022 * $Id: TXFMURL.hpp,v 1.11 2005/02/03 13:50:12 milan Exp $ 00023 * 00024 */ 00025 00026 #include <xsec/transformers/TXFMBase.hpp> 00027 #include <xsec/framework/XSECURIResolver.hpp> 00028 00029 // Xerces 00030 00031 #include <xercesc/util/BinInputStream.hpp> 00032 00040 class DSIG_EXPORT TXFMURL : public TXFMBase { 00041 00042 private: 00043 00044 XSECURIResolver * mp_resolver; // Resolver passed in 00045 XERCES_CPP_NAMESPACE_QUALIFIER BinInputStream 00046 * is; // To handle the actual input 00047 00048 bool done; 00049 00050 00051 public: 00052 00053 TXFMURL(XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument *doc, XSECURIResolver * resolver); 00054 ~TXFMURL(); 00055 00056 // Methods to set the inputs 00057 00058 virtual void setInput(TXFMBase *newInput); 00059 void setInput(const XMLCh * URL); 00060 void setInput(XERCES_CPP_NAMESPACE_QUALIFIER BinInputStream * inputStream); 00061 00062 // Methods to get tranform output type and input requirement 00063 00064 virtual TXFMBase::ioType getInputType(void); 00065 virtual TXFMBase::ioType getOutputType(void); 00066 virtual nodeType getNodeType(void); 00067 00068 // Methods to get output data 00069 00070 virtual unsigned int readBytes(XMLByte * const toFill, const unsigned int maxToFill); 00071 virtual XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument *getDocument(); 00072 virtual XERCES_CPP_NAMESPACE_QUALIFIER DOMNode *getFragmentNode(); 00073 virtual const XMLCh * getFragmentId(); 00074 00075 private : 00076 TXFMURL(); 00077 }; 00078