Common stuff that is used for ASYNC APIs. More...
#include "awt_status.h"Typedefs | |
| typedef void(* | AwtEventCallback )(void *pContext, AwtEvent event, AwtStatus status, void *pUserData) |
| AWT Event callback. | |
| typedef void(* | AwtAsyncMain )(int argc, char **argv) |
| Asynchronous main function type. | |
Enumerations | |
| enum | AwtEvent |
Event types for asynchronous event callbacks: AwtCom or AwtDaHL libraries. | |
Functions | |
| AwtStatus | AWT_ASYNC_Run (int argc, char **argv, AwtAsyncMain asyncMain) |
| Asynchronous thread. | |
| AwtStatus | AWT_ASYNC_Terminate () |
| Ask the Asynchronous framework to stop. | |
Common stuff that is used for ASYNC APIs.
General note for all ASYNC APIs:
The return code of an asynchronous function gives important information on the behavior of the function call process, it returns an AwtStatus :
| typedef void(* AwtAsyncMain)(int argc, char **argv) |
Asynchronous main function type.
See AWT_ASYNC_Run for more details.
| typedef void(* AwtEventCallback)(void *pContext, AwtEvent event, AwtStatus status, void *pUserData) |
AWT Event callback.
Prototype of the callback used to signal events.
| event | the event being signaled. The event is actually linked to an asynchronous functionality | |
| status | the status of the functionality being event'ed. |
| AwtStatus AWT_ASYNC_Run | ( | int | argc, | |
| char ** | argv, | |||
| AwtAsyncMain | asyncMain | |||
| ) |
Asynchronous thread.
When using the asynchronous API, the user must provide a running thread. All calls of the asynchronous API must be done in that thread, since the API is not thread-safe in itself. The call to this function returns only when the user wants to terminate the application calling AWT_ASYNC_End. This function will initialize the asynchronous framework and then call the asynchronous main function given as parameter. If the asynchronous framework is already running, a call to this function return directly.
| AwtStatus AWT_ASYNC_Terminate | ( | ) |
Ask the Asynchronous framework to stop.
This will cause the AWT_ASYNC_Run function to return. This function must be called within the thread that called AWT_ASYNC_Run.
1.6.3