Documentation
¶
Index ¶
Constants ¶
const ( TransactionIFooProviderCreateFoo = binder.FirstCallTransaction + 0 TransactionIFooProviderIsFooGarbageCollected = binder.FirstCallTransaction + 1 TransactionIFooProviderKillProcess = binder.FirstCallTransaction + 2 )
const ( MethodIFooProviderCreateFoo = "createFoo" MethodIFooProviderIsFooGarbageCollected = "isFooGarbageCollected" MethodIFooProviderKillProcess = "killProcess" )
const DescriptorIFoo = "com.android.test.binder.IFoo"
const DescriptorIFooProvider = "com.android.test.binder.IFooProvider"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FooProviderProxy ¶
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 ¶
func NewFooProxy ¶
type FooStub ¶
type FooStub struct {
Impl IFoo
Transport binder.VersionAwareTransport
}
FooStub dispatches incoming binder transactions to a typed IFoo implementation.
func (*FooStub) Descriptor ¶
type IFoo ¶
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).