FH_GetEvents

FH_GetEvents

Gets unread events from the queue.

BOOL WINAPI FH_GetEvents(
    int nLimit,
    JSON_VAR *pJsonEvents);
  • nLimit – a limitation for the number of received events per single function call:
    • –1 – no limitations. All the queued events are read and subsequently deleted.
    • 0 – check the availability of events without their deletion from the queue.
    • > 0 – read the specified number of events and delete them subsequently from the queue.
      In case there are less events in the queue than specified by nLimit, only those events will be read.
  • pJsonEvents – a pointer to a variable where a string with JSON array of
    [{event1}, {event2}, …] type is put. Each event is a JSON object where the set of data depends on the event type.
    In case a pointer equals toNULL whilenLimit does not equal to zero, the events will be nevertheless deleted from the queue.

Returns TRUE in case the queue contains unread events, otherwise FALSE is returned.

The detailed description of events and data format is provided in the “JSON Events” and “JSON-formatted data” chapters respectively.