Bump version to 5.0-14
[LibreOffice.git] / filter / source / config / cache / configflush.hxx
bloba4583d01685b83e84f94651deb64bcb6836265ca
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 .
19 #ifndef INCLUDED_FILTER_SOURCE_CONFIG_CACHE_CONFIGFLUSH_HXX
20 #define INCLUDED_FILTER_SOURCE_CONFIG_CACHE_CONFIGFLUSH_HXX
22 #include "cacheitem.hxx"
23 #include <com/sun/star/util/XRefreshable.hpp>
24 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
25 #include <com/sun/star/lang/XServiceInfo.hpp>
26 #include <cppuhelper/interfacecontainer.h>
27 #include <cppuhelper/implbase2.hxx>
30 namespace filter{
31 namespace config{
36 /** @short supports registration of XRefreshListener
37 on the global filter configuration.
39 @descr Such refresh listener will be called in case the
40 type/filter configuration will be changed at runtime.
42 class ConfigFlush : public BaseLock
43 , public ::cppu::WeakImplHelper2<
44 css::util::XRefreshable,
45 css::lang::XServiceInfo
49 // member
51 protected:
53 /** @short reference to an uno service manager, which can be used
54 to create own needed services. */
55 css::uno::Reference< css::lang::XMultiServiceFactory > m_xSMGR;
57 /** @short holds all listener, which are registered at this instance. */
58 ::cppu::OMultiTypeInterfaceContainerHelper m_lListener;
61 // native interface
63 public:
66 // ctor/dtor
68 /** @short standard ctor.
70 ConfigFlush(const css::uno::Reference< css::lang::XMultiServiceFactory >& xSMGR);
74 /** @short standard dtor.
76 virtual ~ConfigFlush();
79 // uno interface
81 public:
84 // XServiceInfo
86 virtual OUString SAL_CALL getImplementationName()
87 throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
89 virtual sal_Bool SAL_CALL supportsService(const OUString& sServiceName)
90 throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
92 virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames()
93 throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
96 // XRefreshable
98 virtual void SAL_CALL refresh()
99 throw(css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
101 virtual void SAL_CALL addRefreshListener(const css::uno::Reference< css::util::XRefreshListener >& xListener)
102 throw(css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
104 virtual void SAL_CALL removeRefreshListener(const css::uno::Reference< css::util::XRefreshListener >& xListener)
105 throw(css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
108 // interface to register/create this instance as an UNO service
109 static OUString impl_getImplementationName();
110 static css::uno::Sequence< OUString > impl_getSupportedServiceNames();
111 static css::uno::Reference< css::uno::XInterface > impl_createInstance(const css::uno::Reference< css::lang::XMultiServiceFactory >& xSMGR);
114 } // namespace config
115 } // namespace filter
117 #endif // INCLUDED_FILTER_SOURCE_CONFIG_CACHE_CONFIGFLUSH_HXX
119 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */