Update ooo320-m1
[ooovba.git] / xmlsecurity / source / xmlsec / mscrypt / xmlsignature_mscryptimpl.hxx
blobbe4af4cc66ad999c7a7de705f53390977acff55f
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: xmlsignature_mscryptimpl.hxx,v $
10 * $Revision: 1.5 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef _XMLSIGNATURE_MSCRYPTIMPL_HXX_
32 #define _XMLSIGNATURE_MSCRYPTIMPL_HXX_
34 #include <sal/config.h>
35 #include <rtl/ustring.hxx>
36 #include <cppuhelper/factory.hxx>
37 #include <cppuhelper/implbase3.hxx>
38 #include <com/sun/star/uno/Exception.hpp>
40 #ifndef _COM_SUN_STAR_UNO_REFERENCE_HPP_
41 #include <com/sun/star/uno/Reference.hxx>
42 #endif
43 #include <com/sun/star/lang/XSingleServiceFactory.hpp>
45 #ifndef _COM_SUN_STAR_LANG_XSECVICEINFO_HPP_
46 #include <com/sun/star/lang/XServiceInfo.hpp>
47 #endif
48 #include <com/sun/star/lang/XInitialization.hpp>
49 #include <com/sun/star/xml/crypto/XXMLSignature.hpp>
50 #include <com/sun/star/xml/crypto/XXMLSignatureTemplate.hpp>
51 #include <com/sun/star/xml/crypto/XXMLSecurityContext.hpp>
53 class XMLSignature_MSCryptImpl : public ::cppu::WeakImplHelper3<
54 ::com::sun::star::xml::crypto::XXMLSignature ,
55 ::com::sun::star::lang::XInitialization ,
56 ::com::sun::star::lang::XServiceInfo >
58 private :
59 ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xServiceManager ;
61 public :
62 XMLSignature_MSCryptImpl( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& aFactory ) ;
63 virtual ~XMLSignature_MSCryptImpl() ;
65 //Methods from XXMLSignature
66 virtual ::com::sun::star::uno::Reference< ::com::sun::star::xml::crypto::XXMLSignatureTemplate > SAL_CALL generate(
67 const ::com::sun::star::uno::Reference< ::com::sun::star::xml::crypto::XXMLSignatureTemplate >& aTemplate ,
68 const ::com::sun::star::uno::Reference< ::com::sun::star::xml::crypto::XSecurityEnvironment >& aEnvironment
69 ) throw( com::sun::star::xml::crypto::XMLSignatureException,
70 com::sun::star::uno::SecurityException) ;
72 virtual ::com::sun::star::uno::Reference< ::com::sun::star::xml::crypto::XXMLSignatureTemplate > SAL_CALL validate(
73 const ::com::sun::star::uno::Reference< ::com::sun::star::xml::crypto::XXMLSignatureTemplate >& aTemplate ,
74 const ::com::sun::star::uno::Reference< ::com::sun::star::xml::crypto::XXMLSecurityContext >& aContext
75 ) throw( com::sun::star::uno::RuntimeException,
76 com::sun::star::uno::SecurityException,
77 com::sun::star::xml::crypto::XMLSignatureException);
79 //Methods from XInitialization
80 virtual void SAL_CALL initialize(
81 const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aArguments
82 ) throw( ::com::sun::star::uno::Exception , ::com::sun::star::uno::RuntimeException ) ;
84 //Methods from XServiceInfo
85 virtual ::rtl::OUString SAL_CALL getImplementationName() throw( ::com::sun::star::uno::RuntimeException ) ;
87 virtual sal_Bool SAL_CALL supportsService(
88 const ::rtl::OUString& ServiceName
89 ) throw( ::com::sun::star::uno::RuntimeException ) ;
91 virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw( ::com::sun::star::uno::RuntimeException ) ;
93 //Helper for XServiceInfo
94 static ::com::sun::star::uno::Sequence< ::rtl::OUString > impl_getSupportedServiceNames() ;
96 static ::rtl::OUString impl_getImplementationName() throw( ::com::sun::star::uno::RuntimeException ) ;
98 //Helper for registry
99 static ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL impl_createInstance( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& aServiceManager ) throw( ::com::sun::star::uno::RuntimeException ) ;
101 static ::com::sun::star::uno::Reference< ::com::sun::star::lang::XSingleServiceFactory > impl_createFactory( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& aServiceManager ) ;
104 #endif // _XMLSIGNATURE_MSCRYPTIMPL_HXX_