1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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 .
22 #include <com/sun/star/xml/crypto/sax/XBlockerMonitor.hpp>
23 #include <com/sun/star/xml/crypto/sax/XSignatureCreationResultBroadcaster.hpp>
24 #include <com/sun/star/lang/XInitialization.hpp>
25 #include <com/sun/star/lang/XServiceInfo.hpp>
26 #include <cppuhelper/implbase.hxx>
28 #include <framework/signatureengine.hxx>
30 namespace com::sun::star::xml::crypto
{ class XSecurityEnvironment
; }
31 namespace com::sun::star::xml::crypto::sax
{ class XSignatureCreationResultListener
;}
33 typedef cppu::ImplInheritanceHelper
36 css::xml::crypto::sax::XBlockerMonitor
,
37 css::xml::crypto::sax::XSignatureCreationResultBroadcaster
,
38 css::lang::XInitialization
,
39 css::lang::XServiceInfo
40 > SignatureCreatorImpl_Base
;
42 class SignatureCreatorImpl final
: public SignatureCreatorImpl_Base
43 /****** SignatureCreatorImpl.hxx/CLASS SignatureCreatorImpl *******************
46 * SignatureCreatorImpl -- generates a signature
49 * Collects all resources for a signature generation, then generates the
50 * signature by invoking a xmlsec-based signature bridge component.
51 ******************************************************************************/
55 * the Id of template blocker.
57 sal_Int32 m_nIdOfBlocker
;
59 css::uno::Reference
< css::xml::crypto::XSecurityEnvironment
> m_xSecurityEnvironment
;
61 virtual void notifyResultListener() const override
;
62 virtual void clearUp( ) const override
;
63 virtual void startEngine( const rtl::Reference
<XMLSignatureTemplateImpl
>& xSignatureTemplate
) override
;
66 explicit SignatureCreatorImpl();
67 virtual ~SignatureCreatorImpl() override
;
70 virtual void SAL_CALL
setBlockerId( sal_Int32 id
) override
;
72 /* XSignatureCreationResultBroadcaster */
73 void SAL_CALL
addSignatureCreationResultListener(
74 const css::uno::Reference
< css::xml::crypto::sax::XSignatureCreationResultListener
>& listener
) override
;
76 void SAL_CALL
removeSignatureCreationResultListener(
77 const css::uno::Reference
< css::xml::crypto::sax::XSignatureCreationResultListener
>& listener
) override
;
80 virtual void SAL_CALL
initialize(
81 const css::uno::Sequence
< css::uno::Any
>& aArguments
) override
;
84 virtual OUString SAL_CALL
getImplementationName( ) override
;
85 virtual sal_Bool SAL_CALL
supportsService( const OUString
& ServiceName
) override
;
86 virtual css::uno::Sequence
< OUString
> SAL_CALL
getSupportedServiceNames( ) override
;
89 /// @throws css::uno::RuntimeException
90 OUString
SignatureCreatorImpl_getImplementationName();
92 /// @throws css::uno::RuntimeException
93 css::uno::Sequence
< OUString
> SignatureCreatorImpl_getSupportedServiceNames( );
96 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */