16 #ifndef ACSDK_NOTIFIERINTERFACES_NOTIFIERINTERFACE_H_ 17 #define ACSDK_NOTIFIERINTERFACES_NOTIFIERINTERFACE_H_ 23 namespace notifierInterfaces {
32 template <
typename ObserverType>
53 virtual void addObserver(
const std::shared_ptr<ObserverType>& observer) = 0;
66 virtual void removeObserver(
const std::shared_ptr<ObserverType>& observer) = 0;
98 virtual void notifyObservers(std::function<
void(
const std::shared_ptr<ObserverType>&)> notify) = 0;
124 virtual void setAddObserverFunction(std::function<
void(
const std::shared_ptr<ObserverType>&)> postAddFunc) = 0;
130 #endif // ACSDK_NOTIFIERINTERFACES_NOTIFIERINTERFACE_H_ virtual void setAddObserverFunction(std::function< void(const std::shared_ptr< ObserverType > &)> postAddFunc)=0
Set a function for notifications on an observer additions.
virtual void notifyObservers(std::function< void(const std::shared_ptr< ObserverType > &)> notify)=0
Notify the observers in the order that they were added.
virtual bool notifyObserversInReverse(std::function< void(const std::shared_ptr< ObserverType > &)> notify)=0
Notify the observers in the reverse order that they were added.
virtual void removeObserver(const std::shared_ptr< ObserverType > &observer)=0
Remove an observer.
virtual void addObserver(const std::shared_ptr< ObserverType > &observer)=0
Add an observer.
Whether or not curl logs should be emitted.
Definition: AVSConnectionManager.h:36
virtual void addWeakPtrObserver(const std::weak_ptr< ObserverType > &observer)=0
Add a weak reference to an observer.
virtual ~NotifierInterface()=default
Generic observer operations interface.
Definition: NotifierInterface.h:33
virtual void removeWeakPtrObserver(const std::weak_ptr< ObserverType > &observer)=0
Remove an observer.