binder

package
v0.0.6 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 (
	TransactionIFooProviderCreateFoo             = binder.FirstCallTransaction + 0
	TransactionIFooProviderIsFooGarbageCollected = binder.FirstCallTransaction + 1
	TransactionIFooProviderKillProcess           = binder.FirstCallTransaction + 2
)
View Source
const (
	MethodIFooProviderCreateFoo             = "createFoo"
	MethodIFooProviderIsFooGarbageCollected = "isFooGarbageCollected"
	MethodIFooProviderKillProcess           = "killProcess"
)
View Source
const DescriptorIFoo = "com.android.test.binder.IFoo"
View Source
const DescriptorIFooProvider = "com.android.test.binder.IFooProvider"

Variables

This section is empty.

Functions

This section is empty.

Types

type FooProviderProxy

type FooProviderProxy struct {
	Remote binder.IBinder
}

func NewFooProviderProxy

func NewFooProviderProxy(
	remote binder.IBinder,
) *FooProviderProxy

func (*FooProviderProxy) AsBinder

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

func (*FooProviderProxy) CreateFoo

func (p *FooProviderProxy) CreateFoo(
	ctx context.Context,
) (IFoo, error)

func (*FooProviderProxy) IsFooGarbageCollected

func (p *FooProviderProxy) IsFooGarbageCollected(
	ctx context.Context,
) (bool, error)

func (*FooProviderProxy) KillProcess

func (p *FooProviderProxy) KillProcess(
	ctx context.Context,
) error

type FooProviderStub

type FooProviderStub struct {
	Impl      IFooProvider
	Transport binder.VersionAwareTransport
}

FooProviderStub dispatches incoming binder transactions to a typed IFooProvider implementation.

func (*FooProviderStub) Descriptor

func (s *FooProviderStub) Descriptor() string

func (*FooProviderStub) OnTransaction

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

type FooProxy

type FooProxy struct {
	Remote binder.IBinder
}

func NewFooProxy

func NewFooProxy(
	remote binder.IBinder,
) *FooProxy

func (*FooProxy) AsBinder

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

type FooStub

type FooStub struct {
	Impl      IFoo
	Transport binder.VersionAwareTransport
}

FooStub dispatches incoming binder transactions to a typed IFoo implementation.

func (*FooStub) Descriptor

func (s *FooStub) Descriptor() string

func (*FooStub) OnTransaction

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

type IFoo

type IFoo interface {
	AsBinder() binder.IBinder
}

func NewFooStub

func NewFooStub(
	impl IFooServer,
) IFoo

NewFooStub creates a server-side IFoo wrapping the given server implementation. The returned value satisfies IFoo 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 IFooProvider

type IFooProvider interface {
	AsBinder() binder.IBinder
	CreateFoo(ctx context.Context) (IFoo, error)
	IsFooGarbageCollected(ctx context.Context) (bool, error)
	KillProcess(ctx context.Context) error
}

func NewFooProviderStub

func NewFooProviderStub(
	impl IFooProviderServer,
) IFooProvider

NewFooProviderStub creates a server-side IFooProvider wrapping the given server implementation. The returned value satisfies IFooProvider 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 IFooProviderServer

type IFooProviderServer interface {
	CreateFoo(ctx context.Context) (IFoo, error)
	IsFooGarbageCollected(ctx context.Context) (bool, error)
	KillProcess(ctx context.Context) error
}

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

type IFooServer

type IFooServer interface {
}

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

Jump to

Keyboard shortcuts

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