suggestions

package
v0.0.7 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	TransactionISuggestionServiceGetSuggestions    = binder.FirstCallTransaction + 0
	TransactionISuggestionServiceDismissSuggestion = binder.FirstCallTransaction + 1
	TransactionISuggestionServiceLaunchSuggestion  = binder.FirstCallTransaction + 2
)
View Source
const (
	MethodISuggestionServiceGetSuggestions    = "getSuggestions"
	MethodISuggestionServiceDismissSuggestion = "dismissSuggestion"
	MethodISuggestionServiceLaunchSuggestion  = "launchSuggestion"
)
View Source
const DescriptorISuggestionService = "android.service.settings.suggestions.ISuggestionService"

Variables

This section is empty.

Functions

This section is empty.

Types

type ISuggestionService

type ISuggestionService interface {
	AsBinder() binder.IBinder
	GetSuggestions(ctx context.Context) ([]Suggestion, error)
	DismissSuggestion(ctx context.Context, suggestion Suggestion) error
	LaunchSuggestion(ctx context.Context, suggestion Suggestion) error
}

func NewSuggestionServiceStub

func NewSuggestionServiceStub(
	impl ISuggestionServiceServer,
) ISuggestionService

NewSuggestionServiceStub creates a server-side ISuggestionService wrapping the given server implementation. The returned value satisfies ISuggestionService 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 ISuggestionServiceServer

type ISuggestionServiceServer interface {
	GetSuggestions(ctx context.Context) ([]Suggestion, error)
	DismissSuggestion(ctx context.Context, suggestion Suggestion) error
	LaunchSuggestion(ctx context.Context, suggestion Suggestion) error
}

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

type Suggestion

type Suggestion struct {
	Id            string
	Flags         int32
	Icon          *drawable.Icon
	PendingIntent *app.PendingIntent
}

func (*Suggestion) MarshalParcel

func (s *Suggestion) MarshalParcel(
	p *parcel.Parcel,
) error

func (*Suggestion) UnmarshalParcel

func (s *Suggestion) UnmarshalParcel(
	p *parcel.Parcel,
) error

type SuggestionServiceProxy

type SuggestionServiceProxy struct {
	Remote binder.IBinder
}

func NewSuggestionServiceProxy

func NewSuggestionServiceProxy(
	remote binder.IBinder,
) *SuggestionServiceProxy

func (*SuggestionServiceProxy) AsBinder

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

func (*SuggestionServiceProxy) DismissSuggestion

func (p *SuggestionServiceProxy) DismissSuggestion(
	ctx context.Context,
	suggestion Suggestion,
) error

func (*SuggestionServiceProxy) GetSuggestions

func (p *SuggestionServiceProxy) GetSuggestions(
	ctx context.Context,
) ([]Suggestion, error)

func (*SuggestionServiceProxy) LaunchSuggestion

func (p *SuggestionServiceProxy) LaunchSuggestion(
	ctx context.Context,
	suggestion Suggestion,
) error

type SuggestionServiceStub

type SuggestionServiceStub struct {
	Impl      ISuggestionService
	Transport binder.VersionAwareTransport
}

SuggestionServiceStub dispatches incoming binder transactions to a typed ISuggestionService implementation.

func (*SuggestionServiceStub) Descriptor

func (s *SuggestionServiceStub) Descriptor() string

func (*SuggestionServiceStub) OnTransaction

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

Jump to

Keyboard shortcuts

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