Pigweed
 
Loading...
Searching...
No Matches
pw::bluetooth_sapphire::LeaseProvider Class Referenceabstract

#include <lease.h>

Inheritance diagram for pw::bluetooth_sapphire::LeaseProvider:
pw::bluetooth_sapphire::NullLeaseProvider pw::bluetooth_sapphire::testing::FakeLeaseProvider

Public Member Functions

virtual Result< LeaseAcquire (PW_SAPPHIRE_LEASE_TOKEN_TYPE name)=0
 

Detailed Description

Interface for acquiring leases. This interface is what backends implement.

Member Function Documentation

◆ Acquire()

virtual Result< Lease > pw::bluetooth_sapphire::LeaseProvider::Acquire ( PW_SAPPHIRE_LEASE_TOKEN_TYPE  name)
pure virtual

Try to acquire a lease. Prefer to use PW_SAPPHIRE_ACQUIRE_LEASE instead.

Parameters
namewill be either a const char* or a uint32_t depending on whether tokenization is enabled.
Returns
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.


The documentation for this class was generated from the following file: