Line data Source code
1 : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : /*
3 : * This file is part of the LibreOffice project.
4 : *
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/.
8 : *
9 : * This file incorporates work covered by the following license notice:
10 : *
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 .
18 : */
19 :
20 : #ifndef INCLUDED_XMLSECURITY_SOURCE_XMLSEC_NSS_NSSINITIALIZER_HXX
21 : #define INCLUDED_XMLSECURITY_SOURCE_XMLSEC_NSS_NSSINITIALIZER_HXX
22 :
23 : #include <com/sun/star/xml/crypto/XNSSInitializer.hpp>
24 : #include <com/sun/star/lang/XServiceInfo.hpp>
25 : #include <com/sun/star/lang/XMultiServiceFactory.hpp>
26 :
27 : #include <cppuhelper/implbase2.hxx>
28 :
29 : #define NSS_SERVICE_NAME "com.sun.star.xml.crypto.NSSInitializer"
30 :
31 : class ONSSInitializer : public cppu::WeakImplHelper2
32 : <
33 : ::com::sun::star::xml::crypto::XNSSInitializer,
34 : ::com::sun::star::lang::XServiceInfo
35 : >
36 : {
37 : protected:
38 : ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > m_xContext;
39 :
40 144 : ONSSInitializer()
41 144 : {}
42 :
43 : public:
44 : ONSSInitializer( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > &rxContext );
45 : virtual ~ONSSInitializer();
46 :
47 : bool initNSS( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > &rxContext );
48 :
49 : /* XDigestContextSupplier */
50 : virtual ::com::sun::star::uno::Reference< ::com::sun::star::xml::crypto::XDigestContext > SAL_CALL getDigestContext( ::sal_Int32 nDigestID, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue >& aParams ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
51 :
52 : /* XCipherContextSupplier */
53 : virtual ::com::sun::star::uno::Reference< ::com::sun::star::xml::crypto::XCipherContext > SAL_CALL getCipherContext( ::sal_Int32 nCipherID, const ::com::sun::star::uno::Sequence< ::sal_Int8 >& aKey, const ::com::sun::star::uno::Sequence< ::sal_Int8 >& aInitializationVector, sal_Bool bEncryption, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue >& aParams ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
54 :
55 : /* XServiceInfo */
56 : virtual OUString SAL_CALL getImplementationName()
57 : throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
58 :
59 : virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName )
60 : throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
61 :
62 : virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames()
63 : throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
64 : };
65 :
66 : OUString ONSSInitializer_getImplementationName()
67 : throw ( ::com::sun::star::uno::RuntimeException );
68 :
69 : com::sun::star::uno::Sequence< OUString > SAL_CALL ONSSInitializer_getSupportedServiceNames()
70 : throw ( ::com::sun::star::uno::RuntimeException );
71 :
72 : com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >
73 : SAL_CALL ONSSInitializer_createInstance( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & rSMgr )
74 : throw ( ::com::sun::star::uno::Exception );
75 :
76 : #endif
77 :
78 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|