LibreOffice Module xmlsecurity (master) 1
xmlsignaturetemplateimpl.hxx
Go to the documentation of this file.
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#pragma once
21
22#include <sal/config.h>
23#include <rtl/ustring.hxx>
25
26#include <com/sun/star/uno/Reference.hxx>
27
28#include <com/sun/star/lang/XServiceInfo.hpp>
29#include <com/sun/star/xml/crypto/XXMLSignatureTemplate.hpp>
30
31#include <vector>
32
33namespace com::sun::star::lang { class XMultiServiceFactory; }
34namespace com::sun::star::xml::wrapper { class XXMLElementWrapper; }
35
36class XMLSignatureTemplateImpl final : public ::cppu::WeakImplHelper<
37 css::xml::crypto::XXMLSignatureTemplate ,
38 css::lang::XServiceInfo >
39{
40 private:
41 css::uno::Reference< css::xml::wrapper::XXMLElementWrapper > m_xTemplate ;
42 std::vector< css::uno::Reference< css::xml::wrapper::XXMLElementWrapper > > targets;
43 css::uno::Reference< css::xml::crypto::XUriBinding > m_xUriBinding;
44 css::xml::crypto::SecurityOperationStatus m_nStatus;
45
46 public:
47 explicit XMLSignatureTemplateImpl();
48 virtual ~XMLSignatureTemplateImpl() override;
49
50 //Methods from XXMLSignatureTemplate
51 virtual void SAL_CALL setTemplate(
52 const css::uno::Reference< css::xml::wrapper::XXMLElementWrapper >& aXmlElement
53 ) override;
54
55 virtual css::uno::Reference< css::xml::wrapper::XXMLElementWrapper > SAL_CALL getTemplate(
56 ) override;
57
58 virtual void SAL_CALL setTarget(
59 const css::uno::Reference< css::xml::wrapper::XXMLElementWrapper >& aXmlElement
60 ) override;
61
62 virtual css::uno::Sequence< css::uno::Reference< css::xml::wrapper::XXMLElementWrapper > > SAL_CALL getTargets(
63 ) override;
64
65 virtual void SAL_CALL setBinding(
66 const css::uno::Reference< css::xml::crypto::XUriBinding >& aUriBinding ) override;
67 virtual css::uno::Reference< css::xml::crypto::XUriBinding >
68 SAL_CALL getBinding( ) override;
69
70 virtual void SAL_CALL setStatus(
71 css::xml::crypto::SecurityOperationStatus status ) override;
72 virtual css::xml::crypto::SecurityOperationStatus
73 SAL_CALL getStatus( ) override;
74
75 //Methods from XServiceInfo
76 virtual OUString SAL_CALL getImplementationName() override ;
77
78 virtual sal_Bool SAL_CALL supportsService(
79 const OUString& ServiceName
80 ) override ;
81
82 virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override ;
83
84 //Helper for XServiceInfo
85 static css::uno::Sequence< OUString > impl_getSupportedServiceNames() ;
86
88 static OUString impl_getImplementationName() ;
89
90 //Helper for registry
92 static css::uno::Reference< css::uno::XInterface > impl_createInstance( const css::uno::Reference< css::lang::XMultiServiceFactory >& aServiceManager ) ;
93};
94
95/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
static css::uno::Sequence< OUString > impl_getSupportedServiceNames()
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
virtual css::uno::Reference< css::xml::wrapper::XXMLElementWrapper > SAL_CALL getTemplate() override
virtual void SAL_CALL setTemplate(const css::uno::Reference< css::xml::wrapper::XXMLElementWrapper > &aXmlElement) override
virtual void SAL_CALL setStatus(css::xml::crypto::SecurityOperationStatus status) override
virtual ~XMLSignatureTemplateImpl() override
css::uno::Reference< css::xml::wrapper::XXMLElementWrapper > m_xTemplate
virtual OUString SAL_CALL getImplementationName() override
virtual css::uno::Reference< css::xml::crypto::XUriBinding > SAL_CALL getBinding() override
css::uno::Reference< css::xml::crypto::XUriBinding > m_xUriBinding
virtual css::xml::crypto::SecurityOperationStatus SAL_CALL getStatus() override
virtual css::uno::Sequence< css::uno::Reference< css::xml::wrapper::XXMLElementWrapper > > SAL_CALL getTargets() override
css::xml::crypto::SecurityOperationStatus m_nStatus
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
virtual void SAL_CALL setTarget(const css::uno::Reference< css::xml::wrapper::XXMLElementWrapper > &aXmlElement) override
std::vector< css::uno::Reference< css::xml::wrapper::XXMLElementWrapper > > targets
static css::uno::Reference< css::uno::XInterface > impl_createInstance(const css::uno::Reference< css::lang::XMultiServiceFactory > &aServiceManager)
static OUString impl_getImplementationName()
virtual void SAL_CALL setBinding(const css::uno::Reference< css::xml::crypto::XUriBinding > &aUriBinding) override
unsigned char sal_Bool