Mercurial > MadButterfly
diff src/observer.c @ 206:748896358da2
Export subject_add_event_observer() to rest of the system.
- declare it in mb_observer.h
author | Thinker K.F. Li <thinker@branda.to> |
---|---|
date | Wed, 10 Dec 2008 12:02:17 +0800 |
parents | 75ec0124202a |
children | 29e1b2bffe4c |
line wrap: on
line diff
--- a/src/observer.c Wed Dec 10 11:52:36 2008 +0800 +++ b/src/observer.c Wed Dec 10 12:02:17 2008 +0800 @@ -83,6 +83,8 @@ } } +/*! \brief Add an observer for any type of events. + */ observer_t *subject_add_observer(subject_t *subject, evt_handler hdr, void *arg) { ob_factory_t *factory = subject->factory; @@ -100,6 +102,8 @@ return observer; } +/*! \brief Add an observer for specified type of events. + */ observer_t *subject_add_event_observer(subject_t *subject, int type, evt_handler hdr, void *arg) { ob_factory_t *factory = subject->factory;