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 INCLUDED_XMLSECURITY_SOURCE_GPG_XMLSIGNATURE_GPGIMPL_HXX
21 #define INCLUDED_XMLSECURITY_SOURCE_GPG_XMLSIGNATURE_GPGIMPL_HXX
23 #include <sal/config.h>
24 #include <rtl/ustring.hxx>
25 #include <xsecgpgdllapi.h>
27 #include <cppuhelper/factory.hxx>
28 #include <cppuhelper/implbase.hxx>
29 #include <com/sun/star/uno/Exception.hpp>
31 #include <com/sun/star/uno/Reference.hxx>
32 #include <com/sun/star/lang/XSingleServiceFactory.hpp>
34 #include <com/sun/star/lang/XServiceInfo.hpp>
35 #include <com/sun/star/xml/crypto/XXMLSignature.hpp>
36 #include <com/sun/star/xml/crypto/XXMLSignatureTemplate.hpp>
37 #include <com/sun/star/xml/crypto/XXMLSecurityContext.hpp>
39 class XSECGPG_DLLPUBLIC XMLSignature_GpgImpl
: public ::cppu::WeakImplHelper
<
40 css::xml::crypto::XXMLSignature
,
41 css::lang::XServiceInfo
>
44 explicit XMLSignature_GpgImpl();
45 virtual ~XMLSignature_GpgImpl() override
;
47 //Methods from XXMLSignature
48 virtual css::uno::Reference
< css::xml::crypto::XXMLSignatureTemplate
> SAL_CALL
generate(
49 const css::uno::Reference
< css::xml::crypto::XXMLSignatureTemplate
>& aTemplate
,
50 const css::uno::Reference
< css::xml::crypto::XSecurityEnvironment
>& aEnvironment
53 virtual css::uno::Reference
< css::xml::crypto::XXMLSignatureTemplate
> SAL_CALL
validate(
54 const css::uno::Reference
< css::xml::crypto::XXMLSignatureTemplate
>& aTemplate
,
55 const css::uno::Reference
< css::xml::crypto::XXMLSecurityContext
>& aContext
58 //Methods from XServiceInfo
59 virtual OUString SAL_CALL
getImplementationName() override
;
61 virtual sal_Bool SAL_CALL
supportsService(
62 const OUString
& ServiceName
65 virtual css::uno::Sequence
< OUString
> SAL_CALL
getSupportedServiceNames() override
;
67 //Helper for XServiceInfo
68 static css::uno::Sequence
< OUString
> impl_getSupportedServiceNames() ;
70 /// @throws css::uno::RuntimeException
71 static OUString
impl_getImplementationName() ;
74 /// @throws css::uno::RuntimeException
75 static css::uno::Reference
< css::uno::XInterface
> SAL_CALL
impl_createInstance( const css::uno::Reference
< css::lang::XMultiServiceFactory
>& aServiceManager
) ;
77 static css::uno::Reference
< css::lang::XSingleServiceFactory
> impl_createFactory( const css::uno::Reference
< css::lang::XMultiServiceFactory
>& aServiceManager
) ;
80 #endif // INCLUDED_XMLSECURITY_SOURCE_GPG_XMLSIGNATURE_GPGIMPL_HXX
82 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */