update credits
[LibreOffice.git] / xmlsecurity / source / helper / xmlsignaturehelper2.hxx
blob53a216a1dd169b22260802f7208645b2fc70bac9
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 #include <tools/link.hxx>
21 #include <rtl/ustring.hxx>
23 #include <cppuhelper/implbase1.hxx>
24 #include <cppuhelper/implbase3.hxx>
26 #include <com/sun/star/xml/sax/XDocumentHandler.hpp>
27 #include <com/sun/star/xml/crypto/sax/XSignatureCreationResultListener.hpp>
28 #include <com/sun/star/xml/crypto/sax/XSignatureVerifyResultListener.hpp>
30 namespace com {
31 namespace sun {
32 namespace star {
33 namespace io {
34 class XInputStream; }
35 namespace embed {
36 class XStorage; }
37 }}}
40 // MT: Not needed any more, remove later...
42 class ImplXMLSignatureListener : public cppu::WeakImplHelper3
44 com::sun::star::xml::crypto::sax::XSignatureCreationResultListener,
45 com::sun::star::xml::crypto::sax::XSignatureVerifyResultListener,
46 com::sun::star::xml::sax::XDocumentHandler
49 private:
50 Link maCreationResultListenerListener;
51 Link maVerifyResultListenerListener;
52 Link maStartVerifySignatureElementListener;
54 com::sun::star::uno::Reference<
55 com::sun::star::xml::sax::XDocumentHandler > m_xNextHandler;
57 public:
58 ImplXMLSignatureListener( const Link& rCreationResultListenerListener, const Link rVerifyResultListenerListener, const Link rStartVerifySignatureElement );
59 ~ImplXMLSignatureListener();
61 void setNextHandler(com::sun::star::uno::Reference<
62 com::sun::star::xml::sax::XDocumentHandler > xNextHandler);
64 // com::sun::star::xml::crypto::sax::XSignatureCreationResultListener
65 virtual void SAL_CALL signatureCreated( sal_Int32 securityId, com::sun::star::xml::crypto::SecurityOperationStatus creationResult )
66 throw (com::sun::star::uno::RuntimeException);
68 // com::sun::star::xml::crypto::sax::XSignatureVerifyResultListener
69 virtual void SAL_CALL signatureVerified( sal_Int32 securityId, com::sun::star::xml::crypto::SecurityOperationStatus verifyResult )
70 throw (com::sun::star::uno::RuntimeException);
72 // com::sun::star::xml::sax::XDocumentHandler
73 virtual void SAL_CALL startElement( const OUString& aName, const com::sun::star::uno::Reference< com::sun::star::xml::sax::XAttributeList >& xAttribs )
74 throw (com::sun::star::xml::sax::SAXException, com::sun::star::uno::RuntimeException);
76 virtual void SAL_CALL startDocument( )
77 throw (com::sun::star::xml::sax::SAXException, com::sun::star::uno::RuntimeException);
79 virtual void SAL_CALL endDocument( )
80 throw (com::sun::star::xml::sax::SAXException, com::sun::star::uno::RuntimeException);
82 virtual void SAL_CALL endElement( const OUString& aName )
83 throw (com::sun::star::xml::sax::SAXException, com::sun::star::uno::RuntimeException);
85 virtual void SAL_CALL characters( const OUString& aChars )
86 throw (com::sun::star::xml::sax::SAXException, com::sun::star::uno::RuntimeException);
88 virtual void SAL_CALL ignorableWhitespace( const OUString& aWhitespaces )
89 throw (com::sun::star::xml::sax::SAXException, com::sun::star::uno::RuntimeException);
91 virtual void SAL_CALL processingInstruction( const OUString& aTarget, const OUString& aData )
92 throw (com::sun::star::xml::sax::SAXException, com::sun::star::uno::RuntimeException);
94 virtual void SAL_CALL setDocumentLocator( const com::sun::star::uno::Reference< com::sun::star::xml::sax::XLocator >& xLocator )
95 throw (com::sun::star::xml::sax::SAXException, com::sun::star::uno::RuntimeException);
99 // ---------------------------------------------------------------------------------
100 // XUriBinding
101 // ---------------------------------------------------------------------------------
103 class UriBindingHelper : public cppu::WeakImplHelper1
105 com::sun::star::xml::crypto::XUriBinding
108 private:
109 com::sun::star::uno::Reference < com::sun::star::embed::XStorage > mxStorage;
112 public:
113 UriBindingHelper();
114 UriBindingHelper( const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >& rxStorage );
116 void SAL_CALL setUriBinding( const OUString& uri, const com::sun::star::uno::Reference< com::sun::star::io::XInputStream >& aInputStream )
117 throw (com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException);
119 com::sun::star::uno::Reference< com::sun::star::io::XInputStream > SAL_CALL getUriBinding( const OUString& uri )
120 throw (com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException);
122 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 );
125 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */