CppunitTest_sc_tiledrendering2: move to tiledrendering folder
[LibreOffice.git] / unotools / source / misc / ServiceDocumenter.hxx
blob1ae089c4bfd38eb32df035e93dfb96996a8b4706
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 */
9 #pragma once
11 #include <cppuhelper/implbase.hxx>
12 #include <com/sun/star/script/XServiceDocumenter.hpp>
13 #include <com/sun/star/lang/XServiceInfo.hpp>
14 #include <utility>
16 namespace com::sun::star::uno { class XComponentContext; }
18 namespace unotools::misc {
20 class ServiceDocumenter : public ::cppu::WeakImplHelper<
21 css::script::XServiceDocumenter, css::lang::XServiceInfo>
23 public:
24 ServiceDocumenter(css::uno::Reference< css::uno::XComponentContext> xContext)
25 : m_xContext(std::move(xContext))
26 , m_sCoreBaseUrl(u"http://example.com"_ustr)
27 , m_sServiceBaseUrl(u"https://api.libreoffice.org/docs/idl/ref"_ustr)
28 {};
30 // XServiceInfo
31 virtual sal_Bool SAL_CALL supportsService(const OUString& sServiceName) override;
32 virtual OUString SAL_CALL getImplementationName() override;
33 virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
35 // XServiceDocumenter
36 virtual OUString SAL_CALL getCoreBaseUrl() override
37 { return m_sCoreBaseUrl; };
38 virtual void SAL_CALL setCoreBaseUrl( const OUString& sCoreBaseUrl ) override
39 { m_sCoreBaseUrl = sCoreBaseUrl; };
40 virtual OUString SAL_CALL getServiceBaseUrl() override
41 { return m_sServiceBaseUrl; };
42 virtual void SAL_CALL setServiceBaseUrl( const OUString& sServiceBaseUrl ) override
43 { m_sServiceBaseUrl = sServiceBaseUrl; };
44 virtual void SAL_CALL showServiceDocs( const ::css::uno::Reference< ::css::lang::XServiceInfo >& xService) override;
45 virtual void SAL_CALL showInterfaceDocs( const ::css::uno::Reference< ::css::lang::XTypeProvider >& xTypeProvider ) override;
46 virtual void SAL_CALL showCoreDocs( const ::css::uno::Reference< ::css::lang::XServiceInfo >& xService) override;
47 protected:
48 virtual ~ServiceDocumenter() override
49 {};
50 private:
51 css::uno::Reference< css::uno::XComponentContext> m_xContext;
52 OUString m_sCoreBaseUrl;
53 OUString m_sServiceBaseUrl;
57 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */