request.h File Reference
`#include <gwenhywfar/gwenhywfar.h>`
`#include <gwenhywfar/msg.h>`
`#include <gwenhywfar/endpoint.h>`
`#include <gwenhywfar/inherit.h>`
`#include <gwenhywfar/tree2.h>`
`#include <gwenhywfar/timestamp.h>`

Go to the source code of this file.

## Macros

#define | GWEN_MSG_REQUEST_REASON_ABORTED 1
#define | GWEN_MSG_REQUEST_REASON_DISCONNECT 3
#define | GWEN_MSG_REQUEST_REASON_DONE 0
#define | GWEN_MSG_REQUEST_REASON_TIMEOUT 2
#define | GWEN_MSG_REQUEST_RESULT_HANDLED 1
#define | GWEN_MSG_REQUEST_RESULT_NOT_HANDLED 0
#define | GWEN_MSG_REQUEST_STATE_DONE 1
#define | GWEN_MSG_REQUEST_STATE_OPEN 0

## Typedefs

typedef struct GWEN_MSG_REQUEST | GWEN_MSG_REQUEST
typedef void(* | GWEN_MSG_REQUEST_ABORT_FN) (GWEN_MSG_REQUEST *rq, int reason)
typedef int(* | GWEN_MSG_REQUEST_HANDLERESPONSE_FN) (GWEN_MSG_REQUEST *rq, GWEN_MSG *msg)
typedef void(* | GWEN_MSG_REQUEST_SUBREQUESTFINISHED_FN) (GWEN_MSG_REQUEST *rq, GWEN_MSG_REQUEST *subRq, int reason)

## Functions

GWENHYWFAR_API void | GWEN_MsgRequest_Abort (GWEN_MSG_REQUEST *rq, int reason)
GWENHYWFAR_API void | GWEN_MsgRequest_AddMsgToList (GWEN_MSG_REQUEST *rq, GWEN_MSG *msg)
GWENHYWFAR_API void | GWEN_MsgRequest_free (GWEN_MSG_REQUEST *rq)
GWENHYWFAR_API const GWEN_TIMESTAMP * | GWEN_MsgRequest_GetCreatedAt (const GWEN_MSG_REQUEST *rq)
GWENHYWFAR_API GWEN_MSG_ENDPOINT * | GWEN_MsgRequest_GetEndpoint (const GWEN_MSG_REQUEST *rq)
GWENHYWFAR_API const GWEN_TIMESTAMP * | GWEN_MsgRequest_GetExpiresAt (const GWEN_MSG_REQUEST *rq)
GWENHYWFAR_API GWEN_MSG * | GWEN_MsgRequest_GetFirstMsgFromList (const GWEN_MSG_REQUEST *rq)
GWENHYWFAR_API GWEN_MSG_LIST * | GWEN_MsgRequest_GetMsgList (const GWEN_MSG_REQUEST *rq)
GWENHYWFAR_API void * | GWEN_MsgRequest_GetPrivateData (const GWEN_MSG_REQUEST *rq)
GWENHYWFAR_API GWEN_MSG * | GWEN_MsgRequest_GetRequestMsg (const GWEN_MSG_REQUEST *rq)
GWENHYWFAR_API uint32_t | GWEN_MsgRequest_GetRequestMsgId (const GWEN_MSG_REQUEST *rq)
GWENHYWFAR_API int | GWEN_MsgRequest_GetRequestType (const GWEN_MSG_REQUEST *rq)
GWENHYWFAR_API int | GWEN_MsgRequest_GetResult (const GWEN_MSG_REQUEST *rq)
GWENHYWFAR_API int | GWEN_MsgRequest_GetState (const GWEN_MSG_REQUEST *rq)
GWENHYWFAR_API int | GWEN_MsgRequest_HandleResponse (GWEN_MSG_REQUEST *rq, GWEN_MSG *msg)
GWENHYWFAR_API GWEN_MSG_REQUEST * | GWEN_MsgRequest_new ()
GWENHYWFAR_API GWEN_MSG_REQUEST_ABORT_FN | GWEN_MsgRequest_SetAbortFn (GWEN_MSG_REQUEST *rq, GWEN_MSG_REQUEST_ABORT_FN f)
GWENHYWFAR_API void | GWEN_MsgRequest_SetCreatedAt (GWEN_MSG_REQUEST *rq, GWEN_TIMESTAMP *ts)
GWENHYWFAR_API void | GWEN_MsgRequest_SetEndpoint (GWEN_MSG_REQUEST *rq, GWEN_MSG_ENDPOINT *ep)
GWENHYWFAR_API void | GWEN_MsgRequest_SetExpiresAt (GWEN_MSG_REQUEST *rq, GWEN_TIMESTAMP *ts)
GWENHYWFAR_API GWEN_MSG_REQUEST_HANDLERESPONSE_FN | GWEN_MsgRequest_SetHandleResponseFn (GWEN_MSG_REQUEST *rq, GWEN_MSG_REQUEST_HANDLERESPONSE_FN fn)
GWENHYWFAR_API void | GWEN_MsgRequest_SetPrivateData (GWEN_MSG_REQUEST *rq, void *p)
GWENHYWFAR_API void | GWEN_MsgRequest_SetRequestMsg (GWEN_MSG_REQUEST *rq, GWEN_MSG *msg)
GWENHYWFAR_API void | GWEN_MsgRequest_SetRequestMsgId (GWEN_MSG_REQUEST *rq, uint32_t id)
GWENHYWFAR_API void | GWEN_MsgRequest_SetRequestType (GWEN_MSG_REQUEST *rq, int t)
GWENHYWFAR_API void | GWEN_MsgRequest_SetResult (GWEN_MSG_REQUEST *rq, int result)
GWENHYWFAR_API void | GWEN_MsgRequest_SetState (GWEN_MSG_REQUEST *rq, int i)
GWENHYWFAR_API GWEN_MSG_REQUEST_SUBREQUESTFINISHED_FN | GWEN_MsgRequest_SetSubRequestFinishedFn (GWEN_MSG_REQUEST *rq, GWEN_MSG_REQUEST_SUBREQUESTFINISHED_FN f)
GWENHYWFAR_API void | GWEN_MsgRequest_SetTimestamps (GWEN_MSG_REQUEST *rq, int expiresInSecs)
GWENHYWFAR_API void | GWEN_MsgRequest_SubRequestFinished (GWEN_MSG_REQUEST *rq, GWEN_MSG_REQUEST *subRq, int reason)
GWENHYWFAR_API GWEN_MSG_REQUEST * | GWEN_MsgRequest_Tree2_FindByEndpointAndMsgId (GWEN_MSG_REQUEST *rootRq, GWEN_MSG_ENDPOINT *ep, uint32_t refMsgId)

## Macro Definition Documentation

## GWEN_MSG_REQUEST_REASON_ABORTED

#define GWEN_MSG_REQUEST_REASON_ABORTED 1

Definition at line 25 of file request.h.

## GWEN_MSG_REQUEST_REASON_DISCONNECT

#define GWEN_MSG_REQUEST_REASON_DISCONNECT 3

Definition at line 27 of file request.h.

## GWEN_MSG_REQUEST_REASON_DONE

#define GWEN_MSG_REQUEST_REASON_DONE 0

Definition at line 24 of file request.h.

## GWEN_MSG_REQUEST_REASON_TIMEOUT

#define GWEN_MSG_REQUEST_REASON_TIMEOUT 2

Definition at line 26 of file request.h.

## GWEN_MSG_REQUEST_RESULT_HANDLED

#define GWEN_MSG_REQUEST_RESULT_HANDLED 1

Definition at line 22 of file request.h.

## GWEN_MSG_REQUEST_RESULT_NOT_HANDLED

#define GWEN_MSG_REQUEST_RESULT_NOT_HANDLED 0

Definition at line 21 of file request.h.

## GWEN_MSG_REQUEST_STATE_DONE

#define GWEN_MSG_REQUEST_STATE_DONE 1

Definition at line 30 of file request.h.

## GWEN_MSG_REQUEST_STATE_OPEN

#define GWEN_MSG_REQUEST_STATE_OPEN 0

Definition at line 29 of file request.h.

## Typedef Documentation

## GWEN_MSG_REQUEST

typedef struct GWEN_MSG_REQUEST GWEN_MSG_REQUEST

Definition at line 34 of file request.h.

## GWEN_MSG_REQUEST_ABORT_FN

typedef void(* GWEN_MSG_REQUEST_ABORT_FN) (GWEN_MSG_REQUEST *rq, int reason)

Definition at line 41 of file request.h.

## GWEN_MSG_REQUEST_HANDLERESPONSE_FN

typedef int(* GWEN_MSG_REQUEST_HANDLERESPONSE_FN) (GWEN_MSG_REQUEST *rq, GWEN_MSG *msg)

Definition at line 39 of file request.h.

## GWEN_MSG_REQUEST_SUBREQUESTFINISHED_FN

typedef void(* GWEN_MSG_REQUEST_SUBREQUESTFINISHED_FN) (GWEN_MSG_REQUEST *rq, GWEN_MSG_REQUEST *subRq, int reason)

Definition at line 40 of file request.h.

## Function Documentation

## GWEN_MsgRequest_Abort()

GWENHYWFAR_API void GWEN_MsgRequest_Abort | ( | GWEN_MSG_REQUEST * | rq,
|  | int | reason )

References GWEN_MsgRequest_Abort(), and GWENHYWFAR_API.

Referenced by GWEN_MsgRequest_Abort().

## GWEN_MsgRequest_AddMsgToList()

GWENHYWFAR_API void GWEN_MsgRequest_AddMsgToList | ( | GWEN_MSG_REQUEST * | rq,
|  | GWEN_MSG * | msg )

References GWEN_MsgRequest_AddMsgToList(), and GWENHYWFAR_API.

Referenced by GWEN_MsgRequest_AddMsgToList().

## GWEN_MsgRequest_free()

GWENHYWFAR_API void GWEN_MsgRequest_free | ( | GWEN_MSG_REQUEST * | rq | ) |

References GWEN_MsgRequest_free(), and GWENHYWFAR_API.

Referenced by GWEN_MsgRequest_free().

## GWEN_MsgRequest_GetCreatedAt()

GWENHYWFAR_API const GWEN_TIMESTAMP * GWEN_MsgRequest_GetCreatedAt | ( | const GWEN_MSG_REQUEST * | rq | ) |

References GWEN_MsgRequest_GetCreatedAt(), and GWENHYWFAR_API.

Referenced by GWEN_MsgRequest_GetCreatedAt().

## GWEN_MsgRequest_GetEndpoint()

GWENHYWFAR_API GWEN_MSG_ENDPOINT * GWEN_MsgRequest_GetEndpoint | ( | const GWEN_MSG_REQUEST * | rq | ) |

References GWEN_MsgRequest_GetEndpoint(), and GWENHYWFAR_API.

Referenced by GWEN_MsgRequest_GetEndpoint().

## GWEN_MsgRequest_GetExpiresAt()

GWENHYWFAR_API const GWEN_TIMESTAMP * GWEN_MsgRequest_GetExpiresAt | ( | const GWEN_MSG_REQUEST * | rq | ) |

References GWEN_MsgRequest_GetExpiresAt(), and GWENHYWFAR_API.

Referenced by GWEN_MsgRequest_GetExpiresAt().

## GWEN_MsgRequest_GetFirstMsgFromList()

GWENHYWFAR_API GWEN_MSG * GWEN_MsgRequest_GetFirstMsgFromList | ( | const GWEN_MSG_REQUEST * | rq | ) |

References GWEN_MsgRequest_GetFirstMsgFromList(), and GWENHYWFAR_API.

Referenced by GWEN_MsgRequest_GetFirstMsgFromList().

## GWEN_MsgRequest_GetMsgList()

GWENHYWFAR_API GWEN_MSG_LIST * GWEN_MsgRequest_GetMsgList | ( | const GWEN_MSG_REQUEST * | rq | ) |

References GWEN_MsgRequest_GetMsgList(), and GWENHYWFAR_API.

Referenced by GWEN_MsgRequest_GetMsgList().

## GWEN_MsgRequest_GetPrivateData()

GWENHYWFAR_API void * GWEN_MsgRequest_GetPrivateData | ( | const GWEN_MSG_REQUEST * | rq | ) |

References GWEN_MsgRequest_GetPrivateData(), and GWENHYWFAR_API.

Referenced by GWEN_MsgRequest_GetPrivateData().

## GWEN_MsgRequest_GetRequestMsg()

GWENHYWFAR_API GWEN_MSG * GWEN_MsgRequest_GetRequestMsg | ( | const GWEN_MSG_REQUEST * | rq | ) |

References GWEN_MsgRequest_GetRequestMsg(), and GWENHYWFAR_API.

Referenced by GWEN_MsgRequest_GetRequestMsg().

## GWEN_MsgRequest_GetRequestMsgId()

GWENHYWFAR_API uint32_t GWEN_MsgRequest_GetRequestMsgId | ( | const GWEN_MSG_REQUEST * | rq | ) |

References GWEN_MsgRequest_GetRequestMsgId(), and GWENHYWFAR_API.

Referenced by GWEN_MsgRequest_GetRequestMsgId().

## GWEN_MsgRequest_GetRequestType()

GWENHYWFAR_API int GWEN_MsgRequest_GetRequestType | ( | const GWEN_MSG_REQUEST * | rq | ) |

References GWEN_MsgRequest_GetRequestType(), and GWENHYWFAR_API.

Referenced by GWEN_MsgRequest_GetRequestType().

## GWEN_MsgRequest_GetResult()

GWENHYWFAR_API int GWEN_MsgRequest_GetResult | ( | const GWEN_MSG_REQUEST * | rq | ) |

References GWEN_MsgRequest_GetResult(), and GWENHYWFAR_API.

Referenced by GWEN_MsgRequest_GetResult().

## GWEN_MsgRequest_GetState()

GWENHYWFAR_API int GWEN_MsgRequest_GetState | ( | const GWEN_MSG_REQUEST * | rq | ) |

References GWEN_MsgRequest_GetState(), and GWENHYWFAR_API.

Referenced by GWEN_MsgRequest_GetState().

## GWEN_MsgRequest_HandleResponse()

GWENHYWFAR_API int GWEN_MsgRequest_HandleResponse | ( | GWEN_MSG_REQUEST * | rq,
|  | GWEN_MSG * | msg )

References GWEN_MsgRequest_HandleResponse(), and GWENHYWFAR_API.

Referenced by GWEN_MsgRequest_HandleResponse().

## GWEN_MsgRequest_new()

GWENHYWFAR_API GWEN_MSG_REQUEST * GWEN_MsgRequest_new | ( |  | ) |

References GWEN_MsgRequest_new(), and GWENHYWFAR_API.

Referenced by GWEN_MsgRequest_new().

## GWEN_MsgRequest_SetAbortFn()

GWENHYWFAR_API GWEN_MSG_REQUEST_ABORT_FN GWEN_MsgRequest_SetAbortFn | ( | GWEN_MSG_REQUEST * | rq,
|  | GWEN_MSG_REQUEST_ABORT_FN | f )

References GWEN_MsgRequest_SetAbortFn(), and GWENHYWFAR_API.

Referenced by GWEN_MsgRequest_SetAbortFn().

## GWEN_MsgRequest_SetCreatedAt()

GWENHYWFAR_API void GWEN_MsgRequest_SetCreatedAt | ( | GWEN_MSG_REQUEST * | rq,
|  | GWEN_TIMESTAMP * | ts )

References GWEN_MsgRequest_SetCreatedAt(), and GWENHYWFAR_API.

Referenced by GWEN_MsgRequest_SetCreatedAt().

## GWEN_MsgRequest_SetEndpoint()

GWENHYWFAR_API void GWEN_MsgRequest_SetEndpoint | ( | GWEN_MSG_REQUEST * | rq,
|  | GWEN_MSG_ENDPOINT * | ep )

References GWEN_MsgRequest_SetEndpoint(), and GWENHYWFAR_API.

Referenced by GWEN_MsgRequest_SetEndpoint().

## GWEN_MsgRequest_SetExpiresAt()

GWENHYWFAR_API void GWEN_MsgRequest_SetExpiresAt | ( | GWEN_MSG_REQUEST * | rq,
|  | GWEN_TIMESTAMP * | ts )

References GWEN_MsgRequest_SetExpiresAt(), and GWENHYWFAR_API.

Referenced by GWEN_MsgRequest_SetExpiresAt().

## GWEN_MsgRequest_SetHandleResponseFn()

GWENHYWFAR_API GWEN_MSG_REQUEST_HANDLERESPONSE_FN GWEN_MsgRequest_SetHandleResponseFn | ( | GWEN_MSG_REQUEST * | rq,
|  | GWEN_MSG_REQUEST_HANDLERESPONSE_FN | fn )

References GWEN_MsgRequest_SetHandleResponseFn(), and GWENHYWFAR_API.

Referenced by GWEN_MsgRequest_SetHandleResponseFn().

## GWEN_MsgRequest_SetPrivateData()

GWENHYWFAR_API void GWEN_MsgRequest_SetPrivateData | ( | GWEN_MSG_REQUEST * | rq,
|  | void * | p )

References GWEN_MsgRequest_SetPrivateData(), and GWENHYWFAR_API.

Referenced by GWEN_MsgRequest_SetPrivateData().

## GWEN_MsgRequest_SetRequestMsg()

GWENHYWFAR_API void GWEN_MsgRequest_SetRequestMsg | ( | GWEN_MSG_REQUEST * | rq,
|  | GWEN_MSG * | msg )

References GWEN_MsgRequest_SetRequestMsg(), and GWENHYWFAR_API.

Referenced by GWEN_MsgRequest_SetRequestMsg().

## GWEN_MsgRequest_SetRequestMsgId()

GWENHYWFAR_API void GWEN_MsgRequest_SetRequestMsgId | ( | GWEN_MSG_REQUEST * | rq,
|  | uint32_t | id )

References GWEN_MsgRequest_SetRequestMsgId(), and GWENHYWFAR_API.

Referenced by GWEN_MsgRequest_SetRequestMsgId().

## GWEN_MsgRequest_SetRequestType()

GWENHYWFAR_API void GWEN_MsgRequest_SetRequestType | ( | GWEN_MSG_REQUEST * | rq,
|  | int | t )

References GWEN_MsgRequest_SetRequestType(), and GWENHYWFAR_API.

Referenced by GWEN_MsgRequest_SetRequestType().

## GWEN_MsgRequest_SetResult()

GWENHYWFAR_API void GWEN_MsgRequest_SetResult | ( | GWEN_MSG_REQUEST * | rq,
|  | int | result )

References GWEN_MsgRequest_SetResult(), and GWENHYWFAR_API.

Referenced by GWEN_MsgRequest_SetResult().

## GWEN_MsgRequest_SetState()

GWENHYWFAR_API void GWEN_MsgRequest_SetState | ( | GWEN_MSG_REQUEST * | rq,
|  | int | i )

References GWEN_MsgRequest_SetState(), and GWENHYWFAR_API.

Referenced by GWEN_MsgRequest_SetState().

## GWEN_MsgRequest_SetSubRequestFinishedFn()

GWENHYWFAR_API GWEN_MSG_REQUEST_SUBREQUESTFINISHED_FN GWEN_MsgRequest_SetSubRequestFinishedFn | ( | GWEN_MSG_REQUEST * | rq,
|  | GWEN_MSG_REQUEST_SUBREQUESTFINISHED_FN | f )

References GWEN_MsgRequest_SetSubRequestFinishedFn(), and GWENHYWFAR_API.

Referenced by GWEN_MsgRequest_SetSubRequestFinishedFn().

## GWEN_MsgRequest_SetTimestamps()

GWENHYWFAR_API void GWEN_MsgRequest_SetTimestamps | ( | GWEN_MSG_REQUEST * | rq,
|  | int | expiresInSecs )

References GWEN_MsgRequest_SetTimestamps(), and GWENHYWFAR_API.

Referenced by GWEN_MsgRequest_SetTimestamps().

## GWEN_MsgRequest_SubRequestFinished()

GWENHYWFAR_API void GWEN_MsgRequest_SubRequestFinished | ( | GWEN_MSG_REQUEST * | rq,
|  | GWEN_MSG_REQUEST * | subRq,
|  | int | reason )

References GWEN_MsgRequest_SubRequestFinished(), and GWENHYWFAR_API.

Referenced by GWEN_MsgRequest_SubRequestFinished().

## GWEN_MsgRequest_Tree2_FindByEndpointAndMsgId()

GWENHYWFAR_API GWEN_MSG_REQUEST * GWEN_MsgRequest_Tree2_FindByEndpointAndMsgId | ( | GWEN_MSG_REQUEST * | rootRq,
|  | GWEN_MSG_ENDPOINT * | ep,
|  | uint32_t | refMsgId )

References GWEN_MsgRequest_Tree2_FindByEndpointAndMsgId(), and GWENHYWFAR_API.

Referenced by GWEN_MsgRequest_Tree2_FindByEndpointAndMsgId().