| 1 | // SPDX-License-Identifier: GPL-3.0-or-latercxx . . $ `<file>/src/helper/pmon/appregistry.h`/ |
| 2 | // Copyright 2019 Juan Palacios <[email protected]> |
| 3 | |
| 4 | #pragma once |
| 5 | |
| 6 | #include "iappregistry.h"cxx . . $ `<file>/src/helper/pmon/iappregistry.h`/ |
| 7 | |
| 8 | #include <mutex> |
| 9 | #include <string> |
| 10 | #include <unordered_set> |
| 11 | #include <vector> |
| 12 | |
| 13 | class AppRegistrycxx . . $ AppRegistry# final : public IAppRegistrycxx . . $ IAppRegistry# |
| 14 | { |
| 15 | public: |
| 16 | void addObservercxx . . $ AppRegistry#addObserver(2fb1f0ad00763439).(stdcxx . . $ std/::shared_ptrcxx . . $ std/shared_ptr#<IAppRegistrycxx . . $ IAppRegistry#::Observercxx . . $ IAppRegistry#Observer#> observer) override; |
| 17 | void removeObservercxx . . $ AppRegistry#removeObserver(2dd1568741c60743).( |
| 18 | stdcxx . . $ std/::shared_ptrcxx . . $ std/shared_ptr#<IAppRegistrycxx . . $ IAppRegistry#::Observercxx . . $ IAppRegistry#Observer#> const &observer) override; |
| 19 | |
| 20 | void addcxx . . $ AppRegistry#add(9c546c94e5fcce4e).(stdcxx . . $ std/::stringcxx . . $ std/string# const &app) override; |
| 21 | void removecxx . . $ AppRegistry#remove(9c546c94e5fcce4e).(stdcxx . . $ std/::stringcxx . . $ std/string# const &app) override; |
| 22 | bool registeredcxx . . $ AppRegistry#registered(7c222eea44a24d43).(stdcxx . . $ std/::stringcxx . . $ std/string# const &app) override; |
| 23 | |
| 24 | private: |
| 25 | void notifyRegisteredAppcxx . . $ AppRegistry#notifyRegisteredApp(9c546c94e5fcce4e).(stdcxx . . $ std/::stringcxx . . $ std/string# const &app); |
| 26 | void notifyUnregisteredAppcxx . . $ AppRegistry#notifyUnregisteredApp(9c546c94e5fcce4e).(stdcxx . . $ std/::stringcxx . . $ std/string# const &app); |
| 27 | |
| 28 | stdcxx . . $ std/::vectorcxx . . $ std/vector#<stdcxx . . $ std/::shared_ptrcxx . . $ std/shared_ptr#<IAppRegistrycxx . . $ IAppRegistry#::Observercxx . . $ IAppRegistry#Observer#>> observers_cxx . . $ AppRegistry#observers_.; |
| 29 | stdcxx . . $ std/::mutexcxx . . $ std/mutex# obMutex_cxx . . $ AppRegistry#obMutex_.; |
| 30 | |
| 31 | stdcxx . . $ std/::unordered_setcxx . . $ std/unordered_set#<stdcxx . . $ std/::stringcxx . . $ std/string#> registry_cxx . . $ AppRegistry#registry_.; |
| 32 | stdcxx . . $ std/::mutexcxx . . $ std/mutex# regMutex_cxx . . $ AppRegistry#regMutex_.; |
| 33 | }; |