2023-03-06 14:42:04 +01:00
|
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
// Copyright The Music Player Daemon Project
|
2016-06-22 11:15:49 +02:00
|
|
|
|
|
|
|
#ifndef MPD_FILTER_OBSERVER_HXX
|
|
|
|
#define MPD_FILTER_OBSERVER_HXX
|
|
|
|
|
2017-12-27 09:17:15 +01:00
|
|
|
#include <memory>
|
|
|
|
|
2016-06-22 11:15:49 +02:00
|
|
|
class PreparedFilter;
|
|
|
|
class Filter;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* A helper class which observes calls to a #PreparedFilter and allows
|
|
|
|
* the caller to access the #Filter instances created by it.
|
|
|
|
*/
|
|
|
|
class FilterObserver {
|
|
|
|
class PreparedProxy;
|
|
|
|
class Proxy;
|
|
|
|
|
|
|
|
PreparedProxy *proxy = nullptr;
|
|
|
|
|
|
|
|
public:
|
|
|
|
/**
|
|
|
|
* @return a proxy object
|
|
|
|
*/
|
2017-12-27 09:17:15 +01:00
|
|
|
std::unique_ptr<PreparedFilter> Set(std::unique_ptr<PreparedFilter> pf);
|
2016-06-22 11:15:49 +02:00
|
|
|
|
2019-08-26 21:04:35 +02:00
|
|
|
Filter *Get() noexcept;
|
2016-06-22 11:15:49 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|