LibreOffice Module xmlsecurity (master) 1
xmlsignaturetemplateimpl.cxx
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#include <sal/config.h>
21#include <rtl/ustring.hxx>
25
26using namespace ::com::sun::star::uno ;
27using ::com::sun::star::lang::XMultiServiceFactory ;
28
29using ::com::sun::star::xml::wrapper::XXMLElementWrapper ;
30using ::com::sun::star::xml::crypto::XXMLSignatureTemplate ;
31
33 :m_nStatus ( css::xml::crypto::SecurityOperationStatus_UNKNOWN )
34{
35}
36
38}
39
40/* XXMLSignatureTemplate */
41void SAL_CALL XMLSignatureTemplateImpl::setTemplate( const Reference< XXMLElementWrapper >& aTemplate )
42{
43 m_xTemplate = aTemplate ;
44}
45
46/* XXMLSignatureTemplate */
47Reference< XXMLElementWrapper > SAL_CALL XMLSignatureTemplateImpl::getTemplate()
48{
49 return m_xTemplate ;
50}
51
52void SAL_CALL XMLSignatureTemplateImpl::setTarget( const css::uno::Reference< css::xml::wrapper::XXMLElementWrapper >& aXmlElement )
53{
54 targets.push_back( aXmlElement );
55}
56
57css::uno::Sequence< css::uno::Reference< css::xml::wrapper::XXMLElementWrapper > > SAL_CALL XMLSignatureTemplateImpl::getTargets()
58{
60}
61
63 const css::uno::Reference< css::xml::crypto::XUriBinding >& aUriBinding )
64{
65 m_xUriBinding = aUriBinding;
66}
67
68css::uno::Reference< css::xml::crypto::XUriBinding > SAL_CALL XMLSignatureTemplateImpl::getBinding()
69{
70 return m_xUriBinding;
71}
72
74 css::xml::crypto::SecurityOperationStatus status )
75{
76 m_nStatus = status;
77}
78
79css::xml::crypto::SecurityOperationStatus SAL_CALL XMLSignatureTemplateImpl::getStatus( )
80{
81 return m_nStatus;
82}
83
84/* XServiceInfo */
87}
88
89/* XServiceInfo */
90sal_Bool SAL_CALL XMLSignatureTemplateImpl::supportsService( const OUString& serviceName) {
91 return cppu::supportsService(this, serviceName);
92}
93
94/* XServiceInfo */
97}
98
99//Helper for XServiceInfo
101 Sequence<OUString> seqServiceNames { "com.sun.star.xml.crypto.XMLSignatureTemplate" };
102 return seqServiceNames ;
103}
104
106 return "com.sun.star.xml.security.framework.XMLSignatureTemplateImpl" ;
107}
108
109//Helper for registry
110Reference< XInterface > XMLSignatureTemplateImpl::impl_createInstance( const Reference< XMultiServiceFactory >& ) {
111 return Reference< XInterface >( *new XMLSignatureTemplateImpl ) ;
112}
113/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
oslInterlockedCount m_nStatus
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
css::uno::Sequence< DstElementType > containerToSequence(const SrcType &i_Container)
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)
unsigned char sal_Bool