merged tag ooo/OOO330_m14
[LibreOffice.git] / xmlsecurity / source / framework / encryptionengine.hxx
blob375fcc42b239e5a4f40fc08005a8d31d6410ca7a
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * This file is part of OpenOffice.org.
11 * OpenOffice.org is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License version 3
13 * only, as published by the Free Software Foundation.
15 * OpenOffice.org is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU Lesser General Public License version 3 for more details
19 * (a copy is included in the LICENSE file that accompanied this code).
21 * You should have received a copy of the GNU Lesser General Public License
22 * version 3 along with OpenOffice.org. If not, see
23 * <http://www.openoffice.org/license.html>
24 * for a copy of the LGPLv3 License.
26 ************************************************************************/
28 #ifndef _ENCRYPTIONENGINE_HXX
29 #define _ENCRYPTIONENGINE_HXX
31 #include <com/sun/star/xml/crypto/sax/XReferenceResolvedListener.hpp>
32 #include <com/sun/star/xml/crypto/sax/XReferenceResolvedBroadcaster.hpp>
33 #include <com/sun/star/xml/crypto/sax/XBlockerMonitor.hpp>
34 #include <com/sun/star/xml/crypto/sax/XKeyCollector.hpp>
35 #include <com/sun/star/xml/crypto/sax/XMissionTaker.hpp>
36 #include <com/sun/star/xml/crypto/sax/XSAXEventKeeper.hpp>
37 #include <com/sun/star/xml/crypto/XXMLSecurityContext.hpp>
38 #include <com/sun/star/xml/crypto/XXMLEncryption.hpp>
39 #include <cppuhelper/implbase1.hxx>
41 #include "securityengine.hxx"
43 class EncryptionEngine : public cppu::ImplInheritanceHelper1
45 SecurityEngine,
46 com::sun::star::xml::crypto::sax::XBlockerMonitor
48 /****** encryptionEngine.hxx/CLASS encryptionEngine ***************************
50 * NAME
51 * EncryptionEngine -- Base class of Encryptor and Decryptor
53 * FUNCTION
54 * Maintains common members and methods related with encryption.
56 * HISTORY
57 * 05.01.2004 - Interface supported: XBlockerMonitor
59 * AUTHOR
60 * Michael Mi
61 * Email: michael.mi@sun.com
62 ******************************************************************************/
64 protected:
66 * the Encryption bridge component, which performs encrypt and decrypt
67 * operation based on xmlsec library.
69 com::sun::star::uno::Reference<
70 com::sun::star::xml::crypto::XXMLEncryption > m_xXMLEncryption;
73 * the Id of template blocker.
75 sal_Int32 m_nIdOfBlocker;
77 protected:
78 EncryptionEngine( );
79 virtual ~EncryptionEngine(){};
81 virtual void tryToPerform( )
82 throw (com::sun::star::uno::Exception, com::sun::star::uno::RuntimeException);
83 virtual void clearUp( ) const;
84 virtual bool checkReady() const;
87 * starts the main function. This method will be implemented by any sub-class.
88 * For a Encryptor, it performs encryption operation;
89 * for a Decryptor, decryption operation is performed.
91 virtual void startEngine( const com::sun::star::uno::Reference<
92 com::sun::star::xml::crypto::XXMLEncryptionTemplate >&)
93 throw (com::sun::star::uno::Exception, com::sun::star::uno::RuntimeException)
94 {};
96 public:
97 /* XBlockerMonitor */
98 virtual void SAL_CALL setBlockerId( sal_Int32 id )
99 throw (com::sun::star::uno::Exception, com::sun::star::uno::RuntimeException);
102 #endif