SecurityManager.hpp
Go to the documentation of this file.
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*
* $Id: SecurityManager.hpp 673960 2008-07-04 08:50:12Z borisk $
*/
#if !defined(XERCESC_INCLUDE_GUARD_SECURITYMANAGER_HPP)
#define XERCESC_INCLUDE_GUARD_SECURITYMANAGER_HPP
#include <xercesc/util/XercesDefs.hpp>
XERCES_CPP_NAMESPACE_BEGIN
class XMLUTIL_EXPORT SecurityManager
{
public:
enum { ENTITY_EXPANSION_LIMIT = 50000};
SecurityManager()
: fEntityExpansionLimit((XMLSize_t)ENTITY_EXPANSION_LIMIT)
{
}
virtual ~SecurityManager(){};
virtual void setEntityExpansionLimit(XMLSize_t newLimit)
{
fEntityExpansionLimit = newLimit;
}
virtual XMLSize_t getEntityExpansionLimit() const
{
return fEntityExpansionLimit;
}
protected:
XMLSize_t fEntityExpansionLimit;
private:
/* Unimplemented Constructors and operators */
/* Copy constructor */
SecurityManager(const SecurityManager&);
SecurityManager& operator=(const SecurityManager&);
};
XERCES_CPP_NAMESPACE_END
#endif
SecurityManager::SecurityManager
SecurityManager()
Default constructor.
Definition: SecurityManager.hpp:60
XERCES_CPP_NAMESPACE_BEGIN
#define XERCES_CPP_NAMESPACE_BEGIN
Definition: XercesDefs.hpp:112
XERCES_CPP_NAMESPACE_END
#define XERCES_CPP_NAMESPACE_END
Definition: XercesDefs.hpp:113
SecurityManager::getEntityExpansionLimit
virtual XMLSize_t getEntityExpansionLimit() const
Permits the application or a parser component to query the current limit for entity expansions.
Definition: SecurityManager.hpp:95
XMLUTIL_EXPORT
#define XMLUTIL_EXPORT
Definition: XercesDefs.hpp:162
SecurityManager::setEntityExpansionLimit
virtual void setEntityExpansionLimit(XMLSize_t newLimit)
An application should call this method when it wishes to specify a particular limit to the number of ...
Definition: SecurityManager.hpp:83
XMLSize_t
size_t XMLSize_t
Definition: Xerces_autoconf_config.hpp:112
SecurityManager::fEntityExpansionLimit
XMLSize_t fEntityExpansionLimit
Definition: SecurityManager.hpp:102
SecurityManager::~SecurityManager
virtual ~SecurityManager()
Destructor.
Definition: SecurityManager.hpp:66
XercesDefs.hpp
SecurityManager
Allow application to force the parser to behave in a security-conscious way.
Definition: SecurityManager.hpp:51