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

XSECProvider.hpp

Go to the documentation of this file.
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  * XSECProvider.hpp := Main interface class that applications use to
00021  *                     get access to Signature and Encryption functions.
00022  *
00023  * $Id: XSECProvider.hpp,v 1.14 2005/02/03 13:26:30 milan Exp $
00024  *
00025  */
00026 #ifndef XSECPROVIDER_INCLUDE
00027 #define XSECPROVIDER_INCLUDE
00028 
00029 #include <xsec/utils/XSECPlatformUtils.hpp>
00030 #include <xsec/dsig/DSIGSignature.hpp>
00031 #include <xsec/xenc/XENCCipher.hpp>
00032 #include <xsec/xkms/XKMSMessageFactory.hpp>
00033 
00034 #include <xercesc/util/Mutexes.hpp>
00035 
00036 #include <vector>
00037 
00055 class DSIG_EXPORT XSECProvider {
00056 
00057 #if defined(XALAN_NO_NAMESPACES)
00058     typedef vector<DSIGSignature *>         SignatureListVectorType;
00059 #else
00060     typedef std::vector<DSIGSignature *>    SignatureListVectorType;
00061 #endif
00062 
00063 #if defined(XALAN_NO_NAMESPACES)
00064     typedef vector<XENCCipher *>            CipherListVectorType;
00065 #else
00066     typedef std::vector<XENCCipher *>       CipherListVectorType;
00067 #endif
00068 
00069 public:
00070 
00073     
00082     XSECProvider();
00083     ~XSECProvider();
00084 
00086 
00089     
00107     DSIGSignature * newSignatureFromDOM(
00108         XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument *doc, 
00109         XERCES_CPP_NAMESPACE_QUALIFIER DOMNode *sigNode
00110     );
00111 
00128     DSIGSignature * newSignatureFromDOM(XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument *doc);
00129 
00140     DSIGSignature * newSignature(void);
00141 
00161     void releaseSignature(DSIGSignature * toRelease);
00162 
00164 
00167 
00180     XENCCipher * newCipher(XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument * doc);
00181 
00194     void releaseCipher(XENCCipher * toRelease);
00195 
00197 
00200 
00212     XKMSMessageFactory * getXKMSMessageFactory(void);
00213 
00216 
00229     void setDefaultURIResolver(XSECURIResolver * resolver);
00230 
00232 
00233 private:
00234 
00235     // Copy constructor is disabled
00236     XSECProvider(const XSECProvider &);
00237     XSECProvider * operator = (const XSECProvider &);
00238 
00239     // Internal functions
00240 
00241     void setup(DSIGSignature *sig);
00242     void setup(XENCCipher *cipher);
00243 
00244     SignatureListVectorType                     m_activeSignatures;
00245     CipherListVectorType                        m_activeCiphers;
00246 
00247     XKMSMessageFactory                          * mp_xkmsMessageFactory;
00248 
00249     XSECURIResolver                             * mp_URIResolver;
00250     XERCES_CPP_NAMESPACE_QUALIFIER XMLMutex     m_providerMutex;
00251 };
00252 
00255 #endif /* XSECPROVIDER_INCLUDE */

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