Branch data 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 _NSSINITIALIZER_HXX
21 : : #define _NSSINITIALIZER_HXX
22 : :
23 : : #include <com/sun/star/xml/crypto/XDigestContextSupplier.hpp>
24 : : #include <com/sun/star/xml/crypto/XCipherContextSupplier.hpp>
25 : : #include <com/sun/star/lang/XServiceInfo.hpp>
26 : : #include <com/sun/star/lang/XMultiServiceFactory.hpp>
27 : :
28 : : #include <cppuhelper/implbase3.hxx>
29 : :
30 : : #define NSS_SERVICE_NAME "com.sun.star.xml.crypto.NSSInitializer"
31 : :
32 : : class ONSSInitializer : public cppu::WeakImplHelper3
33 : : <
34 : : ::com::sun::star::xml::crypto::XDigestContextSupplier,
35 : : ::com::sun::star::xml::crypto::XCipherContextSupplier,
36 : : ::com::sun::star::lang::XServiceInfo
37 : : >
38 : : {
39 : : protected:
40 : : ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > mxMSF;
41 : :
42 : 42 : ONSSInitializer()
43 : 42 : {}
44 : :
45 : : public:
46 : : ONSSInitializer( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > &rxMSF );
47 : : virtual ~ONSSInitializer();
48 : :
49 : : bool initNSS( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > &xMSF );
50 : :
51 : : /* XDigestContextSupplier */
52 : : 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);
53 : :
54 : : /* XCipherContextSupplier */
55 : : 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);
56 : :
57 : : /* XServiceInfo */
58 : : virtual rtl::OUString SAL_CALL getImplementationName()
59 : : throw (::com::sun::star::uno::RuntimeException);
60 : :
61 : : virtual sal_Bool SAL_CALL supportsService( const rtl::OUString& ServiceName )
62 : : throw (::com::sun::star::uno::RuntimeException);
63 : :
64 : : virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames()
65 : : throw (::com::sun::star::uno::RuntimeException);
66 : : };
67 : :
68 : : rtl::OUString ONSSInitializer_getImplementationName()
69 : : throw ( ::com::sun::star::uno::RuntimeException );
70 : :
71 : : sal_Bool SAL_CALL ONSSInitializer_supportsService( const rtl::OUString& ServiceName )
72 : : throw ( ::com::sun::star::uno::RuntimeException );
73 : :
74 : : com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL ONSSInitializer_getSupportedServiceNames()
75 : : throw ( ::com::sun::star::uno::RuntimeException );
76 : :
77 : : com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >
78 : : SAL_CALL ONSSInitializer_createInstance( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & rSMgr )
79 : : throw ( ::com::sun::star::uno::Exception );
80 : :
81 : : #endif
82 : :
83 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|