1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 #ifndef _SEINITIALIZERIMPL_HXX
25 #define _SEINITIALIZERIMPL_HXX
26 
27 #include <com/sun/star/xml/crypto/XXMLSecurityContext.hpp>
28 #ifndef _COM_SUN_STAR_XML_CRYPTO_SEINITIALIZER_HPP_
29 #include <com/sun/star/xml/crypto/XSEInitializer.hpp>
30 #endif
31 #include <com/sun/star/lang/XUnoTunnel.hpp>
32 #include <com/sun/star/lang/XServiceInfo.hpp>
33 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
34 #include <cppuhelper/implbase2.hxx>
35 
36 #include <libxml/tree.h>
37 
38 class SEInitializer_MSCryptImpl : public cppu::WeakImplHelper2
39 <
40 	com::sun::star::xml::crypto::XSEInitializer,
41 	com::sun::star::lang::XServiceInfo
42 >
43 /****** SEInitializer_MSCryptImpl.hxx/CLASS SEInitializer_MSCryptImpl ***********
44  *
45  *   NAME
46  *	SEInitializer_MSCryptImpl -- Class to initialize a Security Context
47  *	instance
48  *
49  *   FUNCTION
50  *	Use this class to initialize a XmlSec based Security Context
51  *	instance. After this instance is used up, use this class to free this
52  *	instance.
53  *
54  *   HISTORY
55  *	05.01.2004 -	Interface supported: XSEInitializer, XSEInitializer
56  *
57  *   AUTHOR
58  *	Michael Mi
59  *	Email: michael.mi@sun.com
60  ******************************************************************************/
61 {
62 private:
63 	com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > mxMSF;
64 
65 public:
66 	SEInitializer_MSCryptImpl(const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > &rxMSF);
67 	virtual ~SEInitializer_MSCryptImpl();
68 
69 	/* XSEInitializer */
70 	virtual com::sun::star::uno::Reference<
71 		com::sun::star::xml::crypto::XXMLSecurityContext >
72 		SAL_CALL createSecurityContext( const rtl::OUString& certDB )
73 		throw (com::sun::star::uno::RuntimeException);
74 
75 	virtual void SAL_CALL freeSecurityContext( const com::sun::star::uno::Reference<
76 		com::sun::star::xml::crypto::XXMLSecurityContext >& securityContext )
77 		throw (com::sun::star::uno::RuntimeException);
78 
79 	/* XServiceInfo */
80 	virtual rtl::OUString SAL_CALL getImplementationName(  )
81 		throw (com::sun::star::uno::RuntimeException);
82 
83 	virtual sal_Bool SAL_CALL supportsService( const rtl::OUString& ServiceName )
84 		throw (com::sun::star::uno::RuntimeException);
85 
86 	virtual com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(  )
87 		throw (com::sun::star::uno::RuntimeException);
88 };
89 
90 rtl::OUString SEInitializer_MSCryptImpl_getImplementationName()
91 	throw ( com::sun::star::uno::RuntimeException );
92 
93 sal_Bool SAL_CALL SEInitializer_MSCryptImpl_supportsService( const rtl::OUString& ServiceName )
94 	throw ( com::sun::star::uno::RuntimeException );
95 
96 com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL SEInitializer_MSCryptImpl_getSupportedServiceNames(  )
97 	throw ( com::sun::star::uno::RuntimeException );
98 
99 com::sun::star::uno::Reference< com::sun::star::uno::XInterface >
100 SAL_CALL SEInitializer_MSCryptImpl_createInstance( const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > & rSMgr)
101 	throw ( com::sun::star::uno::Exception );
102 
103 #endif
104 
105