Function anjay_server_get_ssids

Function Documentation

AVS_LIST<const anjay_ssid_t> anjay_server_get_ssids(anjay_t *anjay)

Retrieves a list of SSIDs currently present in the Server object. The SSIDs are NOT guaranteed to be returned in any particular order. Returned list may not be freed nor modified.

Attempting to call this function if anjay_server_object_install has not been previously successfully called on the same Anjay instance yields undefined behavior.

The returned list pointer shall be considered invalidated by any call to anjay_sched_run, anjay_serve, anjay_server_object_add_instance, anjay_server_object_purge, anjay_server_object_restore, or, if called from within some callback handler, on return from that handler.

If a transaction on the Server object is currently ongoing (e.g., during Bootstrap), last known state from before the transaction will be returned.

NOTE: If Anjay is compiled with thread safety enabled, the list that is returned is normally accessed with the Anjay mutex locked. You will need to ensure thread safety yourself if using this function. It is recommended to only call it from callback functions called from within Anjay, or in scheduler jobs.

Parameters:

anjay – Anjay instance with Server Object installed.

Returns:

A list of known SSIDs on success, NULL when the object is empty.