LibreOffice Module framework (master) 1
systemexec.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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 * This file incorporates work covered by the following license notice:
10 *
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 .
18 */
19
20#pragma once
21
22#include <com/sun/star/frame/XNotifyingDispatch.hpp>
23#include <com/sun/star/frame/XDispatch.hpp>
24#include <com/sun/star/frame/XDispatchProvider.hpp>
25#include <com/sun/star/util/URL.hpp>
26#include <com/sun/star/beans/PropertyValue.hpp>
27#include <com/sun/star/frame/XStatusListener.hpp>
28#include <com/sun/star/lang/XServiceInfo.hpp>
29#include <com/sun/star/uno/XComponentContext.hpp>
30
32
33namespace framework{
34
47class SystemExec final : public ::cppu::WeakImplHelper<
48 css::lang::XServiceInfo ,
49 css::frame::XDispatchProvider ,
50 css::frame::XNotifyingDispatch > // => XDispatch
51{
52 /* member */
53 private:
54
56 css::uno::Reference< css::uno::XComponentContext > m_xContext;
57
58 /* interface */
59 public:
60
61 // ctor/dtor
62 SystemExec( css::uno::Reference< css::uno::XComponentContext > xContext );
63 virtual ~SystemExec( ) override;
64
65 /* interface XServiceInfo */
66 virtual OUString SAL_CALL getImplementationName() override;
67 virtual sal_Bool SAL_CALL supportsService( const OUString& sServiceName ) override;
68 virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
69
70 // XDispatchProvider
71 virtual css::uno::Reference< css::frame::XDispatch > SAL_CALL queryDispatch ( const css::util::URL& aURL ,
72 const OUString& sTarget ,
73 sal_Int32 nFlags ) override;
74 virtual css::uno::Sequence< css::uno::Reference< css::frame::XDispatch > > SAL_CALL queryDispatches( const css::uno::Sequence< css::frame::DispatchDescriptor >& lDescriptor ) override;
75
76 // XNotifyingDispatch
77 virtual void SAL_CALL dispatchWithNotification( const css::util::URL& aURL ,
78 const css::uno::Sequence< css::beans::PropertyValue >& lArguments,
79 const css::uno::Reference< css::frame::XDispatchResultListener >& xListener ) override;
80
81 // XDispatch
82 virtual void SAL_CALL dispatch ( const css::util::URL& aURL ,
83 const css::uno::Sequence< css::beans::PropertyValue >& lArguments ) override;
84 virtual void SAL_CALL addStatusListener ( const css::uno::Reference< css::frame::XStatusListener >& xListener ,
85 const css::util::URL& aURL ) override;
86 virtual void SAL_CALL removeStatusListener( const css::uno::Reference< css::frame::XStatusListener >& xListener ,
87 const css::util::URL& aURL ) override;
88
89 /* internal */
90 private:
91
92 void impl_notifyResultListener(const css::uno::Reference< css::frame::XDispatchResultListener >& xListener,
93 const sal_Int16 nState );
94
95}; // class SystemExec
96
97} // namespace framework
98
99/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
protocol handler for "systemexec:*" URLs @descr It's a special dispatch/provider object which is regi...
Definition: systemexec.hxx:51
virtual OUString SAL_CALL getImplementationName() override
Definition: systemexec.cxx:37
void impl_notifyResultListener(const css::uno::Reference< css::frame::XDispatchResultListener > &xListener, const sal_Int16 nState)
Definition: systemexec.cxx:136
virtual sal_Bool SAL_CALL supportsService(const OUString &sServiceName) override
Definition: systemexec.cxx:42
virtual void SAL_CALL removeStatusListener(const css::uno::Reference< css::frame::XStatusListener > &xListener, const css::util::URL &aURL) override
Definition: systemexec.cxx:130
css::uno::Reference< css::uno::XComponentContext > m_xContext
reference to global uno service manager which had created us
Definition: systemexec.hxx:56
virtual void SAL_CALL dispatchWithNotification(const css::util::URL &aURL, const css::uno::Sequence< css::beans::PropertyValue > &lArguments, const css::uno::Reference< css::frame::XDispatchResultListener > &xListener) override
Definition: systemexec.cxx:92
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
Definition: systemexec.cxx:47
virtual css::uno::Reference< css::frame::XDispatch > SAL_CALL queryDispatch(const css::util::URL &aURL, const OUString &sTarget, sal_Int32 nFlags) override
Definition: systemexec.cxx:61
SystemExec(css::uno::Reference< css::uno::XComponentContext > xContext)
Definition: systemexec.cxx:52
virtual css::uno::Sequence< css::uno::Reference< css::frame::XDispatch > > SAL_CALL queryDispatches(const css::uno::Sequence< css::frame::DispatchDescriptor > &lDescriptor) override
Definition: systemexec.cxx:71
virtual void SAL_CALL addStatusListener(const css::uno::Reference< css::frame::XStatusListener > &xListener, const css::util::URL &aURL) override
Definition: systemexec.cxx:124
virtual void SAL_CALL dispatch(const css::util::URL &aURL, const css::uno::Sequence< css::beans::PropertyValue > &lArguments) override
Definition: systemexec.cxx:86
virtual ~SystemExec() override
Definition: systemexec.cxx:57
unsigned char sal_Bool