#include <lease.h>
Public Member Functions | |
virtual Result< Lease > | Acquire (PW_SAPPHIRE_LEASE_TOKEN_TYPE name)=0 |
Interface for acquiring leases. This interface is what backends implement.
|
pure virtual |
Try to acquire a lease. Prefer to use PW_SAPPHIRE_ACQUIRE_LEASE
instead.
name | will be either a const char* or a uint32_t depending on whether tokenization is enabled. |
embed:rst:leading-asterisk * * .. pw-status-codes:: * * OK: A `Lease` was successfully created and returned. * * UNAVAILABLE: A lease could not be created. * * INVALID_ARGUMENT: The name was invalid (e.g. empty). * *
Implemented in pw::bluetooth_sapphire::testing::FakeLeaseProvider, and pw::bluetooth_sapphire::NullLeaseProvider.