resolved created peripheral

This commit is contained in:
2025-11-29 20:06:04 +01:00
parent 2dc6f4a38a
commit d1fda9f075
8 changed files with 112 additions and 42 deletions

View File

@@ -45,11 +45,12 @@ type PeripheralInfo struct {
// PeripheralFinder represents how compatible peripheral drivers are implemented
type PeripheralFinder interface {
Initialize() error // Initializes the protocol
Create(ctx context.Context, peripheralInfo PeripheralInfo) (string, error) // Manually create a peripheral
OnArrival(cb func(context.Context, Peripheral)) // Callback function when a peripheral arrives
OnRemoval(cb func(context.Context, Peripheral)) // Callback function when a peripheral goes away
Start(context.Context) error // Start the detection
WaitStop() error // Waiting for finder to close
GetName() string // Get the name of the finder
Initialize() error // Initializes the protocol
Create(ctx context.Context, peripheralInfo PeripheralInfo) error // Manually create a peripheral
Remove(ctx context.Context, peripheral Peripheral) error // Manually remove a peripheral
OnArrival(cb func(context.Context, Peripheral, bool)) // Callback function when a peripheral arrives
OnRemoval(cb func(context.Context, Peripheral)) // Callback function when a peripheral goes away
Start(context.Context) error // Start the detection
WaitStop() error // Waiting for finder to close
GetName() string // Get the name of the finder
}