Main Page | Modules | Class Hierarchy | Class List | Directories | File List | Class Members | File Members | Related Pages

XSECAlgorithmMapper.hpp

Go to the documentation of this file.
00001 /*
00002  * Copyright 2003-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  * XSECAlgorithmMapper := Provides a table of AlgorithmHandlers
00021  *                        Mapped by Type URI
00022  *
00023  * $Id: XSECAlgorithmMapper.hpp,v 1.3 2005/02/03 13:26:30 milan Exp $
00024  *
00025  */
00026 
00027 #ifndef XSECALGMAPPER_INCLUDE
00028 #define XSECALGMAPPER_INCLUDE
00029 
00030 // XSEC Includes
00031 
00032 #include <xsec/framework/XSECDefs.hpp>
00033 
00034 #include <vector>
00035 
00036 class XSECAlgorithmHandler;
00037 
00049 class XSECAlgorithmMapper {
00050 
00051 public:
00052     
00055     
00056     XSECAlgorithmMapper(void);
00057     ~XSECAlgorithmMapper();
00058 
00060 
00063 
00064     static const XMLCh s_defaultEncryptionMapping[];
00065 
00068 
00073     XSECAlgorithmHandler * mapURIToHandler(const XMLCh * URI) const;
00074 
00076 
00079 
00084     void registerHandler(const XMLCh * URI, const XSECAlgorithmHandler & handler);
00085 
00087 
00088 private:
00089 
00090     struct MapperEntry {
00091 
00092         XMLCh * mp_uri;
00093         XSECAlgorithmHandler * mp_handler;
00094 
00095     };
00096 
00097     MapperEntry * findEntry(const XMLCh * URI) const;
00098 
00099 #if defined(XSEC_NO_NAMESPACES)
00100     typedef vector<MapperEntry *>           MapperEntryVectorType;
00101 #else
00102     typedef std::vector<MapperEntry *>      MapperEntryVectorType;
00103 #endif
00104 
00105     mutable MapperEntryVectorType       m_mapping;
00106 
00107 };
00108 
00109 /*\@}*/
00110 
00111 #endif /* XSECALGMAPPER_INCLUDE */
00112 

Generated on Sun Jul 3 17:37:27 2005 for XML-Security-C by  doxygen 1.4.2