Documentation
¶
Index ¶
- Constants
- type ISliceListener
- type ISliceListenerServer
- type ISliceManager
- type ISliceManagerServer
- type Slice
- type SliceListenerProxy
- type SliceListenerStub
- type SliceManagerProxy
- func (p *SliceManagerProxy) ApplyRestore(ctx context.Context, payload []byte, user int32) error
- func (p *SliceManagerProxy) AsBinder() binder.IBinder
- func (p *SliceManagerProxy) CheckSlicePermission(ctx context.Context, uri net.Uri, callingPkg string, pid int32, uid int32, ...) (int32, error)
- func (p *SliceManagerProxy) GetBackupPayload(ctx context.Context, user int32) ([]byte, error)
- func (p *SliceManagerProxy) GetPinnedSlices(ctx context.Context, pkg string) ([]net.Uri, error)
- func (p *SliceManagerProxy) GetPinnedSpecs(ctx context.Context, uri net.Uri, pkg string) ([]SliceSpec, error)
- func (p *SliceManagerProxy) GrantPermissionFromUser(ctx context.Context, uri net.Uri, pkg string, callingPkg string, ...) error
- func (p *SliceManagerProxy) GrantSlicePermission(ctx context.Context, callingPkg string, toPkg string, uri net.Uri) error
- func (p *SliceManagerProxy) HasSliceAccess(ctx context.Context, pkg string) (bool, error)
- func (p *SliceManagerProxy) PinSlice(ctx context.Context, pkg string, uri net.Uri, specs []SliceSpec, ...) error
- func (p *SliceManagerProxy) RevokeSlicePermission(ctx context.Context, callingPkg string, toPkg string, uri net.Uri) error
- func (p *SliceManagerProxy) UnpinSlice(ctx context.Context, pkg string, uri net.Uri, token binder.IBinder) error
- type SliceManagerStub
- type SliceSpec
Constants ¶
const ( TransactionISliceManagerPinSlice = binder.FirstCallTransaction + 0 TransactionISliceManagerUnpinSlice = binder.FirstCallTransaction + 1 TransactionISliceManagerHasSliceAccess = binder.FirstCallTransaction + 2 TransactionISliceManagerGetPinnedSpecs = binder.FirstCallTransaction + 3 TransactionISliceManagerGetPinnedSlices = binder.FirstCallTransaction + 4 TransactionISliceManagerGetBackupPayload = binder.FirstCallTransaction + 5 TransactionISliceManagerApplyRestore = binder.FirstCallTransaction + 6 TransactionISliceManagerGrantSlicePermission = binder.FirstCallTransaction + 7 TransactionISliceManagerRevokeSlicePermission = binder.FirstCallTransaction + 8 TransactionISliceManagerCheckSlicePermission = binder.FirstCallTransaction + 9 TransactionISliceManagerGrantPermissionFromUser = binder.FirstCallTransaction + 10 )
const ( MethodISliceManagerPinSlice = "pinSlice" MethodISliceManagerUnpinSlice = "unpinSlice" MethodISliceManagerHasSliceAccess = "hasSliceAccess" MethodISliceManagerGetPinnedSpecs = "getPinnedSpecs" MethodISliceManagerGetPinnedSlices = "getPinnedSlices" MethodISliceManagerGetBackupPayload = "getBackupPayload" MethodISliceManagerApplyRestore = "applyRestore" MethodISliceManagerGrantSlicePermission = "grantSlicePermission" MethodISliceManagerRevokeSlicePermission = "revokeSlicePermission" MethodISliceManagerCheckSlicePermission = "checkSlicePermission" MethodISliceManagerGrantPermissionFromUser = "grantPermissionFromUser" )
const DescriptorISliceListener = "android.app.slice.ISliceListener"
const DescriptorISliceManager = "android.app.slice.ISliceManager"
const (
MethodISliceListenerOnSliceUpdated = "onSliceUpdated"
)
const (
TransactionISliceListenerOnSliceUpdated = binder.FirstCallTransaction + 0
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ISliceListener ¶
type ISliceListener interface {
AsBinder() binder.IBinder
OnSliceUpdated(ctx context.Context, s_ Slice) error
}
func NewSliceListenerStub ¶
func NewSliceListenerStub( impl ISliceListenerServer, ) ISliceListener
NewSliceListenerStub creates a server-side ISliceListener wrapping the given server implementation. The returned value satisfies ISliceListener 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 ISliceListenerServer ¶
ISliceListenerServer is the server-side interface that user implementations provide to NewSliceListenerStub. It contains only the business methods, without AsBinder (which is provided by the stub itself).
type ISliceManager ¶
type ISliceManager interface {
AsBinder() binder.IBinder
PinSlice(ctx context.Context, pkg string, uri net.Uri, specs []SliceSpec, token binder.IBinder) error
UnpinSlice(ctx context.Context, pkg string, uri net.Uri, token binder.IBinder) error
HasSliceAccess(ctx context.Context, pkg string) (bool, error)
GetPinnedSpecs(ctx context.Context, uri net.Uri, pkg string) ([]SliceSpec, error)
GetPinnedSlices(ctx context.Context, pkg string) ([]net.Uri, error)
GetBackupPayload(ctx context.Context, user int32) ([]byte, error)
ApplyRestore(ctx context.Context, payload []byte, user int32) error
GrantSlicePermission(ctx context.Context, callingPkg string, toPkg string, uri net.Uri) error
RevokeSlicePermission(ctx context.Context, callingPkg string, toPkg string, uri net.Uri) error
CheckSlicePermission(ctx context.Context, uri net.Uri, callingPkg string, pid int32, uid int32, autoGrantPermissions []string) (int32, error)
GrantPermissionFromUser(ctx context.Context, uri net.Uri, pkg string, callingPkg string, allSlices bool) error
}
func NewSliceManagerStub ¶
func NewSliceManagerStub( impl ISliceManagerServer, ) ISliceManager
NewSliceManagerStub creates a server-side ISliceManager wrapping the given server implementation. The returned value satisfies ISliceManager 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 ISliceManagerServer ¶
type ISliceManagerServer interface {
PinSlice(ctx context.Context, pkg string, uri net.Uri, specs []SliceSpec, token binder.IBinder) error
UnpinSlice(ctx context.Context, pkg string, uri net.Uri, token binder.IBinder) error
HasSliceAccess(ctx context.Context, pkg string) (bool, error)
GetPinnedSpecs(ctx context.Context, uri net.Uri, pkg string) ([]SliceSpec, error)
GetPinnedSlices(ctx context.Context, pkg string) ([]net.Uri, error)
GetBackupPayload(ctx context.Context, user int32) ([]byte, error)
ApplyRestore(ctx context.Context, payload []byte, user int32) error
GrantSlicePermission(ctx context.Context, callingPkg string, toPkg string, uri net.Uri) error
RevokeSlicePermission(ctx context.Context, callingPkg string, toPkg string, uri net.Uri) error
CheckSlicePermission(ctx context.Context, uri net.Uri, callingPkg string, pid int32, uid int32, autoGrantPermissions []string) (int32, error)
GrantPermissionFromUser(ctx context.Context, uri net.Uri, pkg string, callingPkg string, allSlices bool) error
}
ISliceManagerServer is the server-side interface that user implementations provide to NewSliceManagerStub. It contains only the business methods, without AsBinder (which is provided by the stub itself).
type SliceListenerProxy ¶
func NewSliceListenerProxy ¶
func NewSliceListenerProxy( remote binder.IBinder, ) *SliceListenerProxy
func (*SliceListenerProxy) AsBinder ¶
func (p *SliceListenerProxy) AsBinder() binder.IBinder
func (*SliceListenerProxy) OnSliceUpdated ¶
func (p *SliceListenerProxy) OnSliceUpdated( ctx context.Context, s_ Slice, ) error
type SliceListenerStub ¶
type SliceListenerStub struct {
Impl ISliceListener
Transport binder.VersionAwareTransport
}
SliceListenerStub dispatches incoming binder transactions to a typed ISliceListener implementation.
func (*SliceListenerStub) Descriptor ¶
func (s *SliceListenerStub) Descriptor() string
func (*SliceListenerStub) OnTransaction ¶
func (s *SliceListenerStub) OnTransaction( ctx context.Context, code binder.TransactionCode, _data *parcel.Parcel, ) (*parcel.Parcel, error)
type SliceManagerProxy ¶
func NewSliceManagerProxy ¶
func NewSliceManagerProxy( remote binder.IBinder, ) *SliceManagerProxy
func (*SliceManagerProxy) ApplyRestore ¶
func (*SliceManagerProxy) AsBinder ¶
func (p *SliceManagerProxy) AsBinder() binder.IBinder
func (*SliceManagerProxy) CheckSlicePermission ¶
func (*SliceManagerProxy) GetBackupPayload ¶
func (*SliceManagerProxy) GetPinnedSlices ¶
func (*SliceManagerProxy) GetPinnedSpecs ¶
func (*SliceManagerProxy) GrantPermissionFromUser ¶
func (*SliceManagerProxy) GrantSlicePermission ¶
func (*SliceManagerProxy) HasSliceAccess ¶
func (*SliceManagerProxy) RevokeSlicePermission ¶
type SliceManagerStub ¶
type SliceManagerStub struct {
Impl ISliceManager
Transport binder.VersionAwareTransport
}
SliceManagerStub dispatches incoming binder transactions to a typed ISliceManager implementation.
func (*SliceManagerStub) Descriptor ¶
func (s *SliceManagerStub) Descriptor() string
func (*SliceManagerStub) OnTransaction ¶
func (s *SliceManagerStub) OnTransaction( ctx context.Context, code binder.TransactionCode, _data *parcel.Parcel, ) (*parcel.Parcel, error)