Version 4.0.2.1, tag libreoffice-4.0.2.1
[LibreOffice.git] / xmlsecurity / source / framework / signaturecreatorimpl.hxx
blob76c841da5f7d961b888094cdf6af815021e49af2
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef _SIGNATURECREATORIMPL_HXX
21 #define _SIGNATURECREATORIMPL_HXX
23 #include <com/sun/star/xml/crypto/sax/XBlockerMonitor.hpp>
24 #include <com/sun/star/xml/crypto/sax/XSignatureCreationResultListener.hpp>
25 #include <com/sun/star/xml/crypto/sax/XSignatureCreationResultBroadcaster.hpp>
26 #include <com/sun/star/xml/crypto/XSecurityEnvironment.hpp>
27 #include <com/sun/star/lang/XInitialization.hpp>
28 #include <com/sun/star/lang/XServiceInfo.hpp>
29 #include <cppuhelper/implbase4.hxx>
31 #include "signatureengine.hxx"
33 class SignatureCreatorImpl : public cppu::ImplInheritanceHelper4
35 SignatureEngine,
36 com::sun::star::xml::crypto::sax::XBlockerMonitor,
37 com::sun::star::xml::crypto::sax::XSignatureCreationResultBroadcaster,
38 com::sun::star::lang::XInitialization,
39 com::sun::star::lang::XServiceInfo
41 /****** SignatureCreatorImpl.hxx/CLASS SignatureCreatorImpl *******************
43 * NAME
44 * SignatureCreatorImpl -- generates a signature
46 * FUNCTION
47 * Collects all resources for a signature generation, then generates the
48 * signature by invoking a xmlsec-based signature bridge component.
50 * AUTHOR
51 * Michael Mi
52 * Email: michael.mi@sun.com
53 ******************************************************************************/
55 private:
57 * the Id of template blocker.
59 sal_Int32 m_nIdOfBlocker;
61 com::sun::star::uno::Reference<
62 com::sun::star::xml::crypto::XSecurityEnvironment > m_xSecurityEnvironment;
64 virtual void notifyResultListener() const
65 throw (com::sun::star::uno::Exception, com::sun::star::uno::RuntimeException);
66 virtual void clearUp( ) const;
67 virtual bool checkReady() const;
68 virtual void startEngine( const com::sun::star::uno::Reference<
69 com::sun::star::xml::crypto::XXMLSignatureTemplate >&
70 xSignatureTemplate)
71 throw (com::sun::star::uno::Exception, com::sun::star::uno::RuntimeException);
73 public:
74 explicit SignatureCreatorImpl( const com::sun::star::uno::Reference<
75 com::sun::star::lang::XMultiServiceFactory >& rxMSF);
76 virtual ~SignatureCreatorImpl();
78 /* XBlockerMonitor */
79 virtual void SAL_CALL setBlockerId( sal_Int32 id )
80 throw (com::sun::star::uno::Exception, com::sun::star::uno::RuntimeException);
82 /* XSignatureCreationResultBroadcaster */
83 void SAL_CALL addSignatureCreationResultListener(
84 const com::sun::star::uno::Reference<
85 com::sun::star::xml::crypto::sax::XSignatureCreationResultListener >& listener )
86 throw (com::sun::star::uno::Exception, com::sun::star::uno::RuntimeException);
88 void SAL_CALL removeSignatureCreationResultListener(
89 const com::sun::star::uno::Reference<
90 com::sun::star::xml::crypto::sax::XSignatureCreationResultListener >& listener )
91 throw (com::sun::star::uno::RuntimeException);
93 /* XInitialization */
94 virtual void SAL_CALL initialize(
95 const com::sun::star::uno::Sequence< com::sun::star::uno::Any >& aArguments )
96 throw (com::sun::star::uno::Exception, com::sun::star::uno::RuntimeException);
98 /* XServiceInfo */
99 virtual rtl::OUString SAL_CALL getImplementationName( )
100 throw (com::sun::star::uno::RuntimeException);
101 virtual sal_Bool SAL_CALL supportsService( const rtl::OUString& ServiceName )
102 throw (com::sun::star::uno::RuntimeException);
103 virtual com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames( )
104 throw (com::sun::star::uno::RuntimeException);
107 rtl::OUString SignatureCreatorImpl_getImplementationName()
108 throw ( com::sun::star::uno::RuntimeException );
110 sal_Bool SAL_CALL SignatureCreatorImpl_supportsService( const rtl::OUString& ServiceName )
111 throw ( com::sun::star::uno::RuntimeException );
113 com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL SignatureCreatorImpl_getSupportedServiceNames( )
114 throw ( com::sun::star::uno::RuntimeException );
116 com::sun::star::uno::Reference< com::sun::star::uno::XInterface >
117 SAL_CALL SignatureCreatorImpl_createInstance(
118 const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > & rSMgr)
119 throw ( com::sun::star::uno::Exception );
121 #endif
125 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */