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_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/uno/XComponentContext.hpp>
30 #include <rtl/ref.hxx>
32 namespace sdext
{ namespace presenter
{
34 typedef ::cppu::WeakComponentImplHelper
<
35 css::lang::XInitialization
,
36 css::lang::XServiceInfo
,
37 css::frame::XDispatchProvider
38 > PresenterProtocolHandlerInterfaceBase
;
40 class PresenterController
;
42 class PresenterProtocolHandler
43 : protected ::cppu::BaseMutex
,
44 public PresenterProtocolHandlerInterfaceBase
47 PresenterProtocolHandler ();
48 virtual ~PresenterProtocolHandler() override
;
50 void SAL_CALL
disposing() override
;
52 static OUString
getImplementationName_static();
53 static css::uno::Sequence
< OUString
> getSupportedServiceNames_static();
54 static css::uno::Reference
<css::uno::XInterface
> Create(
55 const css::uno::Reference
<css::uno::XComponentContext
>& rxContext
);
59 virtual void SAL_CALL
initialize(
60 const css::uno::Sequence
<css::uno::Any
>& aArguments
) override
;
62 OUString SAL_CALL
getImplementationName() override
;
64 sal_Bool SAL_CALL
supportsService(OUString
const & ServiceName
) override
;
66 css::uno::Sequence
<OUString
> SAL_CALL
getSupportedServiceNames() override
;
70 virtual css::uno::Reference
<css::frame::XDispatch
> SAL_CALL
72 const css::util::URL
& aURL
,
73 const OUString
& aTargetFrameName
,
74 sal_Int32 nSearchFlags
) override
;
76 virtual css::uno::Sequence
<css::uno::Reference
<css::frame::XDispatch
> > SAL_CALL
78 const css::uno::Sequence
< css::frame::DispatchDescriptor
>& rDescriptors
) override
;
82 ::rtl::Reference
<PresenterController
> mpPresenterController
;
84 /// @throws css::lang::DisposedException
85 void ThrowIfDisposed() const;
92 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */