|
Grassroots Infrastructure
The Grassroots Infrastructure is a suite of computing tools to help users and developers use scientific data infrastructure that can easily be interconnected.
|
An EvenetConsumer is a datatype to allow an object to be notified when an AsyncTask has completed running. More...
#include <event_consumer.h>
Public Member Functions | |
| EventConsumer * | AllocateEventConsumer (void(*consumer_fn)(EventConsumer *consumer_p, struct AsyncTask *task_p)) |
| Allocate an EventConsumer to receive notification when an AsyncTask completes. More... | |
| bool | InitEventConsumer (EventConsumer *consumer_p, void(*consumer_fn)(EventConsumer *consumer_p, struct AsyncTask *task_p)) |
| Initialise an EventConsumer with a given callback function. More... | |
| void | ClearEventConsumer (EventConsumer *consumer_p) |
| Clear an EventConsumer. More... | |
| void | FreeEventConsumer (EventConsumer *consumer_p) |
| Free an EventConsumer. More... | |
| void | RunEventConsumer (EventConsumer *consumer_p, struct AsyncTask *task_p) |
| Fire an EventConsumer's callback function to notify that the given AsyncTask has completed. More... | |
Data Fields | |
| void(* | at_consumer_fn )(struct EventConsumer *consumer_p, struct AsyncTask *task_p) |
| The callback function to call when an AsyncTask has completed. More... | |
An EvenetConsumer is a datatype to allow an object to be notified when an AsyncTask has completed running.
| EventConsumer * AllocateEventConsumer | ( | void(*)(EventConsumer *consumer_p, struct AsyncTask *task_p) | consumer_fn | ) |
Allocate an EventConsumer to receive notification when an AsyncTask completes.
| consumer_fn | The callback function to be called when the AsyncTask completes. |
NULL upon error. | bool InitEventConsumer | ( | EventConsumer * | consumer_p, |
| void(*)(EventConsumer *consumer_p, struct AsyncTask *task_p) | consumer_fn | ||
| ) |
Initialise an EventConsumer with a given callback function.
| consumer_p | The EventConsumer to initialise. |
| consumer_fn | The callback function to be called when the AsyncTask completes. |
true if the EventConsumer was initialiseD successfully, false otherwise. | void ClearEventConsumer | ( | EventConsumer * | consumer_p | ) |
Clear an EventConsumer.
| consumer_p | The EventConsumer to clear. |
| void FreeEventConsumer | ( | EventConsumer * | consumer_p | ) |
Free an EventConsumer.
| consumer_p | The EventConsumer to free. |
| void RunEventConsumer | ( | EventConsumer * | consumer_p, |
| struct AsyncTask * | task_p | ||
| ) |
Fire an EventConsumer's callback function to notify that the given AsyncTask has completed.
| consumer_p | The EventConsumer whose callback function will be ran. |
| task_p | The AsyncTask that has completed. |
| void(* at_consumer_fn) (struct EventConsumer *consumer_p, struct AsyncTask *task_p) |
The callback function to call when an AsyncTask has completed.
| consumer_p | This EventConsumer. |
| task_p | The AsyncTask that has finished running. |