Bump version to 5.0-14
[LibreOffice.git] / xmlsecurity / source / helper / xmlsignaturehelper2.hxx
blob6a705f400e703e51325c1c06aa782ab634166adb
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_HELPER_XMLSIGNATUREHELPER2_HXX
21 #define INCLUDED_XMLSECURITY_SOURCE_HELPER_XMLSIGNATUREHELPER2_HXX
23 #include <tools/link.hxx>
24 #include <rtl/ustring.hxx>
26 #include <cppuhelper/implbase1.hxx>
27 #include <cppuhelper/implbase3.hxx>
29 #include <com/sun/star/xml/sax/XDocumentHandler.hpp>
30 #include <com/sun/star/xml/crypto/sax/XSignatureCreationResultListener.hpp>
31 #include <com/sun/star/xml/crypto/sax/XSignatureVerifyResultListener.hpp>
33 namespace com {
34 namespace sun {
35 namespace star {
36 namespace io {
37 class XInputStream; }
38 namespace embed {
39 class XStorage; }
40 }}}
42 // MT: Not needed any more, remove later...
44 class ImplXMLSignatureListener : public cppu::WeakImplHelper3
46 com::sun::star::xml::crypto::sax::XSignatureCreationResultListener,
47 com::sun::star::xml::crypto::sax::XSignatureVerifyResultListener,
48 com::sun::star::xml::sax::XDocumentHandler
51 private:
52 Link<> maCreationResultListenerListener;
53 Link<> maVerifyResultListenerListener;
54 Link<> maStartVerifySignatureElementListener;
56 com::sun::star::uno::Reference<
57 com::sun::star::xml::sax::XDocumentHandler > m_xNextHandler;
59 public:
60 ImplXMLSignatureListener(const Link<>& rCreationResultListenerListener, const Link<>& rVerifyResultListenerListener, const Link<>& rStartVerifySignatureElement);
61 virtual ~ImplXMLSignatureListener();
63 void setNextHandler(com::sun::star::uno::Reference<
64 com::sun::star::xml::sax::XDocumentHandler > xNextHandler);
66 // com::sun::star::xml::crypto::sax::XSignatureCreationResultListener
67 virtual void SAL_CALL signatureCreated( sal_Int32 securityId, com::sun::star::xml::crypto::SecurityOperationStatus creationResult )
68 throw (com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
70 // com::sun::star::xml::crypto::sax::XSignatureVerifyResultListener
71 virtual void SAL_CALL signatureVerified( sal_Int32 securityId, com::sun::star::xml::crypto::SecurityOperationStatus verifyResult )
72 throw (com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
74 // com::sun::star::xml::sax::XDocumentHandler
75 virtual void SAL_CALL startElement( const OUString& aName, const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList >& xAttribs )
76 throw (com::sun::star::xml::sax::SAXException, com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
78 virtual void SAL_CALL startDocument( )
79 throw (com::sun::star::xml::sax::SAXException, com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
81 virtual void SAL_CALL endDocument( )
82 throw (com::sun::star::xml::sax::SAXException, com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
84 virtual void SAL_CALL endElement( const OUString& aName )
85 throw (com::sun::star::xml::sax::SAXException, com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
87 virtual void SAL_CALL characters( const OUString& aChars )
88 throw (com::sun::star::xml::sax::SAXException, com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
90 virtual void SAL_CALL ignorableWhitespace( const OUString& aWhitespaces )
91 throw (com::sun::star::xml::sax::SAXException, com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
93 virtual void SAL_CALL processingInstruction( const OUString& aTarget, const OUString& aData )
94 throw (com::sun::star::xml::sax::SAXException, com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
96 virtual void SAL_CALL setDocumentLocator( const com::sun::star::uno::Reference< com::sun::star::xml::sax::XLocator >& xLocator )
97 throw (com::sun::star::xml::sax::SAXException, com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
100 // XUriBinding
102 class UriBindingHelper : public cppu::WeakImplHelper1
104 com::sun::star::xml::crypto::XUriBinding
107 private:
108 com::sun::star::uno::Reference < com::sun::star::embed::XStorage > mxStorage;
110 public:
111 UriBindingHelper();
112 explicit UriBindingHelper( const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >& rxStorage );
114 void SAL_CALL setUriBinding( const OUString& uri, const com::sun::star::uno::Reference< com::sun::star::io::XInputStream >& aInputStream )
115 throw (com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
117 com::sun::star::uno::Reference< com::sun::star::io::XInputStream > SAL_CALL getUriBinding( const OUString& uri )
118 throw (com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
120 static com::sun::star::uno::Reference < com::sun::star::io::XInputStream > OpenInputStream( const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >& rxStore, const OUString& rURI );
123 #endif // INCLUDED_XMLSECURITY_SOURCE_HELPER_XMLSIGNATUREHELPER2_HXX
125 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */