Help us shape the future of Go! Take the 2026 Go Developer Survey

earc

package
v0.0.9 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	TransactionIEArcSetEArcEnabled                   = binder.FirstCallTransaction + 0
	TransactionIEArcIsEArcEnabled                    = binder.FirstCallTransaction + 1
	TransactionIEArcSetCallback                      = binder.FirstCallTransaction + 2
	TransactionIEArcGetState                         = binder.FirstCallTransaction + 3
	TransactionIEArcGetLastReportedAudioCapabilities = binder.FirstCallTransaction + 4
)
View Source
const (
	MethodIEArcSetEArcEnabled                   = "setEArcEnabled"
	MethodIEArcIsEArcEnabled                    = "isEArcEnabled"
	MethodIEArcSetCallback                      = "setCallback"
	MethodIEArcGetState                         = "getState"
	MethodIEArcGetLastReportedAudioCapabilities = "getLastReportedAudioCapabilities"
)
View Source
const (
	TransactionIEArcCallbackOnStateChange          = binder.FirstCallTransaction + 0
	TransactionIEArcCallbackOnCapabilitiesReported = binder.FirstCallTransaction + 1
)
View Source
const (
	MethodIEArcCallbackOnStateChange          = "onStateChange"
	MethodIEArcCallbackOnCapabilitiesReported = "onCapabilitiesReported"
)
View Source
const DescriptorIEArc = "android.hardware.tv.hdmi.earc.IEArc"
View Source
const DescriptorIEArcCallback = "android.hardware.tv.hdmi.earc.IEArcCallback"

Variables

This section is empty.

Functions

This section is empty.

Types

type EArcCallbackProxy

type EArcCallbackProxy struct {
	Remote binder.IBinder
}

func NewEArcCallbackProxy

func NewEArcCallbackProxy(
	remote binder.IBinder,
) *EArcCallbackProxy

func (*EArcCallbackProxy) AsBinder

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

func (*EArcCallbackProxy) OnCapabilitiesReported

func (p *EArcCallbackProxy) OnCapabilitiesReported(
	ctx context.Context,
	rawCapabilities []byte,
	portId int32,
) error

func (*EArcCallbackProxy) OnStateChange

func (p *EArcCallbackProxy) OnStateChange(
	ctx context.Context,
	status IEArcStatus,
	portId int32,
) error

type EArcCallbackStub

type EArcCallbackStub struct {
	Impl      IEArcCallback
	Transport binder.VersionAwareTransport
}

EArcCallbackStub dispatches incoming binder transactions to a typed IEArcCallback implementation.

func (*EArcCallbackStub) Descriptor

func (s *EArcCallbackStub) Descriptor() string

func (*EArcCallbackStub) OnTransaction

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

type EArcProxy

type EArcProxy struct {
	Remote binder.IBinder
}

func NewEArcProxy

func NewEArcProxy(
	remote binder.IBinder,
) *EArcProxy

func (*EArcProxy) AsBinder

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

func (*EArcProxy) GetLastReportedAudioCapabilities

func (p *EArcProxy) GetLastReportedAudioCapabilities(
	ctx context.Context,
	portId int32,
) ([]byte, error)

func (*EArcProxy) GetState

func (p *EArcProxy) GetState(
	ctx context.Context,
	portId int32,
) (IEArcStatus, error)

func (*EArcProxy) IsEArcEnabled

func (p *EArcProxy) IsEArcEnabled(
	ctx context.Context,
) (bool, error)

func (*EArcProxy) SetCallback

func (p *EArcProxy) SetCallback(
	ctx context.Context,
	callback IEArcCallback,
) error

func (*EArcProxy) SetEArcEnabled

func (p *EArcProxy) SetEArcEnabled(
	ctx context.Context,
	enabled bool,
) error

type EArcStub

type EArcStub struct {
	Impl      IEArc
	Transport binder.VersionAwareTransport
}

EArcStub dispatches incoming binder transactions to a typed IEArc implementation.

func (*EArcStub) Descriptor

func (s *EArcStub) Descriptor() string

func (*EArcStub) OnTransaction

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

type IEArc

type IEArc interface {
	AsBinder() binder.IBinder
	SetEArcEnabled(ctx context.Context, enabled bool) error
	IsEArcEnabled(ctx context.Context) (bool, error)
	SetCallback(ctx context.Context, callback IEArcCallback) error
	GetState(ctx context.Context, portId int32) (IEArcStatus, error)
	GetLastReportedAudioCapabilities(ctx context.Context, portId int32) ([]byte, error)
}

func NewEArcStub

func NewEArcStub(
	impl IEArcServer,
) IEArc

NewEArcStub creates a server-side IEArc wrapping the given server implementation. The returned value satisfies IEArc 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 IEArcCallback

type IEArcCallback interface {
	AsBinder() binder.IBinder
	OnStateChange(ctx context.Context, status IEArcStatus, portId int32) error
	OnCapabilitiesReported(ctx context.Context, rawCapabilities []byte, portId int32) error
}

func NewEArcCallbackStub

func NewEArcCallbackStub(
	impl IEArcCallbackServer,
) IEArcCallback

NewEArcCallbackStub creates a server-side IEArcCallback wrapping the given server implementation. The returned value satisfies IEArcCallback 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 IEArcCallbackServer

type IEArcCallbackServer interface {
	OnStateChange(ctx context.Context, status IEArcStatus, portId int32) error
	OnCapabilitiesReported(ctx context.Context, rawCapabilities []byte, portId int32) error
}

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

type IEArcServer

type IEArcServer interface {
	SetEArcEnabled(ctx context.Context, enabled bool) error
	IsEArcEnabled(ctx context.Context) (bool, error)
	SetCallback(ctx context.Context, callback IEArcCallback) error
	GetState(ctx context.Context, portId int32) (IEArcStatus, error)
	GetLastReportedAudioCapabilities(ctx context.Context, portId int32) ([]byte, error)
}

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

type IEArcStatus

type IEArcStatus byte
const (
	IEArcStatusIDLE          IEArcStatus = 0
	IEArcStatusEarcPending   IEArcStatus = 1
	IEArcStatusArcPending    IEArcStatus = 2
	IEArcStatusEarcConnected IEArcStatus = 3
)

type Result

type Result int32
const (
	ResultSUCCESS             Result = 0
	ResultFailureUnknown      Result = 1
	ResultFailureInvalidArgs  Result = 2
	ResultFailureNotSupported Result = 4
)

Jump to

Keyboard shortcuts

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