Documentation
¶
Index ¶
- Constants
- type ISuggestionService
- type ISuggestionServiceServer
- type Suggestion
- type SuggestionServiceProxy
- func (p *SuggestionServiceProxy) AsBinder() binder.IBinder
- func (p *SuggestionServiceProxy) DismissSuggestion(ctx context.Context, suggestion Suggestion) error
- func (p *SuggestionServiceProxy) GetSuggestions(ctx context.Context) ([]Suggestion, error)
- func (p *SuggestionServiceProxy) LaunchSuggestion(ctx context.Context, suggestion Suggestion) error
- type SuggestionServiceStub
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 ¶
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)
Click to show internal directories.
Click to hide internal directories.