response_eval

March 26, 2020 Contributors

Name

response_eval — Called when there is a response from APNs

Synopsis

#include "modules/mobility/apn/apn.h"

| int **response_eval** ( | closure, |   |
|   | response); |   |

void * <var class="pdparam">closure</var>;
apn_response * <var class="pdparam">response</var>;

Description

**Configuration Change. ** This feature is available as of version 3.5.5.

This hook is called when there is a response from APNs.

Parameters

closure

The closure function.

response

The APN response. For a description of this data type see “apn_error_response”.

Return Values

This hook returns zero or 1. If non-zero, no further hook providers are called. Examine the status field of the response to determine appropriate action. Values for this field are:

  • APNS_NO_ERROR

  • APNS_PROCESSING_ERROR

  • APNS_MISSING_DEVICE_TOKEN

  • APNS_MISSING_TOPIC

  • APNS_MISSING_PAYLOAD

  • APNS_INVALID_TOKEN_SIZE

  • APNS_INVALID_TOPIC_SIZE

  • APNS_INVALID_PAYLOAD_SIZE

  • APNS_INVALID_TOKEN

  • APNS_SHUTDOWN

Threading

This hook will be called in the Scheduler thread.

See Also

Momentum for Mobile Push Notifications and Hooks in the apn Scope