Version 6.4.0.0.beta1, tag libreoffice-6.4.0.0.beta1
[LibreOffice.git] / xmlsecurity / source / gpg / XMLSecurityContext.hxx
blob3ca399f2be2d25be56b7a01aa253c012e21e3b62
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/implbase.hxx>
17 #include <com/sun/star/uno/Reference.hxx>
18 #include <com/sun/star/lang/XServiceInfo.hpp>
19 #include <com/sun/star/xml/crypto/XXMLSecurityContext.hpp>
21 #include <vector>
23 namespace com::sun::star::xml::crypto { class XSecurityEnvironment; }
25 class XMLSecurityContextGpg : public cppu::WeakImplHelper< css::xml::crypto::XXMLSecurityContext,
26 css::lang::XServiceInfo>
28 private:
29 std::vector< css::uno::Reference< css::xml::crypto::XSecurityEnvironment > > m_vSecurityEnvironments;
31 sal_Int32 m_nDefaultEnvIndex;
33 public:
34 XMLSecurityContextGpg();
35 virtual ~XMLSecurityContextGpg() override;
37 // XXMLSecurityContext
38 virtual sal_Int32 SAL_CALL addSecurityEnvironment(
39 const css::uno::Reference< css::xml::crypto::XSecurityEnvironment >& aSecurityEnvironment) override;
41 virtual ::sal_Int32 SAL_CALL getSecurityEnvironmentNumber() override;
43 virtual css::uno::Reference<css::xml::crypto::XSecurityEnvironment > SAL_CALL getSecurityEnvironmentByIndex(sal_Int32 index) override;
45 virtual css::uno::Reference<css::xml::crypto::XSecurityEnvironment > SAL_CALL getSecurityEnvironment() override;
47 virtual sal_Int32 SAL_CALL getDefaultSecurityEnvironmentIndex() override;
49 virtual void SAL_CALL setDefaultSecurityEnvironmentIndex( sal_Int32 nDefaultEnvIndex ) override;
51 // XServiceInfo
52 virtual OUString SAL_CALL getImplementationName() override ;
54 virtual sal_Bool SAL_CALL supportsService(const OUString& ServiceName) override ;
56 virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override ;
57 } ;
59 #endif // INCLUDED_XMLSECURITY_SOURCE_GPG_XMLSECURITYCONTEXT_HXX
61 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */