slice

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: 5 Imported by: 0

Documentation

Index

Constants

View Source
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
)
View Source
const (
	MethodISliceManagerPinSlice                = "pinSlice"
	MethodISliceManagerUnpinSlice              = "unpinSlice"
	MethodISliceManagerHasSliceAccess          = "hasSliceAccess"
	MethodISliceManagerGetPinnedSpecs          = "getPinnedSpecs"
	MethodISliceManagerGetPinnedSlices         = "getPinnedSlices"
	MethodISliceManagerGetBackupPayload        = "getBackupPayload"
	MethodISliceManagerApplyRestore            = "applyRestore"
	MethodISliceManagerGrantSlicePermission    = "grantSlicePermission"
	MethodISliceManagerRevokeSlicePermission   = "revokeSlicePermission"
	MethodISliceManagerCheckSlicePermission    = "checkSlicePermission"
	MethodISliceManagerGrantPermissionFromUser = "grantPermissionFromUser"
)
View Source
const DescriptorISliceListener = "android.app.slice.ISliceListener"
View Source
const DescriptorISliceManager = "android.app.slice.ISliceManager"
View Source
const (
	MethodISliceListenerOnSliceUpdated = "onSliceUpdated"
)
View Source
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

type ISliceListenerServer interface {
	OnSliceUpdated(ctx context.Context, s_ Slice) error
}

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 Slice

type Slice struct {
}

func (*Slice) MarshalParcel

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

func (*Slice) UnmarshalParcel

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

type SliceListenerProxy

type SliceListenerProxy struct {
	Remote binder.IBinder
}

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

type SliceManagerProxy struct {
	Remote binder.IBinder
}

func NewSliceManagerProxy

func NewSliceManagerProxy(
	remote binder.IBinder,
) *SliceManagerProxy

func (*SliceManagerProxy) ApplyRestore

func (p *SliceManagerProxy) ApplyRestore(
	ctx context.Context,
	payload []byte,
	user int32,
) error

func (*SliceManagerProxy) AsBinder

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

func (*SliceManagerProxy) CheckSlicePermission

func (p *SliceManagerProxy) CheckSlicePermission(
	ctx context.Context,
	uri net.Uri,
	callingPkg string,
	pid int32,
	uid int32,
	autoGrantPermissions []string,
) (int32, error)

func (*SliceManagerProxy) GetBackupPayload

func (p *SliceManagerProxy) GetBackupPayload(
	ctx context.Context,
	user int32,
) ([]byte, error)

func (*SliceManagerProxy) GetPinnedSlices

func (p *SliceManagerProxy) GetPinnedSlices(
	ctx context.Context,
	pkg string,
) ([]net.Uri, error)

func (*SliceManagerProxy) GetPinnedSpecs

func (p *SliceManagerProxy) GetPinnedSpecs(
	ctx context.Context,
	uri net.Uri,
	pkg string,
) ([]SliceSpec, error)

func (*SliceManagerProxy) GrantPermissionFromUser

func (p *SliceManagerProxy) GrantPermissionFromUser(
	ctx context.Context,
	uri net.Uri,
	pkg string,
	callingPkg string,
	allSlices bool,
) error

func (*SliceManagerProxy) GrantSlicePermission

func (p *SliceManagerProxy) GrantSlicePermission(
	ctx context.Context,
	callingPkg string,
	toPkg string,
	uri net.Uri,
) error

func (*SliceManagerProxy) HasSliceAccess

func (p *SliceManagerProxy) HasSliceAccess(
	ctx context.Context,
	pkg string,
) (bool, error)

func (*SliceManagerProxy) PinSlice

func (p *SliceManagerProxy) PinSlice(
	ctx context.Context,
	pkg string,
	uri net.Uri,
	specs []SliceSpec,
	token binder.IBinder,
) error

func (*SliceManagerProxy) RevokeSlicePermission

func (p *SliceManagerProxy) RevokeSlicePermission(
	ctx context.Context,
	callingPkg string,
	toPkg string,
	uri net.Uri,
) error

func (*SliceManagerProxy) UnpinSlice

func (p *SliceManagerProxy) UnpinSlice(
	ctx context.Context,
	pkg string,
	uri net.Uri,
	token binder.IBinder,
) error

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)

type SliceSpec

type SliceSpec struct {
	Type     string
	Revision int32
}

func (*SliceSpec) MarshalParcel

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

func (*SliceSpec) UnmarshalParcel

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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