Bump version to 6.0-36
[LibreOffice.git] / xmlsecurity / source / gpg / GpgComponentFactory.cxx
blob4bb0b90ad21183f4969f864182892cf4d7e35846
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 #include <sal/config.h>
12 #include <osl/thread.h>
13 #include <cppuhelper/factory.hxx>
14 #include <com/sun/star/lang/XSingleServiceFactory.hpp>
16 #include "xmlsignature_gpgimpl.hxx"
18 using namespace ::cppu;
19 using namespace ::com::sun::star::uno;
20 using namespace ::com::sun::star::lang;
21 using namespace ::com::sun::star::registry;
23 extern "C"
26 SAL_DLLPUBLIC_EXPORT void* SAL_CALL xsec_gpg_component_getFactory( const sal_Char* pImplName , void* pServiceManager , void* /*pRegistryKey*/ )
28 void* pRet = nullptr;
29 Reference< XSingleServiceFactory > xFactory ;
31 if( pImplName != nullptr && pServiceManager != nullptr )
33 if( XMLSignature_GpgImpl::impl_getImplementationName().equalsAscii( pImplName ) )
35 xFactory = XMLSignature_GpgImpl::impl_createFactory( static_cast< XMultiServiceFactory* >( pServiceManager ) ) ;
39 if( xFactory.is() ) {
40 xFactory->acquire() ;
41 pRet = xFactory.get() ;
44 return pRet ;
49 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */