1 /************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 11 * OpenOffice.org is free software: you can redistribute it and/or modify 12 * it under the terms of the GNU Lesser General Public License version 3 13 * only, as published by the Free Software Foundation. 14 * 15 * OpenOffice.org is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU Lesser General Public License version 3 for more details 19 * (a copy is included in the LICENSE file that accompanied this code). 20 * 21 * You should have received a copy of the GNU Lesser General Public License 22 * version 3 along with OpenOffice.org. If not, see 23 * <http://www.openoffice.org/license.html> 24 * for a copy of the LGPLv3 License. 25 * 26 ************************************************************************/ 27 28 #ifndef _SEINITIALIZERIMPL_HXX 29 #define _SEINITIALIZERIMPL_HXX 30 31 #include <com/sun/star/xml/crypto/XXMLSecurityContext.hpp> 32 #ifndef _COM_SUN_STAR_XML_CRYPTO_SEINITIALIZER_HPP_ 33 #include <com/sun/star/xml/crypto/XSEInitializer.hpp> 34 #endif 35 #include <com/sun/star/lang/XUnoTunnel.hpp> 36 #include <com/sun/star/lang/XServiceInfo.hpp> 37 #include <com/sun/star/lang/XMultiServiceFactory.hpp> 38 #include <cppuhelper/implbase2.hxx> 39 40 #include <libxml/tree.h> 41 42 class SEInitializer_MSCryptImpl : public cppu::WeakImplHelper2 43 < 44 com::sun::star::xml::crypto::XSEInitializer, 45 com::sun::star::lang::XServiceInfo 46 > 47 /****** SEInitializer_MSCryptImpl.hxx/CLASS SEInitializer_MSCryptImpl *********** 48 * 49 * NAME 50 * SEInitializer_MSCryptImpl -- Class to initialize a Security Context 51 * instance 52 * 53 * FUNCTION 54 * Use this class to initialize a XmlSec based Security Context 55 * instance. After this instance is used up, use this class to free this 56 * instance. 57 * 58 * HISTORY 59 * 05.01.2004 - Interface supported: XSEInitializer, XSEInitializer 60 * 61 * AUTHOR 62 * Michael Mi 63 * Email: michael.mi@sun.com 64 ******************************************************************************/ 65 { 66 private: 67 com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > mxMSF; 68 69 public: 70 SEInitializer_MSCryptImpl(const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > &rxMSF); 71 virtual ~SEInitializer_MSCryptImpl(); 72 73 /* XSEInitializer */ 74 virtual com::sun::star::uno::Reference< 75 com::sun::star::xml::crypto::XXMLSecurityContext > 76 SAL_CALL createSecurityContext( const rtl::OUString& certDB ) 77 throw (com::sun::star::uno::RuntimeException); 78 79 virtual void SAL_CALL freeSecurityContext( const com::sun::star::uno::Reference< 80 com::sun::star::xml::crypto::XXMLSecurityContext >& securityContext ) 81 throw (com::sun::star::uno::RuntimeException); 82 83 /* XServiceInfo */ 84 virtual rtl::OUString SAL_CALL getImplementationName( ) 85 throw (com::sun::star::uno::RuntimeException); 86 87 virtual sal_Bool SAL_CALL supportsService( const rtl::OUString& ServiceName ) 88 throw (com::sun::star::uno::RuntimeException); 89 90 virtual com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames( ) 91 throw (com::sun::star::uno::RuntimeException); 92 }; 93 94 rtl::OUString SEInitializer_MSCryptImpl_getImplementationName() 95 throw ( com::sun::star::uno::RuntimeException ); 96 97 sal_Bool SAL_CALL SEInitializer_MSCryptImpl_supportsService( const rtl::OUString& ServiceName ) 98 throw ( com::sun::star::uno::RuntimeException ); 99 100 com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL SEInitializer_MSCryptImpl_getSupportedServiceNames( ) 101 throw ( com::sun::star::uno::RuntimeException ); 102 103 com::sun::star::uno::Reference< com::sun::star::uno::XInterface > 104 SAL_CALL SEInitializer_MSCryptImpl_createInstance( const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > & rSMgr) 105 throw ( com::sun::star::uno::Exception ); 106 107 #endif 108 109