bluetooth

package
v0.0.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 22, 2026 License: CC0-1.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TransactionIBluetoothHciClose          = binder.FirstCallTransaction + 0
	TransactionIBluetoothHciInitialize     = binder.FirstCallTransaction + 1
	TransactionIBluetoothHciSendAclData    = binder.FirstCallTransaction + 2
	TransactionIBluetoothHciSendHciCommand = binder.FirstCallTransaction + 3
	TransactionIBluetoothHciSendIsoData    = binder.FirstCallTransaction + 4
	TransactionIBluetoothHciSendScoData    = binder.FirstCallTransaction + 5
)
View Source
const (
	MethodIBluetoothHciClose          = "close"
	MethodIBluetoothHciInitialize     = "initialize"
	MethodIBluetoothHciSendAclData    = "sendAclData"
	MethodIBluetoothHciSendHciCommand = "sendHciCommand"
	MethodIBluetoothHciSendIsoData    = "sendIsoData"
	MethodIBluetoothHciSendScoData    = "sendScoData"
)
View Source
const (
	TransactionIBluetoothHciCallbacksAclDataReceived        = binder.FirstCallTransaction + 0
	TransactionIBluetoothHciCallbacksHciEventReceived       = binder.FirstCallTransaction + 1
	TransactionIBluetoothHciCallbacksInitializationComplete = binder.FirstCallTransaction + 2
	TransactionIBluetoothHciCallbacksIsoDataReceived        = binder.FirstCallTransaction + 3
	TransactionIBluetoothHciCallbacksScoDataReceived        = binder.FirstCallTransaction + 4
)
View Source
const (
	MethodIBluetoothHciCallbacksAclDataReceived        = "aclDataReceived"
	MethodIBluetoothHciCallbacksHciEventReceived       = "hciEventReceived"
	MethodIBluetoothHciCallbacksInitializationComplete = "initializationComplete"
	MethodIBluetoothHciCallbacksIsoDataReceived        = "isoDataReceived"
	MethodIBluetoothHciCallbacksScoDataReceived        = "scoDataReceived"
)
View Source
const DescriptorIBluetoothHci = "android.hardware.bluetooth.IBluetoothHci"
View Source
const DescriptorIBluetoothHciCallbacks = "android.hardware.bluetooth.IBluetoothHciCallbacks"

Variables

This section is empty.

Functions

This section is empty.

Types

type BluetoothHciCallbacksProxy

type BluetoothHciCallbacksProxy struct {
	Remote binder.IBinder
}

func NewBluetoothHciCallbacksProxy

func NewBluetoothHciCallbacksProxy(
	remote binder.IBinder,
) *BluetoothHciCallbacksProxy

func (*BluetoothHciCallbacksProxy) AclDataReceived

func (p *BluetoothHciCallbacksProxy) AclDataReceived(
	ctx context.Context,
	data []byte,
) error

func (*BluetoothHciCallbacksProxy) AsBinder

func (*BluetoothHciCallbacksProxy) HciEventReceived

func (p *BluetoothHciCallbacksProxy) HciEventReceived(
	ctx context.Context,
	event []byte,
) error

func (*BluetoothHciCallbacksProxy) InitializationComplete

func (p *BluetoothHciCallbacksProxy) InitializationComplete(
	ctx context.Context,
	status Status,
) error

func (*BluetoothHciCallbacksProxy) IsoDataReceived

func (p *BluetoothHciCallbacksProxy) IsoDataReceived(
	ctx context.Context,
	data []byte,
) error

func (*BluetoothHciCallbacksProxy) ScoDataReceived

func (p *BluetoothHciCallbacksProxy) ScoDataReceived(
	ctx context.Context,
	data []byte,
) error

type BluetoothHciCallbacksStub

type BluetoothHciCallbacksStub struct {
	Impl      IBluetoothHciCallbacks
	Transport binder.VersionAwareTransport
}

BluetoothHciCallbacksStub dispatches incoming binder transactions to a typed IBluetoothHciCallbacks implementation.

func (*BluetoothHciCallbacksStub) Descriptor

func (s *BluetoothHciCallbacksStub) Descriptor() string

func (*BluetoothHciCallbacksStub) OnTransaction

func (s *BluetoothHciCallbacksStub) OnTransaction(
	ctx context.Context,
	code binder.TransactionCode,
	_data *parcel.Parcel,
) (*parcel.Parcel, error)

type BluetoothHciProxy

type BluetoothHciProxy struct {
	Remote binder.IBinder
}

func NewBluetoothHciProxy

func NewBluetoothHciProxy(
	remote binder.IBinder,
) *BluetoothHciProxy

func (*BluetoothHciProxy) AsBinder

func (p *BluetoothHciProxy) AsBinder() binder.IBinder

func (*BluetoothHciProxy) Close

func (p *BluetoothHciProxy) Close(
	ctx context.Context,
) error

func (*BluetoothHciProxy) Initialize

func (p *BluetoothHciProxy) Initialize(
	ctx context.Context,
	callback IBluetoothHciCallbacks,
) error

func (*BluetoothHciProxy) SendAclData

func (p *BluetoothHciProxy) SendAclData(
	ctx context.Context,
	data []byte,
) error

func (*BluetoothHciProxy) SendHciCommand

func (p *BluetoothHciProxy) SendHciCommand(
	ctx context.Context,
	command []byte,
) error

func (*BluetoothHciProxy) SendIsoData

func (p *BluetoothHciProxy) SendIsoData(
	ctx context.Context,
	data []byte,
) error

func (*BluetoothHciProxy) SendScoData

func (p *BluetoothHciProxy) SendScoData(
	ctx context.Context,
	data []byte,
) error

type BluetoothHciStub

type BluetoothHciStub struct {
	Impl      IBluetoothHci
	Transport binder.VersionAwareTransport
}

BluetoothHciStub dispatches incoming binder transactions to a typed IBluetoothHci implementation.

func (*BluetoothHciStub) Descriptor

func (s *BluetoothHciStub) Descriptor() string

func (*BluetoothHciStub) OnTransaction

func (s *BluetoothHciStub) OnTransaction(
	ctx context.Context,
	code binder.TransactionCode,
	_data *parcel.Parcel,
) (*parcel.Parcel, error)

type IBluetoothHci

type IBluetoothHci interface {
	AsBinder() binder.IBinder
	Close(ctx context.Context) error
	Initialize(ctx context.Context, callback IBluetoothHciCallbacks) error
	SendAclData(ctx context.Context, data []byte) error
	SendHciCommand(ctx context.Context, command []byte) error
	SendIsoData(ctx context.Context, data []byte) error
	SendScoData(ctx context.Context, data []byte) error
}

func NewBluetoothHciStub

func NewBluetoothHciStub(
	impl IBluetoothHciServer,
) IBluetoothHci

NewBluetoothHciStub creates a server-side IBluetoothHci wrapping the given server implementation. The returned value satisfies IBluetoothHci and can be passed to proxy methods; its AsBinder() returns a *binder.StubBinder that is auto-registered with the binder driver on first use.

type IBluetoothHciCallbacks

type IBluetoothHciCallbacks interface {
	AsBinder() binder.IBinder
	AclDataReceived(ctx context.Context, data []byte) error
	HciEventReceived(ctx context.Context, event []byte) error
	InitializationComplete(ctx context.Context, status Status) error
	IsoDataReceived(ctx context.Context, data []byte) error
	ScoDataReceived(ctx context.Context, data []byte) error
}

func NewBluetoothHciCallbacksStub

func NewBluetoothHciCallbacksStub(
	impl IBluetoothHciCallbacksServer,
) IBluetoothHciCallbacks

NewBluetoothHciCallbacksStub creates a server-side IBluetoothHciCallbacks wrapping the given server implementation. The returned value satisfies IBluetoothHciCallbacks and can be passed to proxy methods; its AsBinder() returns a *binder.StubBinder that is auto-registered with the binder driver on first use.

type IBluetoothHciCallbacksServer

type IBluetoothHciCallbacksServer interface {
	AclDataReceived(ctx context.Context, data []byte) error
	HciEventReceived(ctx context.Context, event []byte) error
	InitializationComplete(ctx context.Context, status Status) error
	IsoDataReceived(ctx context.Context, data []byte) error
	ScoDataReceived(ctx context.Context, data []byte) error
}

IBluetoothHciCallbacksServer is the server-side interface that user implementations provide to NewBluetoothHciCallbacksStub. It contains only the business methods, without AsBinder (which is provided by the stub itself).

type IBluetoothHciServer

type IBluetoothHciServer interface {
	Close(ctx context.Context) error
	Initialize(ctx context.Context, callback IBluetoothHciCallbacks) error
	SendAclData(ctx context.Context, data []byte) error
	SendHciCommand(ctx context.Context, command []byte) error
	SendIsoData(ctx context.Context, data []byte) error
	SendScoData(ctx context.Context, data []byte) error
}

IBluetoothHciServer is the server-side interface that user implementations provide to NewBluetoothHciStub. It contains only the business methods, without AsBinder (which is provided by the stub itself).

type Status

type Status int32
const (
	StatusSUCCESS                     Status = 0
	StatusAlreadyInitialized          Status = 1
	StatusUnableToOpenInterface       Status = 2
	StatusHardwareInitializationError Status = 3
	StatusUNKNOWN                     Status = 4
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL