1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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 _NSSINITIALIZER_HXX
21 #define _NSSINITIALIZER_HXX
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>
27 #include <cppuhelper/implbase2.hxx>
29 #define NSS_SERVICE_NAME "com.sun.star.xml.crypto.NSSInitializer"
31 class ONSSInitializer
: public cppu::WeakImplHelper2
33 ::com::sun::star::xml::crypto::XNSSInitializer
,
34 ::com::sun::star::lang::XServiceInfo
38 ::com::sun::star::uno::Reference
< ::com::sun::star::uno::XComponentContext
> m_xContext
;
44 ONSSInitializer( const ::com::sun::star::uno::Reference
< ::com::sun::star::uno::XComponentContext
> &rxContext
);
45 virtual ~ONSSInitializer();
47 bool initNSS( const ::com::sun::star::uno::Reference
< ::com::sun::star::uno::XComponentContext
> &rxContext
);
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
);
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
);
56 virtual OUString SAL_CALL
getImplementationName()
57 throw (::com::sun::star::uno::RuntimeException
);
59 virtual sal_Bool SAL_CALL
supportsService( const OUString
& ServiceName
)
60 throw (::com::sun::star::uno::RuntimeException
);
62 virtual ::com::sun::star::uno::Sequence
< OUString
> SAL_CALL
getSupportedServiceNames()
63 throw (::com::sun::star::uno::RuntimeException
);
66 OUString
ONSSInitializer_getImplementationName()
67 throw ( ::com::sun::star::uno::RuntimeException
);
69 sal_Bool SAL_CALL
ONSSInitializer_supportsService( const OUString
& ServiceName
)
70 throw ( ::com::sun::star::uno::RuntimeException
);
72 com::sun::star::uno::Sequence
< OUString
> SAL_CALL
ONSSInitializer_getSupportedServiceNames()
73 throw ( ::com::sun::star::uno::RuntimeException
);
75 com::sun::star::uno::Reference
< ::com::sun::star::uno::XInterface
>
76 SAL_CALL
ONSSInitializer_createInstance( const ::com::sun::star::uno::Reference
< ::com::sun::star::lang::XMultiServiceFactory
> & rSMgr
)
77 throw ( ::com::sun::star::uno::Exception
);
81 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */