# waitcallback.h File Reference

`#include <gwenhywfar/gwenhywfarapi.h>`
`#include <gwenhywfar/inherit.h>`
`#include <gwenhywfar/misc.h>`
`#include <gwenhywfar/logger.h>`
`#include <gwenhywfar/types.h>`
`#include <time.h>`

Go to the source code of this file.

## Virtual Functions

#define | GWEN_WaitCallback_Enter(id) GWEN_WaitCallback_Enter_u(id, __FILE__, __LINE__)
GWENHYWFAR_API GWEN_WAITCALLBACK_RESULT | GWEN_WaitCallback ()
GWENHYWFAR_API void | GWEN_WaitCallback_Enter_u (const char *id, const char *file, int line)
GWENHYWFAR_API void | GWEN_WaitCallback_free (GWEN_WAITCALLBACK *ctx)
GWENHYWFAR_API void | GWEN_WaitCallback_Leave ()
GWENHYWFAR_API void | GWEN_WaitCallback_Log (GWEN_LOGGER_LEVEL logLevel, const char *s)
GWENHYWFAR_API GWEN_WAITCALLBACK_RESULT | GWEN_WaitCallbackProgress (GWEN_TYPE_UINT64 pos)

## Prototypes For Virtual Functions

typedef GWEN_WAITCALLBACK_RESULT(* | GWEN_WAITCALLBACK_CHECKABORTFN )(GWEN_WAITCALLBACK *ctx, unsigned int level)
typedef GWEN_WAITCALLBACK *(* | GWEN_WAITCALLBACK_INSTANTIATEFN )(GWEN_WAITCALLBACK *ctx)
typedef void(* | GWEN_WAITCALLBACK_LOGFN )(GWEN_WAITCALLBACK *ctx, unsigned int level, GWEN_LOGGER_LEVEL loglevel, const char *s)

## Informational Functions

GWENHYWFAR_API int | GWEN_WaitCallback_GetDistance (GWEN_WAITCALLBACK *ctx)
GWENHYWFAR_API int | GWEN_WaitCallback_GetNestingLevel (const GWEN_WAITCALLBACK *ctx)
GWENHYWFAR_API void | GWEN_WaitCallback_SetProgressPos (GWEN_TYPE_UINT64 pos)
GWENHYWFAR_API void | GWEN_WaitCallback_SetProgressTotal (GWEN_TYPE_UINT64 total)

## Functions To Be Used By Inheritors

GWENHYWFAR_API const char * | GWEN_WaitCallback_GetId (GWEN_WAITCALLBACK *ctx)
GWENHYWFAR_API GWEN_TYPE_UINT64 | GWEN_WaitCallback_GetProgressPos (GWEN_WAITCALLBACK *ctx)
GWENHYWFAR_API GWEN_TYPE_UINT64 | GWEN_WaitCallback_GetProgressTotal (GWEN_WAITCALLBACK *ctx)
GWENHYWFAR_API time_t | GWEN_WaitCallback_LastCalled (GWEN_WAITCALLBACK *ctx)
GWENHYWFAR_API time_t | GWEN_WaitCallback_LastEntered (GWEN_WAITCALLBACK *ctx)
GWENHYWFAR_API GWEN_WAITCALLBACK * | GWEN_WaitCallback_new (const char *id)
GWENHYWFAR_API void | GWEN_WaitCallback_SetCheckAbortFn (GWEN_WAITCALLBACK *ctx, GWEN_WAITCALLBACK_CHECKABORTFN fn)
GWENHYWFAR_API void | GWEN_WaitCallback_SetDistance (GWEN_WAITCALLBACK *ctx, int d)
GWENHYWFAR_API void | GWEN_WaitCallback_SetInstantiateFn (GWEN_WAITCALLBACK *ctx, GWEN_WAITCALLBACK_INSTANTIATEFN fn)
GWENHYWFAR_API void | GWEN_WaitCallback_SetLogFn (GWEN_WAITCALLBACK *ctx, GWEN_WAITCALLBACK_LOGFN fn)

## Defines

#define | GWEN_WAITCALLBACK_PROGRESS_NONE ((GWEN_TYPE_UINT64)(0xffffffffffffffff))

## Typedefs

typedef GWEN_WAITCALLBACK | GWEN_WAITCALLBACK

## Enumerations

enum | GWEN_WAITCALLBACK_RESULT { GWEN_WaitCallbackResult_Continue = 0, GWEN_WaitCallbackResult_Abort }

## Functions

GWENHYWFAR_API int | GWEN_WaitCallback_Register (GWEN_WAITCALLBACK *ctx)
GWENHYWFAR_API int | GWEN_WaitCallback_Unregister (GWEN_WAITCALLBACK *ctx)

## Typedef Documentation

typedef struct GWEN_WAITCALLBACK GWEN_WAITCALLBACK