Function anjay_transport_has_unsent_notifications

Function Documentation

bool anjay_transport_has_unsent_notifications(anjay_t *anjay, anjay_transport_set_t transport_set)

Returns whether there are some notifications which have been postponed to be sent later on any of the given transports, either due to the connection being offline or a previous failure to send some notification.

In versions that do not include the SMS commercial feature, or if no SMS trigger connections exist,

anjay_transport_has_unsent_notifications(anjay,

ANJAY_TRANSPORT_SET_ALL)

is equivalent to anjay_has_unsent_notifications(anjay, ANJAY_SSID_ANY). In contrast to that function, both primary and secondary (SMS trigger) connections are queried, if present. Different transport sets may be used to filter the set of server connections queried to only those for which the connection transport matches the provided set.

Parameters:
  • anjay – Anjay object to operate on.

  • transport_set – Set of transports to include in the check.

Returns:

False if all generated notifications for given transports(s) have been either successfully sent, discarded or are being sent at the moment. True otherwise, i.e. if unsent, postponed notifications exist in memory.