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
{
35 typedef ::cppu::WeakComponentImplHelper
<
36 css::lang::XInitialization
,
37 css::lang::XServiceInfo
,
38 css::frame::XDispatchProvider
39 > PresenterProtocolHandlerInterfaceBase
;
42 class PresenterController
;
44 class PresenterProtocolHandler
45 : protected ::cppu::BaseMutex
,
46 public PresenterProtocolHandlerInterfaceBase
49 PresenterProtocolHandler (const css::uno::Reference
<css::uno::XComponentContext
>& rxContext
);
50 virtual ~PresenterProtocolHandler();
52 void SAL_CALL
disposing() SAL_OVERRIDE
;
54 static OUString
getImplementationName_static();
55 static css::uno::Sequence
< OUString
> getSupportedServiceNames_static();
56 static css::uno::Reference
<css::uno::XInterface
> Create(
57 const css::uno::Reference
<css::uno::XComponentContext
>& rxContext
);
61 virtual void SAL_CALL
initialize(
62 const css::uno::Sequence
<css::uno::Any
>& aArguments
)
63 throw (css::uno::Exception
, css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
65 OUString SAL_CALL
getImplementationName()
66 throw (css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
68 sal_Bool SAL_CALL
supportsService(OUString
const & ServiceName
)
69 throw (css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
71 css::uno::Sequence
<OUString
> SAL_CALL
getSupportedServiceNames()
72 throw (css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
76 virtual css::uno::Reference
<css::frame::XDispatch
> SAL_CALL
78 const css::util::URL
& aURL
,
79 const OUString
& aTargetFrameName
,
80 sal_Int32 nSearchFlags
)
81 throw(css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
83 virtual css::uno::Sequence
<css::uno::Reference
<css::frame::XDispatch
> > SAL_CALL
85 const css::uno::Sequence
< css::frame::DispatchDescriptor
>& rDescriptors
)
86 throw(css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
90 ::rtl::Reference
<PresenterController
> mpPresenterController
;
92 void ThrowIfDisposed() const throw (css::lang::DisposedException
);
99 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */