2 * Copyright 2006-2007, Haiku.
3 * Distributed under the terms of the MIT License.
6 * Stephan Aßmus <superstippi@gmx.de>
20 bool AddListener(Listener
* listener
);
21 bool RemoveListener(Listener
* listener
);
23 int32
CountListeners() const;
24 Listener
* ListenerAtFast(int32 index
) const;
28 void SuspendNotifications(bool suspend
);
30 bool HasPendingNotifications() const
31 { return fPendingNotifications
; }
37 mutable bool fPendingNotifications
;
40 class AutoNotificationSuspender
{
42 AutoNotificationSuspender(Notifier
* object
)
45 fObject
->SuspendNotifications(true);
48 virtual ~AutoNotificationSuspender()
50 fObject
->SuspendNotifications(false);