|
OpFlex Framework
1.5.0
|
An object that monitors for updates to objects in the data store. More...
Typedefs | |
| typedef ofobj_p | ofobjectlistener_p |
| A pointer to an object listener object. | |
| typedef void(* | ofnotify_p )(void *user_data, class_id_t class_id, ofuri_p uri) |
| A function pointer to a function to receive notificiations. More... | |
Functions | |
| ofstatus | ofobjectlistener_create (void *user_data, ofnotify_p callback, ofobjectlistener_p *listener) |
| Create a new object listener. More... | |
| ofstatus | ofobjectlistener_destroy (ofobjectlistener_p *listener) |
| Destroy an object listener, and zero the pointer. More... | |
An object that monitors for updates to objects in the data store.
Object listeners are registered for a particular class will be triggered for any modifications for objects of that class or any transitive children of objects of that class.
| typedef void(* ofnotify_p)(void *user_data, class_id_t class_id, ofuri_p uri) |
A function pointer to a function to receive notificiations.
| user_data | a pointer to an opaque user data structure |
| class_id | the class ID of the affected class |
| uri | the affected URI |
| ofstatus ofobjectlistener_create | ( | void * | user_data, |
| ofnotify_p | callback, | ||
| ofobjectlistener_p * | listener | ||
| ) |
Create a new object listener.
You must eventually call ofobjectlistener_destroy() on the returned object.
| user_data | an opaque data blob that will be passed to your handler |
| callback | a function pointer to your handler function to be invoked when the listener is notified. |
| listener | a pointer to memory that will receive the pointer to the newly-allocated object. |
| ofstatus ofobjectlistener_destroy | ( | ofobjectlistener_p * | listener | ) |
Destroy an object listener, and zero the pointer.
You must ensure that the listener has been unregistered from all listeners before destroying it.
| listener | a pointer to memory containing the object pointer. |