2010-05-07 04:47:10 -05:00
|
|
|
/*
|
2011-12-03 16:38:03 -06:00
|
|
|
* Copyright 2009-2011, Andrea Anzani. All rights reserved.
|
2010-05-07 04:47:10 -05:00
|
|
|
* Distributed under the terms of the MIT License.
|
|
|
|
*/
|
2021-05-24 01:47:21 -05:00
|
|
|
#ifndef NOTIFIER_H
|
|
|
|
#define NOTIFIER_H
|
2010-05-07 04:47:10 -05:00
|
|
|
|
|
|
|
#include <String.h>
|
2015-07-02 17:07:54 -05:00
|
|
|
#include <ObjectList.h>
|
|
|
|
|
2010-05-07 04:47:10 -05:00
|
|
|
#include "Observer.h"
|
|
|
|
|
2021-05-24 01:47:21 -05:00
|
|
|
|
2010-05-07 04:47:10 -05:00
|
|
|
class Notifier
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
void RegisterObserver(Observer*);
|
|
|
|
void UnregisterObserver(Observer*);
|
|
|
|
|
|
|
|
void NotifyString(int32 what, BString str);
|
|
|
|
void NotifyInteger(int32 what, int32 value);
|
|
|
|
void NotifyPointer(int32 what, void* ptr);
|
|
|
|
|
|
|
|
private:
|
|
|
|
BObjectList<Observer> fObserverList;
|
|
|
|
};
|
2021-05-24 01:47:21 -05:00
|
|
|
|
|
|
|
|
|
|
|
#endif // NOTIFIER_H
|
|
|
|
|