Documentation
¶
Index ¶
Constants ¶
View Source
const ( TransactionIPingServicePing = binder.FirstCallTransaction + 0 TransactionIPingServiceEcho = binder.FirstCallTransaction + 1 )
View Source
const ( MethodIPingServicePing = "ping" MethodIPingServiceEcho = "echo" )
View Source
const DescriptorIPingService = "com.example.IPingService"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IPingService ¶
type IPingService interface {
AsBinder() binder.IBinder
Ping(ctx context.Context) (string, error)
Echo(ctx context.Context, message string) (string, error)
}
func NewPingServiceStub ¶
func NewPingServiceStub( impl IPingServiceServer, ) IPingService
NewPingServiceStub creates a server-side IPingService wrapping the given server implementation. The returned value satisfies IPingService 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 IPingServiceServer ¶
type IPingServiceServer interface {
Ping(ctx context.Context) (string, error)
Echo(ctx context.Context, message string) (string, error)
}
IPingServiceServer is the server-side interface that user implementations provide to NewPingServiceStub. It contains only the business methods, without AsBinder (which is provided by the stub itself).
type PingServiceProxy ¶
func NewPingServiceProxy ¶
func NewPingServiceProxy( remote binder.IBinder, ) *PingServiceProxy
func (*PingServiceProxy) AsBinder ¶
func (p *PingServiceProxy) AsBinder() binder.IBinder
type PingServiceStub ¶
type PingServiceStub struct {
Impl IPingService
Transport binder.VersionAwareTransport
}
PingServiceStub dispatches incoming binder transactions to a typed IPingService implementation.
func (*PingServiceStub) Descriptor ¶
func (s *PingServiceStub) Descriptor() string
func (*PingServiceStub) OnTransaction ¶
func (s *PingServiceStub) OnTransaction( ctx context.Context, code binder.TransactionCode, _data *parcel.Parcel, ) (*parcel.Parcel, error)
Click to show internal directories.
Click to hide internal directories.