Bump version to 5.0-14
[LibreOffice.git] / xmlsecurity / source / framework / decryptorimpl.hxx
blob1474aef4511ffcd494dea89b8f32fd5a7653869c
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_DECRYPTORIMPL_HXX
21 #define INCLUDED_XMLSECURITY_SOURCE_FRAMEWORK_DECRYPTORIMPL_HXX
23 #include <com/sun/star/xml/crypto/sax/XDecryptionResultBroadcaster.hpp>
24 #include <com/sun/star/xml/crypto/sax/XDecryptionResultListener.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 <cppuhelper/implbase3.hxx>
31 #include "encryptionengine.hxx"
33 typedef cppu::ImplInheritanceHelper3
35 EncryptionEngine,
36 com::sun::star::xml::crypto::sax::XDecryptionResultBroadcaster,
37 com::sun::star::lang::XInitialization,
38 com::sun::star::lang::XServiceInfo
39 > DecryptorImpl_Base;
40 class DecryptorImpl : public DecryptorImpl_Base
41 /****** DecryptorImpl.hxx/CLASS DecryptorImpl *********************************
43 * NAME
44 * DecryptorImpl -- decrypts an encryption
46 * FUNCTION
47 * Collects all resources for decrypting an encryption, then decrypts the
48 * encryption by invoking a xmlsec-based encryption bridge component.
50 * AUTHOR
51 * Michael Mi
52 * Email: michael.mi@sun.com
53 ******************************************************************************/
55 private:
56 com::sun::star::uno::Reference<
57 com::sun::star::xml::crypto::XXMLSecurityContext > m_xXMLSecurityContext;
59 virtual void notifyResultListener() const
60 throw (com::sun::star::uno::Exception, com::sun::star::uno::RuntimeException) SAL_OVERRIDE;
61 virtual bool checkReady() const SAL_OVERRIDE;
62 virtual void startEngine( const com::sun::star::uno::Reference<
63 com::sun::star::xml::crypto::XXMLEncryptionTemplate >&
64 xEncryptionTemplate)
65 throw (com::sun::star::uno::Exception, com::sun::star::uno::RuntimeException) SAL_OVERRIDE;
67 public:
68 explicit DecryptorImpl(const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext > & xContext);
69 virtual ~DecryptorImpl();
71 /* XDecryptionResultBroadcaster */
72 virtual void SAL_CALL addDecryptionResultListener(
73 const com::sun::star::uno::Reference<
74 com::sun::star::xml::crypto::sax::XDecryptionResultListener >&
75 listener )
76 throw (com::sun::star::uno::Exception, com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
77 virtual void SAL_CALL removeDecryptionResultListener(
78 const com::sun::star::uno::Reference<
79 com::sun::star::xml::crypto::sax::XDecryptionResultListener >&
80 listener )
81 throw (com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
83 /* XInitialization */
84 virtual void SAL_CALL initialize(
85 const com::sun::star::uno::Sequence< com::sun::star::uno::Any >& aArguments )
86 throw (com::sun::star::uno::Exception, com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
88 /* XServiceInfo */
89 virtual OUString SAL_CALL getImplementationName( )
90 throw (com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
91 virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName )
92 throw (com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
93 virtual com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( )
94 throw (com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
97 OUString DecryptorImpl_getImplementationName()
98 throw ( com::sun::star::uno::RuntimeException );
100 com::sun::star::uno::Sequence< OUString > SAL_CALL DecryptorImpl_getSupportedServiceNames( )
101 throw ( com::sun::star::uno::RuntimeException );
103 com::sun::star::uno::Reference< com::sun::star::uno::XInterface >
104 SAL_CALL DecryptorImpl_createInstance(
105 const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >&
106 rSMgr)
107 throw ( com::sun::star::uno::Exception );
109 #endif
111 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */