storage

package
v0.0.5 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: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TransactionIExternalStorageServiceStartSession             = binder.FirstCallTransaction + 0
	TransactionIExternalStorageServiceEndSession               = binder.FirstCallTransaction + 1
	TransactionIExternalStorageServiceNotifyVolumeStateChanged = binder.FirstCallTransaction + 2
	TransactionIExternalStorageServiceFreeCache                = binder.FirstCallTransaction + 3
	TransactionIExternalStorageServiceNotifyAnrDelayStarted    = binder.FirstCallTransaction + 4
)
View Source
const (
	MethodIExternalStorageServiceStartSession             = "startSession"
	MethodIExternalStorageServiceEndSession               = "endSession"
	MethodIExternalStorageServiceNotifyVolumeStateChanged = "notifyVolumeStateChanged"
	MethodIExternalStorageServiceFreeCache                = "freeCache"
	MethodIExternalStorageServiceNotifyAnrDelayStarted    = "notifyAnrDelayStarted"
)
View Source
const DescriptorIExternalStorageService = "android.service.storage.IExternalStorageService"

Variables

This section is empty.

Functions

This section is empty.

Types

type ExternalStorageServiceProxy

type ExternalStorageServiceProxy struct {
	Remote binder.IBinder
}

func NewExternalStorageServiceProxy

func NewExternalStorageServiceProxy(
	remote binder.IBinder,
) *ExternalStorageServiceProxy

func (*ExternalStorageServiceProxy) AsBinder

func (*ExternalStorageServiceProxy) EndSession

func (p *ExternalStorageServiceProxy) EndSession(
	ctx context.Context,
	sessionId string,
	callback os.RemoteCallback,
) error

func (*ExternalStorageServiceProxy) FreeCache

func (p *ExternalStorageServiceProxy) FreeCache(
	ctx context.Context,
	sessionId string,
	volumeUuid string,
	bytes int64,
	callback os.RemoteCallback,
) error

func (*ExternalStorageServiceProxy) NotifyAnrDelayStarted

func (p *ExternalStorageServiceProxy) NotifyAnrDelayStarted(
	ctx context.Context,
	packageName string,
	uid int32,
	tid int32,
	reason int32,
) error

func (*ExternalStorageServiceProxy) NotifyVolumeStateChanged

func (p *ExternalStorageServiceProxy) NotifyVolumeStateChanged(
	ctx context.Context,
	sessionId string,
	vol osStorage.StorageVolume,
	callback os.RemoteCallback,
) error

func (*ExternalStorageServiceProxy) StartSession

func (p *ExternalStorageServiceProxy) StartSession(
	ctx context.Context,
	sessionId string,
	type_ int32,
	deviceFd int32,
	upperPath string,
	lowerPath string,
	callback os.RemoteCallback,
) error

type ExternalStorageServiceStub

type ExternalStorageServiceStub struct {
	Impl      IExternalStorageService
	Transport binder.VersionAwareTransport
}

ExternalStorageServiceStub dispatches incoming binder transactions to a typed IExternalStorageService implementation.

func (*ExternalStorageServiceStub) Descriptor

func (s *ExternalStorageServiceStub) Descriptor() string

func (*ExternalStorageServiceStub) OnTransaction

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

type IExternalStorageService

type IExternalStorageService interface {
	AsBinder() binder.IBinder
	StartSession(ctx context.Context, sessionId string, type_ int32, deviceFd int32, upperPath string, lowerPath string, callback os.RemoteCallback) error
	EndSession(ctx context.Context, sessionId string, callback os.RemoteCallback) error
	NotifyVolumeStateChanged(ctx context.Context, sessionId string, vol osStorage.StorageVolume, callback os.RemoteCallback) error
	FreeCache(ctx context.Context, sessionId string, volumeUuid string, bytes int64, callback os.RemoteCallback) error
	NotifyAnrDelayStarted(ctx context.Context, packageName string, uid int32, tid int32, reason int32) error
}

func NewExternalStorageServiceStub

func NewExternalStorageServiceStub(
	impl IExternalStorageServiceServer,
) IExternalStorageService

NewExternalStorageServiceStub creates a server-side IExternalStorageService wrapping the given server implementation. The returned value satisfies IExternalStorageService 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 IExternalStorageServiceServer

type IExternalStorageServiceServer interface {
	StartSession(ctx context.Context, sessionId string, type_ int32, deviceFd int32, upperPath string, lowerPath string, callback os.RemoteCallback) error
	EndSession(ctx context.Context, sessionId string, callback os.RemoteCallback) error
	NotifyVolumeStateChanged(ctx context.Context, sessionId string, vol osStorage.StorageVolume, callback os.RemoteCallback) error
	FreeCache(ctx context.Context, sessionId string, volumeUuid string, bytes int64, callback os.RemoteCallback) error
	NotifyAnrDelayStarted(ctx context.Context, packageName string, uid int32, tid int32, reason int32) error
}

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