nss: upgrade to release 3.73
[LibreOffice.git] / ucb / source / ucp / hierarchy / hierarchydatasource.hxx
blobe21d7acda5519bafc82ca59d4c258bad45bf04bf
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/.
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_UCB_SOURCE_UCP_HIERARCHY_HIERARCHYDATASOURCE_HXX
21 #define INCLUDED_UCB_SOURCE_UCP_HIERARCHY_HIERARCHYDATASOURCE_HXX
23 #include <osl/mutex.hxx>
24 #include <com/sun/star/lang/XComponent.hpp>
25 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
26 #include <com/sun/star/lang/XServiceInfo.hpp>
27 #include <com/sun/star/lang/XSingleServiceFactory.hpp>
28 #include <com/sun/star/uno/XComponentContext.hpp>
29 #include <cppuhelper/implbase.hxx>
30 #include <memory>
32 namespace comphelper { class OInterfaceContainerHelper2; }
34 namespace hierarchy_ucp {
37 class HierarchyDataSource : public cppu::WeakImplHelper<
38 css::lang::XServiceInfo,
39 css::lang::XComponent,
40 css::lang::XMultiServiceFactory>
42 osl::Mutex m_aMutex;
43 css::uno::Reference< css::uno::XComponentContext > m_xContext;
44 css::uno::Reference< css::lang::XMultiServiceFactory > m_xConfigProvider;
45 std::unique_ptr<comphelper::OInterfaceContainerHelper2> m_pDisposeEventListeners;
47 public:
48 explicit HierarchyDataSource( const css::uno::Reference< css::uno::XComponentContext > & rxContext );
49 virtual ~HierarchyDataSource() override;
51 // XServiceInfo
52 virtual OUString SAL_CALL getImplementationName() override;
53 virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
54 virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
56 // XComponent
57 virtual void SAL_CALL dispose() override;
58 virtual void SAL_CALL addEventListener( const css::uno::Reference< css::lang::XEventListener > & xListener ) override;
59 virtual void SAL_CALL removeEventListener( const css::uno::Reference< css::lang::XEventListener > & aListener ) override;
61 // XMultiServiceFactory
62 virtual css::uno::Reference< css::uno::XInterface > SAL_CALL createInstance( const OUString & aServiceSpecifier ) override;
63 virtual css::uno::Reference< css::uno::XInterface > SAL_CALL createInstanceWithArguments( const OUString & ServiceSpecifier,
64 const css::uno::Sequence<
65 css::uno::Any > & Arguments ) override;
66 virtual css::uno::Sequence< OUString > SAL_CALL getAvailableServiceNames() override;
68 // Non-Interface methods
70 private:
71 /// @throws css::uno::Exception
72 css::uno::Reference< css::uno::XInterface > createInstanceWithArguments( const OUString & ServiceSpecifier,
73 const css::uno::Sequence<
74 css::uno::Any > & Arguments,
75 bool bCheckArgs );
77 css::uno::Reference< css::lang::XMultiServiceFactory > getConfigProvider();
79 static bool createConfigPath( const OUString & rInPath, OUString & rOutPath );
82 } // namespace hierarchy_ucp
84 #endif // INCLUDED_UCB_SOURCE_UCP_HIERARCHY_HIERARCHYDATASOURCE_HXX
86 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */