Version 7.6.3.2-android, tag libreoffice-7.6.3.2-android
[LibreOffice.git] / sd / source / console / PresenterProtocolHandler.hxx
blob217fb2658abe6bb3ce7fbcb11c6867519942a4d6
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_SDEXT_SOURCE_PRESENTER_PRESENTERPROTOCOLHANDLER_HXX
21 #define INCLUDED_SDEXT_SOURCE_PRESENTER_PRESENTERPROTOCOLHANDLER_HXX
23 #include <cppuhelper/compbase.hxx>
24 #include <cppuhelper/basemutex.hxx>
25 #include <com/sun/star/frame/XDispatchProvider.hpp>
26 #include <com/sun/star/frame/XDispatch.hpp>
27 #include <com/sun/star/lang/XInitialization.hpp>
28 #include <com/sun/star/lang/XServiceInfo.hpp>
29 #include <com/sun/star/util/XCacheInfo.hpp>
30 #include <rtl/ref.hxx>
32 namespace sdext::presenter {
34 typedef ::cppu::WeakComponentImplHelper <
35 css::lang::XInitialization,
36 css::lang::XServiceInfo,
37 css::util::XCacheInfo,
38 css::frame::XDispatchProvider
39 > PresenterProtocolHandlerInterfaceBase;
41 class PresenterController;
43 class PresenterProtocolHandler
44 : protected ::cppu::BaseMutex,
45 public PresenterProtocolHandlerInterfaceBase
47 public:
48 PresenterProtocolHandler ();
49 virtual ~PresenterProtocolHandler() override;
51 void SAL_CALL disposing() override;
53 // XInitialization
55 virtual void SAL_CALL initialize(
56 const css::uno::Sequence<css::uno::Any>& aArguments) override;
58 OUString SAL_CALL getImplementationName() override;
60 sal_Bool SAL_CALL supportsService(OUString const & ServiceName) override;
62 css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() override;
64 // XDispatchProvider
66 virtual css::uno::Reference<css::frame::XDispatch > SAL_CALL
67 queryDispatch (
68 const css::util::URL& aURL,
69 const OUString& aTargetFrameName,
70 sal_Int32 nSearchFlags ) override;
72 virtual css::uno::Sequence<css::uno::Reference<css::frame::XDispatch> > SAL_CALL
73 queryDispatches(
74 const css::uno::Sequence< css::frame::DispatchDescriptor>& rDescriptors) override;
76 /// See XCacheInfo::IsCachingAllowed().
77 sal_Bool SAL_CALL isCachingAllowed() override { return false; }
79 private:
80 class Dispatch;
81 ::rtl::Reference<PresenterController> mpPresenterController;
83 /// @throws css::lang::DisposedException
84 void ThrowIfDisposed() const;
89 #endif
91 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */