Bump version to 6.0-36
[LibreOffice.git] / xmlsecurity / source / gpg / XMLSecurityContext.hxx
blob4355cc0ce67a6c98ca70c3f319495e2275bf3e26
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/.
8 */
10 #ifndef INCLUDED_XMLSECURITY_SOURCE_GPG_XMLSECURITYCONTEXT_HXX
11 #define INCLUDED_XMLSECURITY_SOURCE_GPG_XMLSECURITYCONTEXT_HXX
13 #include <sal/config.h>
14 #include <rtl/ustring.hxx>
15 #include <cppuhelper/factory.hxx>
16 #include <cppuhelper/implbase.hxx>
17 #include <com/sun/star/uno/Exception.hpp>
19 #include <com/sun/star/uno/Reference.hxx>
20 #include <com/sun/star/lang/XSingleServiceFactory.hpp>
21 #include <com/sun/star/lang/XServiceInfo.hpp>
22 #include <com/sun/star/lang/XUnoTunnel.hpp>
23 #include <com/sun/star/xml/crypto/XSecurityEnvironment.hpp>
24 #include <com/sun/star/security/SecurityInfrastructureException.hpp>
25 #include <com/sun/star/xml/crypto/XXMLSecurityContext.hpp>
27 #include <vector>
29 class XMLSecurityContextGpg : public cppu::WeakImplHelper< css::xml::crypto::XXMLSecurityContext,
30 css::lang::XServiceInfo>
32 private:
33 std::vector< css::uno::Reference< css::xml::crypto::XSecurityEnvironment > > m_vSecurityEnvironments;
35 sal_Int32 m_nDefaultEnvIndex;
37 public:
38 XMLSecurityContextGpg();
39 virtual ~XMLSecurityContextGpg() override;
41 // XXMLSecurityContext
42 virtual sal_Int32 SAL_CALL addSecurityEnvironment(
43 const css::uno::Reference< css::xml::crypto::XSecurityEnvironment >& aSecurityEnvironment) override;
45 virtual ::sal_Int32 SAL_CALL getSecurityEnvironmentNumber() override;
47 virtual css::uno::Reference<css::xml::crypto::XSecurityEnvironment > SAL_CALL getSecurityEnvironmentByIndex(sal_Int32 index) override;
49 virtual css::uno::Reference<css::xml::crypto::XSecurityEnvironment > SAL_CALL getSecurityEnvironment() override;
51 virtual sal_Int32 SAL_CALL getDefaultSecurityEnvironmentIndex() override;
53 virtual void SAL_CALL setDefaultSecurityEnvironmentIndex( sal_Int32 nDefaultEnvIndex ) override;
55 // XServiceInfo
56 virtual OUString SAL_CALL getImplementationName() override ;
58 virtual sal_Bool SAL_CALL supportsService(const OUString& ServiceName) override ;
60 virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override ;
61 } ;
63 #endif // INCLUDED_XMLSECURITY_SOURCE_GPG_XMLSECURITYCONTEXT_HXX
65 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */