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 * DSIGXPathFilterExpr := Class that holds an XPath Filter expression 00021 * 00022 * $Id: DSIGXPathFilterExpr.hpp 351364 2005-06-04 11:30:26Z blautenb $ 00023 * 00024 */ 00025 00026 #ifndef DSIGXPATHFILTEREXPR_INCLUDE 00027 #define DSIGXPATHFILTEREXPR_INCLUDE 00028 00029 #include <xsec/framework/XSECDefs.hpp> 00030 #include <xsec/dsig/DSIGConstants.hpp> 00031 #include <xsec/utils/XSECSafeBuffer.hpp> 00032 00033 00034 XSEC_DECLARE_XERCES_CLASS(DOMNamedNodeMap); 00035 XSEC_DECLARE_XERCES_CLASS(DOMNode); 00036 XSEC_DECLARE_XERCES_CLASS(DOMElement); 00037 00038 class XSECEnv; 00039 00053 class DSIG_EXPORT DSIGXPathFilterExpr { 00054 00055 public: 00056 00059 00069 DSIGXPathFilterExpr(const XSECEnv * env, XERCES_CPP_NAMESPACE_QUALIFIER DOMNode * node); 00070 00079 DSIGXPathFilterExpr(const XSECEnv * env); 00080 00089 ~DSIGXPathFilterExpr(); 00090 00092 00096 00103 void load(void); 00104 00113 xpathFilterType getFilterType(void); 00114 00125 XERCES_CPP_NAMESPACE_QUALIFIER DOMElement * setFilter(xpathFilterType filterType, 00126 const XMLCh * filterExpr); 00127 00136 const XMLCh * getFilter(void) {return m_expr.rawXMLChBuffer();} 00137 00147 void setNamespace(const XMLCh * prefix, const XMLCh * value); 00148 00160 XERCES_CPP_NAMESPACE_QUALIFIER DOMNamedNodeMap * getNamespaces(void) { 00161 return mp_NSMap; 00162 } 00163 00174 void deleteNamespace(const XMLCh * prefix); 00175 00177 00178 private: 00179 00180 // Just let the TXFM read directly 00181 00182 friend class TXFMXPathFilter; 00183 00184 DSIGXPathFilterExpr(); 00185 DSIGXPathFilterExpr(const DSIGXPathFilterExpr& theOther); 00186 00187 const XSECEnv * mp_env; 00188 XERCES_CPP_NAMESPACE_QUALIFIER DOMNode 00189 * mp_xpathFilterNode; 00190 XERCES_CPP_NAMESPACE_QUALIFIER DOMNode 00191 * mp_exprTextNode; 00192 XERCES_CPP_NAMESPACE_QUALIFIER DOMNamedNodeMap 00193 * mp_NSMap; 00194 safeBuffer m_expr; 00195 xpathFilterType m_filterType; 00196 bool m_loaded; 00197 00198 00199 }; 00200 00201 #endif /* DSIGXPATHFILTEREXPR_INCLUDE */