unitTests

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 (
	TransactionIDataVerifyVerifyData = binder.FirstCallTransaction + 0
	TransactionIDataVerifyResetData  = binder.FirstCallTransaction + 1
)
View Source
const (
	MethodIDataVerifyVerifyData = "verifyData"
	MethodIDataVerifyResetData  = "resetData"
)
View Source
const DescriptorIDataVerify = "com.android.smspush.unitTests.IDataVerify"

Variables

This section is empty.

Functions

This section is empty.

Types

type DataVerifyProxy

type DataVerifyProxy struct {
	Remote binder.IBinder
}

func NewDataVerifyProxy

func NewDataVerifyProxy(
	remote binder.IBinder,
) *DataVerifyProxy

func (*DataVerifyProxy) AsBinder

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

func (*DataVerifyProxy) ResetData

func (p *DataVerifyProxy) ResetData(
	ctx context.Context,
) error

func (*DataVerifyProxy) VerifyData

func (p *DataVerifyProxy) VerifyData(
	ctx context.Context,
	pdu []byte,
) (bool, error)

type DataVerifyStub

type DataVerifyStub struct {
	Impl      IDataVerify
	Transport binder.VersionAwareTransport
}

DataVerifyStub dispatches incoming binder transactions to a typed IDataVerify implementation.

func (*DataVerifyStub) Descriptor

func (s *DataVerifyStub) Descriptor() string

func (*DataVerifyStub) OnTransaction

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

type IDataVerify

type IDataVerify interface {
	AsBinder() binder.IBinder
	VerifyData(ctx context.Context, pdu []byte) (bool, error)
	ResetData(ctx context.Context) error
}

func NewDataVerifyStub

func NewDataVerifyStub(
	impl IDataVerifyServer,
) IDataVerify

NewDataVerifyStub creates a server-side IDataVerify wrapping the given server implementation. The returned value satisfies IDataVerify 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 IDataVerifyServer

type IDataVerifyServer interface {
	VerifyData(ctx context.Context, pdu []byte) (bool, error)
	ResetData(ctx context.Context) error
}

IDataVerifyServer is the server-side interface that user implementations provide to NewDataVerifyStub. 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