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 .
20 #ifndef INCLUDED_XMLSECURITY_SOURCE_FRAMEWORK_SIGNATURECREATORIMPL_HXX
21 #define INCLUDED_XMLSECURITY_SOURCE_FRAMEWORK_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 <com/sun/star/lang/XMultiServiceFactory.hpp>
30 #include <cppuhelper/implbase4.hxx>
32 #include "signatureengine.hxx"
34 typedef cppu::ImplInheritanceHelper4
37 com::sun::star::xml::crypto::sax::XBlockerMonitor
,
38 com::sun::star::xml::crypto::sax::XSignatureCreationResultBroadcaster
,
39 com::sun::star::lang::XInitialization
,
40 com::sun::star::lang::XServiceInfo
41 > SignatureCreatorImpl_Base
;
43 class SignatureCreatorImpl
: public SignatureCreatorImpl_Base
44 /****** SignatureCreatorImpl.hxx/CLASS SignatureCreatorImpl *******************
47 * SignatureCreatorImpl -- generates a signature
50 * Collects all resources for a signature generation, then generates the
51 * signature by invoking a xmlsec-based signature bridge component.
55 * Email: michael.mi@sun.com
56 ******************************************************************************/
60 * the Id of template blocker.
62 sal_Int32 m_nIdOfBlocker
;
64 com::sun::star::uno::Reference
<
65 com::sun::star::xml::crypto::XSecurityEnvironment
> m_xSecurityEnvironment
;
67 virtual void notifyResultListener() const
68 throw (com::sun::star::uno::Exception
, com::sun::star::uno::RuntimeException
) SAL_OVERRIDE
;
69 virtual void clearUp( ) const SAL_OVERRIDE
;
70 virtual bool checkReady() const SAL_OVERRIDE
;
71 virtual void startEngine( const com::sun::star::uno::Reference
<
72 com::sun::star::xml::crypto::XXMLSignatureTemplate
>&
74 throw (com::sun::star::uno::Exception
, com::sun::star::uno::RuntimeException
) SAL_OVERRIDE
;
77 explicit SignatureCreatorImpl( const com::sun::star::uno::Reference
< com::sun::star::uno::XComponentContext
> & xContext
);
78 virtual ~SignatureCreatorImpl();
81 virtual void SAL_CALL
setBlockerId( sal_Int32 id
)
82 throw (com::sun::star::uno::Exception
, com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
84 /* XSignatureCreationResultBroadcaster */
85 void SAL_CALL
addSignatureCreationResultListener(
86 const com::sun::star::uno::Reference
<
87 com::sun::star::xml::crypto::sax::XSignatureCreationResultListener
>& listener
)
88 throw (com::sun::star::uno::Exception
, com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
90 void SAL_CALL
removeSignatureCreationResultListener(
91 const com::sun::star::uno::Reference
<
92 com::sun::star::xml::crypto::sax::XSignatureCreationResultListener
>& listener
)
93 throw (com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
96 virtual void SAL_CALL
initialize(
97 const com::sun::star::uno::Sequence
< com::sun::star::uno::Any
>& aArguments
)
98 throw (com::sun::star::uno::Exception
, com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
101 virtual OUString SAL_CALL
getImplementationName( )
102 throw (com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
103 virtual sal_Bool SAL_CALL
supportsService( const OUString
& ServiceName
)
104 throw (com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
105 virtual com::sun::star::uno::Sequence
< OUString
> SAL_CALL
getSupportedServiceNames( )
106 throw (com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
109 OUString
SignatureCreatorImpl_getImplementationName()
110 throw ( com::sun::star::uno::RuntimeException
);
112 com::sun::star::uno::Sequence
< OUString
> SAL_CALL
SignatureCreatorImpl_getSupportedServiceNames( )
113 throw ( com::sun::star::uno::RuntimeException
);
115 com::sun::star::uno::Reference
< com::sun::star::uno::XInterface
>
116 SAL_CALL
SignatureCreatorImpl_createInstance(
117 const com::sun::star::uno::Reference
< com::sun::star::lang::XMultiServiceFactory
> & rSMgr
)
118 throw ( com::sun::star::uno::Exception
);
124 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */