nabto_device_authorization_request_init_listener()

DESCRIPTION

Init an authorization request listener to get notifications on incoming authorization requests. This follows the generic listener pattern in the device. Only one authorization listener can exist on the system.

DECLARATION

NABTO_DEVICE_DECL_PREFIX NabtoDeviceError NABTO_DEVICE_API
nabto_device_authorization_request_init_listener(NabtoDevice* device, NabtoDeviceListener* listener)

PARAMETERS

device:
[in] The device instance
listener:
[in] The listener to initialize

RETURNS

  • NABTO_DEVICE_EC_OK: on success
  • NABTO_DEVICE_EC_OUT_OF_MEMORY: if underlying structure could not be allocated
  • NABTO_DEVICE_EC_IN_USE: if an authorization listener exists