nRF Connect SDK API 3.4.99
Loading...
Searching...
No Matches

◆ dult_near_owner_state_set()

int dult_near_owner_state_set ( const struct dult_user * user,
enum dult_near_owner_state_mode mode )

#include <include/dult/dult.h>

Set the mode of the DULT near-owner state.

This function can be called by any registered DULT user (see dult_user_register), including before it becomes the associated user, so the near-owner state can be preset ahead of association. The value is stored per user; the accessory uses the currently associated user's value.

Until set, the near-owner state defaults to "near-owner" (see DULT_NEAR_OWNER_STATE_MODE_NEAR_OWNER). With the v1 API (

CONFIG_DULT_API_VARIANT_V1 

) it is cleared by dult_reset, which is the terminal teardown for that variant. With the v2 API (

CONFIG_DULT_API_VARIANT_V2 

) it is preserved across dult_reset and cleared by dult_user_unregister; the user is responsible for setting it as needed after a subsequent association.

Parameters
userUser structure used to authenticate the user.
modeMode of the DULT near-owner state.
Returns
0 if the operation was successful. Otherwise, a (negative) error code is returned.