android: Update app-specific/MIME type icons
[LibreOffice.git] / filter / source / config / cache / configflush.hxx
blobba20c9e9d505fbd2d146ba0f126ae3357aff97ff
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 #pragma once
21 #include <com/sun/star/util/XRefreshable.hpp>
22 #include <com/sun/star/lang/XServiceInfo.hpp>
23 #include <comphelper/interfacecontainer4.hxx>
24 #include <cppuhelper/implbase.hxx>
27 namespace filter::config {
30 /** @short supports registration of XRefreshListener
31 on the global filter configuration.
33 @descr Such refresh listener will be called in case the
34 type/filter configuration will be changed at runtime.
36 class ConfigFlush final : public ::cppu::WeakImplHelper<
37 css::util::XRefreshable,
38 css::lang::XServiceInfo
41 std::mutex m_aMutex;
42 /** @short holds all listener, which are registered at this instance. */
43 comphelper::OInterfaceContainerHelper4<css::util::XRefreshListener> m_aRefreshListeners;
46 // native interface
48 public:
51 // ctor/dtor
53 /** @short standard ctor.
55 ConfigFlush();
58 /** @short standard dtor.
60 virtual ~ConfigFlush() override;
63 // uno interface
65 public:
68 // XServiceInfo
70 virtual OUString SAL_CALL getImplementationName() override;
72 virtual sal_Bool SAL_CALL supportsService(const OUString& sServiceName) override;
74 virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
77 // XRefreshable
79 virtual void SAL_CALL refresh() override;
81 virtual void SAL_CALL addRefreshListener(const css::uno::Reference< css::util::XRefreshListener >& xListener) override;
83 virtual void SAL_CALL removeRefreshListener(const css::uno::Reference< css::util::XRefreshListener >& xListener) override;
86 } // namespace filter::config
88 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */