Bump version to 5.0-14
[LibreOffice.git] / xmlsecurity / source / framework / signatureverifierimpl.hxx
blob950a9a499e83fe96802bc06cd512495180369db7
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 INCLUDED_XMLSECURITY_SOURCE_FRAMEWORK_SIGNATUREVERIFIERIMPL_HXX
21 #define INCLUDED_XMLSECURITY_SOURCE_FRAMEWORK_SIGNATUREVERIFIERIMPL_HXX
23 #include <com/sun/star/xml/crypto/sax/XSignatureVerifyResultListener.hpp>
24 #include <com/sun/star/xml/crypto/sax/XSignatureVerifyResultBroadcaster.hpp>
25 #include <com/sun/star/xml/crypto/XXMLSecurityContext.hpp>
26 #include <com/sun/star/lang/XInitialization.hpp>
27 #include <com/sun/star/lang/XServiceInfo.hpp>
28 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
29 #include <com/sun/star/uno/XComponentContext.hpp>
30 #include <cppuhelper/implbase3.hxx>
32 #include "signatureengine.hxx"
34 typedef cppu::ImplInheritanceHelper3
36 SignatureEngine,
37 com::sun::star::xml::crypto::sax::XSignatureVerifyResultBroadcaster,
38 com::sun::star::lang::XInitialization,
39 com::sun::star::lang::XServiceInfo
40 > SignatureVerifierImpl_Base;
42 class SignatureVerifierImpl : public SignatureVerifierImpl_Base
43 /****** SignatureVerifier.hxx/CLASS SignatureVerifierImpl *********************
45 * NAME
46 * SignatureVerifierImpl -- verifies a signature
48 * FUNCTION
49 * Collects all resources for a signature verification, then verifies the
50 * signature by invoking a xmlsec-based signature bridge component.
52 * AUTHOR
53 * Michael Mi
54 * Email: michael.mi@sun.com
55 ******************************************************************************/
57 private:
58 com::sun::star::uno::Reference<
59 com::sun::star::xml::crypto::XXMLSecurityContext > m_xXMLSecurityContext;
61 virtual void notifyResultListener() const
62 throw (com::sun::star::uno::Exception, com::sun::star::uno::RuntimeException) SAL_OVERRIDE;
63 virtual bool checkReady() const SAL_OVERRIDE;
64 virtual void startEngine( const com::sun::star::uno::Reference<
65 com::sun::star::xml::crypto::XXMLSignatureTemplate >&
66 xSignatureTemplate)
67 throw (com::sun::star::uno::Exception, com::sun::star::uno::RuntimeException) SAL_OVERRIDE;
69 public:
70 explicit SignatureVerifierImpl( const com::sun::star::uno::Reference<
71 com::sun::star::uno::XComponentContext >& rxContext);
72 virtual ~SignatureVerifierImpl();
74 /* XSignatureVerifyResultBroadcaster */
75 virtual void SAL_CALL addSignatureVerifyResultListener(
76 const com::sun::star::uno::Reference<
77 com::sun::star::xml::crypto::sax::XSignatureVerifyResultListener >&
78 listener )
79 throw (com::sun::star::uno::Exception, com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
80 virtual void SAL_CALL removeSignatureVerifyResultListener(
81 const com::sun::star::uno::Reference<
82 com::sun::star::xml::crypto::sax::XSignatureVerifyResultListener >&
83 listener )
84 throw (com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
86 /* XInitialization */
87 virtual void SAL_CALL initialize(
88 const com::sun::star::uno::Sequence< com::sun::star::uno::Any >& aArguments )
89 throw (com::sun::star::uno::Exception, com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
91 /* XServiceInfo */
92 virtual OUString SAL_CALL getImplementationName( )
93 throw (com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
94 virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName )
95 throw (com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
96 virtual com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( )
97 throw (com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
100 OUString SignatureVerifierImpl_getImplementationName()
101 throw ( com::sun::star::uno::RuntimeException );
103 com::sun::star::uno::Sequence< OUString > SAL_CALL SignatureVerifierImpl_getSupportedServiceNames( )
104 throw ( com::sun::star::uno::RuntimeException );
106 com::sun::star::uno::Reference< com::sun::star::uno::XInterface >
107 SAL_CALL SignatureVerifierImpl_createInstance(
108 const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > & rSMgr)
109 throw ( com::sun::star::uno::Exception );
111 #endif
114 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */