Documentation
¶
Index ¶
- Constants
- type CrateInfo
- type CrateMetadata
- type DiskInfo
- type IObbActionListener
- type IObbActionListenerServer
- type IStorageEventListener
- type IStorageEventListenerServer
- type IStorageManager
- type IStorageManagerServer
- type IStorageShutdownObserver
- type IStorageShutdownObserverServer
- type ObbActionListenerProxy
- type ObbActionListenerStub
- type StorageEventListenerProxy
- func (p *StorageEventListenerProxy) AsBinder() binder.IBinder
- func (p *StorageEventListenerProxy) OnDiskDestroyed(ctx context.Context, disk DiskInfo) error
- func (p *StorageEventListenerProxy) OnDiskScanned(ctx context.Context, disk DiskInfo, volumeCount int32) error
- func (p *StorageEventListenerProxy) OnStorageStateChanged(ctx context.Context, path string, oldState string, newState string) error
- func (p *StorageEventListenerProxy) OnUsbMassStorageConnectionChanged(ctx context.Context, connected bool) error
- func (p *StorageEventListenerProxy) OnVolumeForgotten(ctx context.Context, fsUuid string) error
- func (p *StorageEventListenerProxy) OnVolumeRecordChanged(ctx context.Context, rec VolumeRecord) error
- func (p *StorageEventListenerProxy) OnVolumeStateChanged(ctx context.Context, vol VolumeInfo, oldState int32, newState int32) error
- type StorageEventListenerStub
- type StorageManagerProxy
- func (p *StorageManagerProxy) AbortChanges(ctx context.Context, message string, retry bool) error
- func (p *StorageManagerProxy) AbortIdleMaintenance(ctx context.Context) error
- func (p *StorageManagerProxy) AllocateBytes(ctx context.Context, volumeUuid string, bytes int64, flags int32) error
- func (p *StorageManagerProxy) AsBinder() binder.IBinder
- func (p *StorageManagerProxy) Benchmark(ctx context.Context, volId string, listener any) error
- func (p *StorageManagerProxy) CommitChanges(ctx context.Context) error
- func (p *StorageManagerProxy) CreateUserStorageKeys(ctx context.Context, ephemeral bool) error
- func (p *StorageManagerProxy) DestroyUserStorage(ctx context.Context, volumeUuid string, flags int32) error
- func (p *StorageManagerProxy) DestroyUserStorageKeys(ctx context.Context) error
- func (p *StorageManagerProxy) DisableAppDataIsolation(ctx context.Context, pkgName string, pid int32) error
- func (p *StorageManagerProxy) FixupAppDir(ctx context.Context, path string) error
- func (p *StorageManagerProxy) ForgetAllVolumes(ctx context.Context) error
- func (p *StorageManagerProxy) ForgetVolume(ctx context.Context, fsUuid string) error
- func (p *StorageManagerProxy) Format(ctx context.Context, volId string) error
- func (p *StorageManagerProxy) Fstrim(ctx context.Context, flags int32, listener any) error
- func (p *StorageManagerProxy) GetAllocatableBytes(ctx context.Context, volumeUuid string, flags int32) (int64, error)
- func (p *StorageManagerProxy) GetCacheQuotaBytes(ctx context.Context, volumeUuid string, uid int32) (int64, error)
- func (p *StorageManagerProxy) GetCacheSizeBytes(ctx context.Context, volumeUuid string, uid int32) (int64, error)
- func (p *StorageManagerProxy) GetCloudMediaProvider(ctx context.Context) (string, error)
- func (p *StorageManagerProxy) GetDisks(ctx context.Context) ([]DiskInfo, error)
- func (p *StorageManagerProxy) GetExternalStorageMountMode(ctx context.Context, uid int32, packageName string) (int32, error)
- func (p *StorageManagerProxy) GetInternalStorageBlockDeviceSize(ctx context.Context) (int64, error)
- func (p *StorageManagerProxy) GetInternalStorageRemainingLifetime(ctx context.Context) (int32, error)
- func (p *StorageManagerProxy) GetManageSpaceActivityIntent(ctx context.Context, packageName string, requestCode int32) (appTypes.PendingIntent, error)
- func (p *StorageManagerProxy) GetMountedObbPath(ctx context.Context, rawPath string) (string, error)
- func (p *StorageManagerProxy) GetPrimaryStorageUuid(ctx context.Context) (string, error)
- func (p *StorageManagerProxy) GetVolumeList(ctx context.Context, flags int32) ([]StorageVolume, error)
- func (p *StorageManagerProxy) GetVolumeRecords(ctx context.Context, flags int32) ([]VolumeRecord, error)
- func (p *StorageManagerProxy) GetVolumes(ctx context.Context, flags int32) ([]VolumeInfo, error)
- func (p *StorageManagerProxy) IsAppIoBlocked(ctx context.Context, volumeUuid string, uid int32, tid int32, reason int32) (bool, error)
- func (p *StorageManagerProxy) IsCeStorageUnlocked(ctx context.Context) (bool, error)
- func (p *StorageManagerProxy) IsObbMounted(ctx context.Context, rawPath string) (bool, error)
- func (p *StorageManagerProxy) LastMaintenance(ctx context.Context) (int64, error)
- func (p *StorageManagerProxy) LockCeStorage(ctx context.Context) error
- func (p *StorageManagerProxy) Mkdirs(ctx context.Context, callingPkg string, path string) error
- func (p *StorageManagerProxy) Mount(ctx context.Context, volId string) error
- func (p *StorageManagerProxy) MountObb(ctx context.Context, rawPath string, canonicalPath string, ...) error
- func (p *StorageManagerProxy) MountProxyFileDescriptorBridge(ctx context.Context) (os.AppFuseMount, error)
- func (p *StorageManagerProxy) NeedsCheckpoint(ctx context.Context) (bool, error)
- func (p *StorageManagerProxy) NotifyAppIoBlocked(ctx context.Context, volumeUuid string, uid int32, tid int32, reason int32) error
- func (p *StorageManagerProxy) NotifyAppIoResumed(ctx context.Context, volumeUuid string, uid int32, tid int32, reason int32) error
- func (p *StorageManagerProxy) OpenProxyFileDescriptor(ctx context.Context, mountPointId int32, fileId int32, mode int32) (int32, error)
- func (p *StorageManagerProxy) PartitionMixed(ctx context.Context, diskId string, ratio int32) error
- func (p *StorageManagerProxy) PartitionPrivate(ctx context.Context, diskId string) error
- func (p *StorageManagerProxy) PartitionPublic(ctx context.Context, diskId string) error
- func (p *StorageManagerProxy) PrepareUserStorage(ctx context.Context, volumeUuid string, flags int32) error
- func (p *StorageManagerProxy) RegisterListener(ctx context.Context, listener IStorageEventListener) error
- func (p *StorageManagerProxy) RunIdleMaintenance(ctx context.Context) error
- func (p *StorageManagerProxy) RunMaintenance(ctx context.Context) error
- func (p *StorageManagerProxy) SetCeStorageProtection(ctx context.Context, secret []byte) error
- func (p *StorageManagerProxy) SetCloudMediaProvider(ctx context.Context, authority string) error
- func (p *StorageManagerProxy) SetDebugFlags(ctx context.Context, flags int32, mask int32) error
- func (p *StorageManagerProxy) SetPrimaryStorageUuid(ctx context.Context, volumeUuid string, callback types.IPackageMoveObserver) error
- func (p *StorageManagerProxy) SetVolumeNickname(ctx context.Context, fsUuid string, nickname string) error
- func (p *StorageManagerProxy) SetVolumeUserFlags(ctx context.Context, fsUuid string, flags int32, mask int32) error
- func (p *StorageManagerProxy) Shutdown(ctx context.Context, observer IStorageShutdownObserver) error
- func (p *StorageManagerProxy) StartCheckpoint(ctx context.Context, numTries int32) error
- func (p *StorageManagerProxy) SupportsCheckpoint(ctx context.Context) (bool, error)
- func (p *StorageManagerProxy) UnlockCeStorage(ctx context.Context, secret []byte) error
- func (p *StorageManagerProxy) Unmount(ctx context.Context, volId string) error
- func (p *StorageManagerProxy) UnmountObb(ctx context.Context, rawPath string, force bool, token IObbActionListener, ...) error
- func (p *StorageManagerProxy) UnregisterListener(ctx context.Context, listener IStorageEventListener) error
- type StorageManagerStub
- type StorageShutdownObserverProxy
- type StorageShutdownObserverStub
- type StorageVolume
- type VolumeInfo
- type VolumeRecord
Constants ¶
const ( TransactionIStorageEventListenerOnUsbMassStorageConnectionChanged = binder.FirstCallTransaction + 0 TransactionIStorageEventListenerOnStorageStateChanged = binder.FirstCallTransaction + 0 TransactionIStorageEventListenerOnVolumeStateChanged = binder.FirstCallTransaction + 1 TransactionIStorageEventListenerOnVolumeRecordChanged = binder.FirstCallTransaction + 2 TransactionIStorageEventListenerOnVolumeForgotten = binder.FirstCallTransaction + 3 TransactionIStorageEventListenerOnDiskScanned = binder.FirstCallTransaction + 4 TransactionIStorageEventListenerOnDiskDestroyed = binder.FirstCallTransaction + 5 )
const ( MethodIStorageEventListenerOnUsbMassStorageConnectionChanged = "onUsbMassStorageConnectionChanged" MethodIStorageEventListenerOnStorageStateChanged = "onStorageStateChanged" MethodIStorageEventListenerOnVolumeStateChanged = "onVolumeStateChanged" MethodIStorageEventListenerOnVolumeRecordChanged = "onVolumeRecordChanged" MethodIStorageEventListenerOnVolumeForgotten = "onVolumeForgotten" MethodIStorageEventListenerOnDiskScanned = "onDiskScanned" MethodIStorageEventListenerOnDiskDestroyed = "onDiskDestroyed" )
const ( TransactionIStorageManagerRegisterListener = binder.FirstCallTransaction + 0 TransactionIStorageManagerUnregisterListener = binder.FirstCallTransaction + 0 TransactionIStorageManagerShutdown = binder.FirstCallTransaction + 18 TransactionIStorageManagerMountObb = binder.FirstCallTransaction + 20 TransactionIStorageManagerUnmountObb = binder.FirstCallTransaction + 21 TransactionIStorageManagerIsObbMounted = binder.FirstCallTransaction + 22 TransactionIStorageManagerGetMountedObbPath = binder.FirstCallTransaction + 23 TransactionIStorageManagerGetVolumeList = binder.FirstCallTransaction + 28 TransactionIStorageManagerMkdirs = binder.FirstCallTransaction + 33 TransactionIStorageManagerLastMaintenance = binder.FirstCallTransaction + 40 TransactionIStorageManagerRunMaintenance = binder.FirstCallTransaction + 41 TransactionIStorageManagerGetDisks = binder.FirstCallTransaction + 43 TransactionIStorageManagerGetVolumes = binder.FirstCallTransaction + 44 TransactionIStorageManagerGetVolumeRecords = binder.FirstCallTransaction + 45 TransactionIStorageManagerMount = binder.FirstCallTransaction + 46 TransactionIStorageManagerUnmount = binder.FirstCallTransaction + 47 TransactionIStorageManagerFormat = binder.FirstCallTransaction + 48 TransactionIStorageManagerPartitionPublic = binder.FirstCallTransaction + 49 TransactionIStorageManagerPartitionPrivate = binder.FirstCallTransaction + 50 TransactionIStorageManagerPartitionMixed = binder.FirstCallTransaction + 51 TransactionIStorageManagerSetVolumeNickname = binder.FirstCallTransaction + 52 TransactionIStorageManagerSetVolumeUserFlags = binder.FirstCallTransaction + 53 TransactionIStorageManagerForgetVolume = binder.FirstCallTransaction + 54 TransactionIStorageManagerForgetAllVolumes = binder.FirstCallTransaction + 55 TransactionIStorageManagerGetPrimaryStorageUuid = binder.FirstCallTransaction + 56 TransactionIStorageManagerSetPrimaryStorageUuid = binder.FirstCallTransaction + 57 TransactionIStorageManagerBenchmark = binder.FirstCallTransaction + 58 TransactionIStorageManagerSetDebugFlags = binder.FirstCallTransaction + 59 TransactionIStorageManagerCreateUserStorageKeys = binder.FirstCallTransaction + 60 TransactionIStorageManagerDestroyUserStorageKeys = binder.FirstCallTransaction + 61 TransactionIStorageManagerUnlockCeStorage = binder.FirstCallTransaction + 62 TransactionIStorageManagerLockCeStorage = binder.FirstCallTransaction + 63 TransactionIStorageManagerIsCeStorageUnlocked = binder.FirstCallTransaction + 64 TransactionIStorageManagerPrepareUserStorage = binder.FirstCallTransaction + 65 TransactionIStorageManagerDestroyUserStorage = binder.FirstCallTransaction + 66 TransactionIStorageManagerSetCeStorageProtection = binder.FirstCallTransaction + 69 TransactionIStorageManagerFstrim = binder.FirstCallTransaction + 71 TransactionIStorageManagerMountProxyFileDescriptorBridge = binder.FirstCallTransaction + 72 TransactionIStorageManagerOpenProxyFileDescriptor = binder.FirstCallTransaction + 73 TransactionIStorageManagerGetCacheQuotaBytes = binder.FirstCallTransaction + 74 TransactionIStorageManagerGetCacheSizeBytes = binder.FirstCallTransaction + 75 TransactionIStorageManagerGetAllocatableBytes = binder.FirstCallTransaction + 76 TransactionIStorageManagerAllocateBytes = binder.FirstCallTransaction + 77 TransactionIStorageManagerRunIdleMaintenance = binder.FirstCallTransaction + 78 TransactionIStorageManagerAbortIdleMaintenance = binder.FirstCallTransaction + 79 TransactionIStorageManagerCommitChanges = binder.FirstCallTransaction + 82 TransactionIStorageManagerSupportsCheckpoint = binder.FirstCallTransaction + 83 TransactionIStorageManagerStartCheckpoint = binder.FirstCallTransaction + 84 TransactionIStorageManagerNeedsCheckpoint = binder.FirstCallTransaction + 85 TransactionIStorageManagerAbortChanges = binder.FirstCallTransaction + 86 TransactionIStorageManagerFixupAppDir = binder.FirstCallTransaction + 88 TransactionIStorageManagerDisableAppDataIsolation = binder.FirstCallTransaction + 89 TransactionIStorageManagerGetManageSpaceActivityIntent = binder.FirstCallTransaction + 90 TransactionIStorageManagerNotifyAppIoBlocked = binder.FirstCallTransaction + 91 TransactionIStorageManagerNotifyAppIoResumed = binder.FirstCallTransaction + 92 TransactionIStorageManagerGetExternalStorageMountMode = binder.FirstCallTransaction + 93 TransactionIStorageManagerIsAppIoBlocked = binder.FirstCallTransaction + 94 TransactionIStorageManagerSetCloudMediaProvider = binder.FirstCallTransaction + 95 TransactionIStorageManagerGetCloudMediaProvider = binder.FirstCallTransaction + 96 TransactionIStorageManagerGetInternalStorageBlockDeviceSize = binder.FirstCallTransaction + 97 TransactionIStorageManagerGetInternalStorageRemainingLifetime = binder.FirstCallTransaction + 98 )
const ( MethodIStorageManagerRegisterListener = "registerListener" MethodIStorageManagerUnregisterListener = "unregisterListener" MethodIStorageManagerShutdown = "shutdown" MethodIStorageManagerMountObb = "mountObb" MethodIStorageManagerUnmountObb = "unmountObb" MethodIStorageManagerIsObbMounted = "isObbMounted" MethodIStorageManagerGetMountedObbPath = "getMountedObbPath" MethodIStorageManagerGetVolumeList = "getVolumeList" MethodIStorageManagerMkdirs = "mkdirs" MethodIStorageManagerLastMaintenance = "lastMaintenance" MethodIStorageManagerRunMaintenance = "runMaintenance" MethodIStorageManagerGetDisks = "getDisks" MethodIStorageManagerGetVolumes = "getVolumes" MethodIStorageManagerGetVolumeRecords = "getVolumeRecords" MethodIStorageManagerMount = "mount" MethodIStorageManagerUnmount = "unmount" MethodIStorageManagerFormat = "format" MethodIStorageManagerPartitionPublic = "partitionPublic" MethodIStorageManagerPartitionPrivate = "partitionPrivate" MethodIStorageManagerPartitionMixed = "partitionMixed" MethodIStorageManagerSetVolumeNickname = "setVolumeNickname" MethodIStorageManagerSetVolumeUserFlags = "setVolumeUserFlags" MethodIStorageManagerForgetVolume = "forgetVolume" MethodIStorageManagerForgetAllVolumes = "forgetAllVolumes" MethodIStorageManagerGetPrimaryStorageUuid = "getPrimaryStorageUuid" MethodIStorageManagerSetPrimaryStorageUuid = "setPrimaryStorageUuid" MethodIStorageManagerBenchmark = "benchmark" MethodIStorageManagerSetDebugFlags = "setDebugFlags" MethodIStorageManagerCreateUserStorageKeys = "createUserStorageKeys" MethodIStorageManagerDestroyUserStorageKeys = "destroyUserStorageKeys" MethodIStorageManagerUnlockCeStorage = "unlockCeStorage" MethodIStorageManagerLockCeStorage = "lockCeStorage" MethodIStorageManagerIsCeStorageUnlocked = "isCeStorageUnlocked" MethodIStorageManagerPrepareUserStorage = "prepareUserStorage" MethodIStorageManagerDestroyUserStorage = "destroyUserStorage" MethodIStorageManagerSetCeStorageProtection = "setCeStorageProtection" MethodIStorageManagerFstrim = "fstrim" MethodIStorageManagerMountProxyFileDescriptorBridge = "mountProxyFileDescriptorBridge" MethodIStorageManagerOpenProxyFileDescriptor = "openProxyFileDescriptor" MethodIStorageManagerGetCacheQuotaBytes = "getCacheQuotaBytes" MethodIStorageManagerGetCacheSizeBytes = "getCacheSizeBytes" MethodIStorageManagerGetAllocatableBytes = "getAllocatableBytes" MethodIStorageManagerAllocateBytes = "allocateBytes" MethodIStorageManagerRunIdleMaintenance = "runIdleMaintenance" MethodIStorageManagerAbortIdleMaintenance = "abortIdleMaintenance" MethodIStorageManagerCommitChanges = "commitChanges" MethodIStorageManagerSupportsCheckpoint = "supportsCheckpoint" MethodIStorageManagerStartCheckpoint = "startCheckpoint" MethodIStorageManagerNeedsCheckpoint = "needsCheckpoint" MethodIStorageManagerAbortChanges = "abortChanges" MethodIStorageManagerFixupAppDir = "fixupAppDir" MethodIStorageManagerDisableAppDataIsolation = "disableAppDataIsolation" MethodIStorageManagerGetManageSpaceActivityIntent = "getManageSpaceActivityIntent" MethodIStorageManagerNotifyAppIoBlocked = "notifyAppIoBlocked" MethodIStorageManagerNotifyAppIoResumed = "notifyAppIoResumed" MethodIStorageManagerGetExternalStorageMountMode = "getExternalStorageMountMode" MethodIStorageManagerIsAppIoBlocked = "isAppIoBlocked" MethodIStorageManagerSetCloudMediaProvider = "setCloudMediaProvider" MethodIStorageManagerGetCloudMediaProvider = "getCloudMediaProvider" MethodIStorageManagerGetInternalStorageBlockDeviceSize = "getInternalStorageBlockDeviceSize" MethodIStorageManagerGetInternalStorageRemainingLifetime = "getInternalStorageRemainingLifetime" )
const DescriptorIObbActionListener = "android.os.storage.IObbActionListener"
const DescriptorIStorageEventListener = "android.os.storage.IStorageEventListener"
const DescriptorIStorageManager = "android.os.storage.IStorageManager"
const DescriptorIStorageShutdownObserver = "android.os.storage.IStorageShutdownObserver"
const (
MethodIObbActionListenerOnObbResult = "onObbResult"
)
const (
MethodIStorageShutdownObserverOnShutDownComplete = "onShutDownComplete"
)
const (
TransactionIObbActionListenerOnObbResult = binder.FirstCallTransaction + 0
)
const (
TransactionIStorageShutdownObserverOnShutDownComplete = binder.FirstCallTransaction + 0
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CrateMetadata ¶
func (*CrateMetadata) MarshalParcel ¶
func (s *CrateMetadata) MarshalParcel( p *parcel.Parcel, ) error
func (*CrateMetadata) UnmarshalParcel ¶
func (s *CrateMetadata) UnmarshalParcel( p *parcel.Parcel, ) error
type IObbActionListener ¶
type IObbActionListener interface {
AsBinder() binder.IBinder
OnObbResult(ctx context.Context, filename string, nonce int32, status int32) error
}
func NewObbActionListenerStub ¶
func NewObbActionListenerStub( impl IObbActionListenerServer, ) IObbActionListener
NewObbActionListenerStub creates a server-side IObbActionListener wrapping the given server implementation. The returned value satisfies IObbActionListener 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 IObbActionListenerServer ¶
type IObbActionListenerServer interface {
OnObbResult(ctx context.Context, filename string, nonce int32, status int32) error
}
IObbActionListenerServer is the server-side interface that user implementations provide to NewObbActionListenerStub. It contains only the business methods, without AsBinder (which is provided by the stub itself).
type IStorageEventListener ¶
type IStorageEventListener interface {
AsBinder() binder.IBinder
OnUsbMassStorageConnectionChanged(ctx context.Context, connected bool) error
OnStorageStateChanged(ctx context.Context, path string, oldState string, newState string) error
OnVolumeStateChanged(ctx context.Context, vol VolumeInfo, oldState int32, newState int32) error
OnVolumeRecordChanged(ctx context.Context, rec VolumeRecord) error
OnVolumeForgotten(ctx context.Context, fsUuid string) error
OnDiskScanned(ctx context.Context, disk DiskInfo, volumeCount int32) error
OnDiskDestroyed(ctx context.Context, disk DiskInfo) error
}
func NewStorageEventListenerStub ¶
func NewStorageEventListenerStub( impl IStorageEventListenerServer, ) IStorageEventListener
NewStorageEventListenerStub creates a server-side IStorageEventListener wrapping the given server implementation. The returned value satisfies IStorageEventListener 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 IStorageEventListenerServer ¶
type IStorageEventListenerServer interface {
OnUsbMassStorageConnectionChanged(ctx context.Context, connected bool) error
OnStorageStateChanged(ctx context.Context, path string, oldState string, newState string) error
OnVolumeStateChanged(ctx context.Context, vol VolumeInfo, oldState int32, newState int32) error
OnVolumeRecordChanged(ctx context.Context, rec VolumeRecord) error
OnVolumeForgotten(ctx context.Context, fsUuid string) error
OnDiskScanned(ctx context.Context, disk DiskInfo, volumeCount int32) error
OnDiskDestroyed(ctx context.Context, disk DiskInfo) error
}
IStorageEventListenerServer is the server-side interface that user implementations provide to NewStorageEventListenerStub. It contains only the business methods, without AsBinder (which is provided by the stub itself).
type IStorageManager ¶
type IStorageManager interface {
AsBinder() binder.IBinder
RegisterListener(ctx context.Context, listener IStorageEventListener) error
UnregisterListener(ctx context.Context, listener IStorageEventListener) error
Shutdown(ctx context.Context, observer IStorageShutdownObserver) error
MountObb(ctx context.Context, rawPath string, canonicalPath string, token IObbActionListener, nonce int32, obbInfo res.ObbInfo) error
UnmountObb(ctx context.Context, rawPath string, force bool, token IObbActionListener, nonce int32) error
IsObbMounted(ctx context.Context, rawPath string) (bool, error)
GetMountedObbPath(ctx context.Context, rawPath string) (string, error)
GetVolumeList(ctx context.Context, flags int32) ([]StorageVolume, error)
Mkdirs(ctx context.Context, callingPkg string, path string) error
LastMaintenance(ctx context.Context) (int64, error)
RunMaintenance(ctx context.Context) error
GetDisks(ctx context.Context) ([]DiskInfo, error)
GetVolumes(ctx context.Context, flags int32) ([]VolumeInfo, error)
GetVolumeRecords(ctx context.Context, flags int32) ([]VolumeRecord, error)
Mount(ctx context.Context, volId string) error
Unmount(ctx context.Context, volId string) error
Format(ctx context.Context, volId string) error
PartitionPublic(ctx context.Context, diskId string) error
PartitionPrivate(ctx context.Context, diskId string) error
PartitionMixed(ctx context.Context, diskId string, ratio int32) error
SetVolumeNickname(ctx context.Context, fsUuid string, nickname string) error
SetVolumeUserFlags(ctx context.Context, fsUuid string, flags int32, mask int32) error
ForgetVolume(ctx context.Context, fsUuid string) error
ForgetAllVolumes(ctx context.Context) error
GetPrimaryStorageUuid(ctx context.Context) (string, error)
SetPrimaryStorageUuid(ctx context.Context, volumeUuid string, callback types.IPackageMoveObserver) error
Benchmark(ctx context.Context, volId string, listener any) error
SetDebugFlags(ctx context.Context, flags int32, mask int32) error
CreateUserStorageKeys(ctx context.Context, ephemeral bool) error
DestroyUserStorageKeys(ctx context.Context) error
UnlockCeStorage(ctx context.Context, secret []byte) error
LockCeStorage(ctx context.Context) error
IsCeStorageUnlocked(ctx context.Context) (bool, error)
PrepareUserStorage(ctx context.Context, volumeUuid string, flags int32) error
DestroyUserStorage(ctx context.Context, volumeUuid string, flags int32) error
SetCeStorageProtection(ctx context.Context, secret []byte) error
Fstrim(ctx context.Context, flags int32, listener any) error
MountProxyFileDescriptorBridge(ctx context.Context) (os.AppFuseMount, error)
OpenProxyFileDescriptor(ctx context.Context, mountPointId int32, fileId int32, mode int32) (int32, error)
GetCacheQuotaBytes(ctx context.Context, volumeUuid string, uid int32) (int64, error)
GetCacheSizeBytes(ctx context.Context, volumeUuid string, uid int32) (int64, error)
GetAllocatableBytes(ctx context.Context, volumeUuid string, flags int32) (int64, error)
AllocateBytes(ctx context.Context, volumeUuid string, bytes int64, flags int32) error
RunIdleMaintenance(ctx context.Context) error
AbortIdleMaintenance(ctx context.Context) error
CommitChanges(ctx context.Context) error
SupportsCheckpoint(ctx context.Context) (bool, error)
StartCheckpoint(ctx context.Context, numTries int32) error
NeedsCheckpoint(ctx context.Context) (bool, error)
AbortChanges(ctx context.Context, message string, retry bool) error
FixupAppDir(ctx context.Context, path string) error
DisableAppDataIsolation(ctx context.Context, pkgName string, pid int32) error
GetManageSpaceActivityIntent(ctx context.Context, packageName string, requestCode int32) (appTypes.PendingIntent, error)
NotifyAppIoBlocked(ctx context.Context, volumeUuid string, uid int32, tid int32, reason int32) error
NotifyAppIoResumed(ctx context.Context, volumeUuid string, uid int32, tid int32, reason int32) error
GetExternalStorageMountMode(ctx context.Context, uid int32, packageName string) (int32, error)
IsAppIoBlocked(ctx context.Context, volumeUuid string, uid int32, tid int32, reason int32) (bool, error)
SetCloudMediaProvider(ctx context.Context, authority string) error
GetCloudMediaProvider(ctx context.Context) (string, error)
GetInternalStorageBlockDeviceSize(ctx context.Context) (int64, error)
GetInternalStorageRemainingLifetime(ctx context.Context) (int32, error)
}
func NewStorageManagerStub ¶
func NewStorageManagerStub( impl IStorageManagerServer, ) IStorageManager
NewStorageManagerStub creates a server-side IStorageManager wrapping the given server implementation. The returned value satisfies IStorageManager 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 IStorageManagerServer ¶
type IStorageManagerServer interface {
RegisterListener(ctx context.Context, listener IStorageEventListener) error
UnregisterListener(ctx context.Context, listener IStorageEventListener) error
Shutdown(ctx context.Context, observer IStorageShutdownObserver) error
MountObb(ctx context.Context, rawPath string, canonicalPath string, token IObbActionListener, nonce int32, obbInfo res.ObbInfo) error
UnmountObb(ctx context.Context, rawPath string, force bool, token IObbActionListener, nonce int32) error
IsObbMounted(ctx context.Context, rawPath string) (bool, error)
GetMountedObbPath(ctx context.Context, rawPath string) (string, error)
GetVolumeList(ctx context.Context, flags int32) ([]StorageVolume, error)
Mkdirs(ctx context.Context, callingPkg string, path string) error
LastMaintenance(ctx context.Context) (int64, error)
RunMaintenance(ctx context.Context) error
GetDisks(ctx context.Context) ([]DiskInfo, error)
GetVolumes(ctx context.Context, flags int32) ([]VolumeInfo, error)
GetVolumeRecords(ctx context.Context, flags int32) ([]VolumeRecord, error)
Mount(ctx context.Context, volId string) error
Unmount(ctx context.Context, volId string) error
Format(ctx context.Context, volId string) error
PartitionPublic(ctx context.Context, diskId string) error
PartitionPrivate(ctx context.Context, diskId string) error
PartitionMixed(ctx context.Context, diskId string, ratio int32) error
SetVolumeNickname(ctx context.Context, fsUuid string, nickname string) error
SetVolumeUserFlags(ctx context.Context, fsUuid string, flags int32, mask int32) error
ForgetVolume(ctx context.Context, fsUuid string) error
ForgetAllVolumes(ctx context.Context) error
GetPrimaryStorageUuid(ctx context.Context) (string, error)
SetPrimaryStorageUuid(ctx context.Context, volumeUuid string, callback types.IPackageMoveObserver) error
Benchmark(ctx context.Context, volId string, listener any) error
SetDebugFlags(ctx context.Context, flags int32, mask int32) error
CreateUserStorageKeys(ctx context.Context, ephemeral bool) error
DestroyUserStorageKeys(ctx context.Context) error
UnlockCeStorage(ctx context.Context, secret []byte) error
LockCeStorage(ctx context.Context) error
IsCeStorageUnlocked(ctx context.Context) (bool, error)
PrepareUserStorage(ctx context.Context, volumeUuid string, flags int32) error
DestroyUserStorage(ctx context.Context, volumeUuid string, flags int32) error
SetCeStorageProtection(ctx context.Context, secret []byte) error
Fstrim(ctx context.Context, flags int32, listener any) error
MountProxyFileDescriptorBridge(ctx context.Context) (os.AppFuseMount, error)
OpenProxyFileDescriptor(ctx context.Context, mountPointId int32, fileId int32, mode int32) (int32, error)
GetCacheQuotaBytes(ctx context.Context, volumeUuid string, uid int32) (int64, error)
GetCacheSizeBytes(ctx context.Context, volumeUuid string, uid int32) (int64, error)
GetAllocatableBytes(ctx context.Context, volumeUuid string, flags int32) (int64, error)
AllocateBytes(ctx context.Context, volumeUuid string, bytes int64, flags int32) error
RunIdleMaintenance(ctx context.Context) error
AbortIdleMaintenance(ctx context.Context) error
CommitChanges(ctx context.Context) error
SupportsCheckpoint(ctx context.Context) (bool, error)
StartCheckpoint(ctx context.Context, numTries int32) error
NeedsCheckpoint(ctx context.Context) (bool, error)
AbortChanges(ctx context.Context, message string, retry bool) error
FixupAppDir(ctx context.Context, path string) error
DisableAppDataIsolation(ctx context.Context, pkgName string, pid int32) error
GetManageSpaceActivityIntent(ctx context.Context, packageName string, requestCode int32) (appTypes.PendingIntent, error)
NotifyAppIoBlocked(ctx context.Context, volumeUuid string, uid int32, tid int32, reason int32) error
NotifyAppIoResumed(ctx context.Context, volumeUuid string, uid int32, tid int32, reason int32) error
GetExternalStorageMountMode(ctx context.Context, uid int32, packageName string) (int32, error)
IsAppIoBlocked(ctx context.Context, volumeUuid string, uid int32, tid int32, reason int32) (bool, error)
SetCloudMediaProvider(ctx context.Context, authority string) error
GetCloudMediaProvider(ctx context.Context) (string, error)
GetInternalStorageBlockDeviceSize(ctx context.Context) (int64, error)
GetInternalStorageRemainingLifetime(ctx context.Context) (int32, error)
}
IStorageManagerServer is the server-side interface that user implementations provide to NewStorageManagerStub. It contains only the business methods, without AsBinder (which is provided by the stub itself).
type IStorageShutdownObserver ¶
type IStorageShutdownObserver interface {
AsBinder() binder.IBinder
OnShutDownComplete(ctx context.Context, statusCode int32) error
}
func NewStorageShutdownObserverStub ¶
func NewStorageShutdownObserverStub( impl IStorageShutdownObserverServer, ) IStorageShutdownObserver
NewStorageShutdownObserverStub creates a server-side IStorageShutdownObserver wrapping the given server implementation. The returned value satisfies IStorageShutdownObserver 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 IStorageShutdownObserverServer ¶
type IStorageShutdownObserverServer interface {
OnShutDownComplete(ctx context.Context, statusCode int32) error
}
IStorageShutdownObserverServer is the server-side interface that user implementations provide to NewStorageShutdownObserverStub. It contains only the business methods, without AsBinder (which is provided by the stub itself).
type ObbActionListenerProxy ¶
func NewObbActionListenerProxy ¶
func NewObbActionListenerProxy( remote binder.IBinder, ) *ObbActionListenerProxy
func (*ObbActionListenerProxy) AsBinder ¶
func (p *ObbActionListenerProxy) AsBinder() binder.IBinder
func (*ObbActionListenerProxy) OnObbResult ¶
type ObbActionListenerStub ¶
type ObbActionListenerStub struct {
Impl IObbActionListener
Transport binder.VersionAwareTransport
}
ObbActionListenerStub dispatches incoming binder transactions to a typed IObbActionListener implementation.
func (*ObbActionListenerStub) Descriptor ¶
func (s *ObbActionListenerStub) Descriptor() string
func (*ObbActionListenerStub) OnTransaction ¶
func (s *ObbActionListenerStub) OnTransaction( ctx context.Context, code binder.TransactionCode, _data *parcel.Parcel, ) (*parcel.Parcel, error)
type StorageEventListenerProxy ¶
func NewStorageEventListenerProxy ¶
func NewStorageEventListenerProxy( remote binder.IBinder, ) *StorageEventListenerProxy
func (*StorageEventListenerProxy) AsBinder ¶
func (p *StorageEventListenerProxy) AsBinder() binder.IBinder
func (*StorageEventListenerProxy) OnDiskDestroyed ¶
func (p *StorageEventListenerProxy) OnDiskDestroyed( ctx context.Context, disk DiskInfo, ) error
func (*StorageEventListenerProxy) OnDiskScanned ¶
func (*StorageEventListenerProxy) OnStorageStateChanged ¶
func (*StorageEventListenerProxy) OnUsbMassStorageConnectionChanged ¶
func (p *StorageEventListenerProxy) OnUsbMassStorageConnectionChanged( ctx context.Context, connected bool, ) error
func (*StorageEventListenerProxy) OnVolumeForgotten ¶
func (p *StorageEventListenerProxy) OnVolumeForgotten( ctx context.Context, fsUuid string, ) error
func (*StorageEventListenerProxy) OnVolumeRecordChanged ¶
func (p *StorageEventListenerProxy) OnVolumeRecordChanged( ctx context.Context, rec VolumeRecord, ) error
func (*StorageEventListenerProxy) OnVolumeStateChanged ¶
func (p *StorageEventListenerProxy) OnVolumeStateChanged( ctx context.Context, vol VolumeInfo, oldState int32, newState int32, ) error
type StorageEventListenerStub ¶
type StorageEventListenerStub struct {
Impl IStorageEventListener
Transport binder.VersionAwareTransport
}
StorageEventListenerStub dispatches incoming binder transactions to a typed IStorageEventListener implementation.
func (*StorageEventListenerStub) Descriptor ¶
func (s *StorageEventListenerStub) Descriptor() string
func (*StorageEventListenerStub) OnTransaction ¶
func (s *StorageEventListenerStub) OnTransaction( ctx context.Context, code binder.TransactionCode, _data *parcel.Parcel, ) (*parcel.Parcel, error)
type StorageManagerProxy ¶
func NewStorageManagerProxy ¶
func NewStorageManagerProxy( remote binder.IBinder, ) *StorageManagerProxy
func (*StorageManagerProxy) AbortChanges ¶
func (*StorageManagerProxy) AbortIdleMaintenance ¶
func (p *StorageManagerProxy) AbortIdleMaintenance( ctx context.Context, ) error
func (*StorageManagerProxy) AllocateBytes ¶
func (*StorageManagerProxy) AsBinder ¶
func (p *StorageManagerProxy) AsBinder() binder.IBinder
func (*StorageManagerProxy) CommitChanges ¶
func (p *StorageManagerProxy) CommitChanges( ctx context.Context, ) error
func (*StorageManagerProxy) CreateUserStorageKeys ¶
func (p *StorageManagerProxy) CreateUserStorageKeys( ctx context.Context, ephemeral bool, ) error
func (*StorageManagerProxy) DestroyUserStorage ¶
func (*StorageManagerProxy) DestroyUserStorageKeys ¶
func (p *StorageManagerProxy) DestroyUserStorageKeys( ctx context.Context, ) error
func (*StorageManagerProxy) DisableAppDataIsolation ¶
func (*StorageManagerProxy) FixupAppDir ¶
func (p *StorageManagerProxy) FixupAppDir( ctx context.Context, path string, ) error
func (*StorageManagerProxy) ForgetAllVolumes ¶
func (p *StorageManagerProxy) ForgetAllVolumes( ctx context.Context, ) error
func (*StorageManagerProxy) ForgetVolume ¶
func (p *StorageManagerProxy) ForgetVolume( ctx context.Context, fsUuid string, ) error
func (*StorageManagerProxy) Format ¶
func (p *StorageManagerProxy) Format( ctx context.Context, volId string, ) error
func (*StorageManagerProxy) GetAllocatableBytes ¶
func (*StorageManagerProxy) GetCacheQuotaBytes ¶
func (*StorageManagerProxy) GetCacheSizeBytes ¶
func (*StorageManagerProxy) GetCloudMediaProvider ¶
func (p *StorageManagerProxy) GetCloudMediaProvider( ctx context.Context, ) (string, error)
func (*StorageManagerProxy) GetDisks ¶
func (p *StorageManagerProxy) GetDisks( ctx context.Context, ) ([]DiskInfo, error)
func (*StorageManagerProxy) GetExternalStorageMountMode ¶
func (*StorageManagerProxy) GetInternalStorageBlockDeviceSize ¶
func (p *StorageManagerProxy) GetInternalStorageBlockDeviceSize( ctx context.Context, ) (int64, error)
func (*StorageManagerProxy) GetInternalStorageRemainingLifetime ¶
func (p *StorageManagerProxy) GetInternalStorageRemainingLifetime( ctx context.Context, ) (int32, error)
func (*StorageManagerProxy) GetManageSpaceActivityIntent ¶
func (p *StorageManagerProxy) GetManageSpaceActivityIntent( ctx context.Context, packageName string, requestCode int32, ) (appTypes.PendingIntent, error)
func (*StorageManagerProxy) GetMountedObbPath ¶
func (*StorageManagerProxy) GetPrimaryStorageUuid ¶
func (p *StorageManagerProxy) GetPrimaryStorageUuid( ctx context.Context, ) (string, error)
func (*StorageManagerProxy) GetVolumeList ¶
func (p *StorageManagerProxy) GetVolumeList( ctx context.Context, flags int32, ) ([]StorageVolume, error)
func (*StorageManagerProxy) GetVolumeRecords ¶
func (p *StorageManagerProxy) GetVolumeRecords( ctx context.Context, flags int32, ) ([]VolumeRecord, error)
func (*StorageManagerProxy) GetVolumes ¶
func (p *StorageManagerProxy) GetVolumes( ctx context.Context, flags int32, ) ([]VolumeInfo, error)
func (*StorageManagerProxy) IsAppIoBlocked ¶
func (*StorageManagerProxy) IsCeStorageUnlocked ¶
func (p *StorageManagerProxy) IsCeStorageUnlocked( ctx context.Context, ) (bool, error)
func (*StorageManagerProxy) IsObbMounted ¶
func (*StorageManagerProxy) LastMaintenance ¶
func (p *StorageManagerProxy) LastMaintenance( ctx context.Context, ) (int64, error)
func (*StorageManagerProxy) LockCeStorage ¶
func (p *StorageManagerProxy) LockCeStorage( ctx context.Context, ) error
func (*StorageManagerProxy) Mount ¶
func (p *StorageManagerProxy) Mount( ctx context.Context, volId string, ) error
func (*StorageManagerProxy) MountObb ¶
func (p *StorageManagerProxy) MountObb( ctx context.Context, rawPath string, canonicalPath string, token IObbActionListener, nonce int32, obbInfo res.ObbInfo, ) error
func (*StorageManagerProxy) MountProxyFileDescriptorBridge ¶
func (p *StorageManagerProxy) MountProxyFileDescriptorBridge( ctx context.Context, ) (os.AppFuseMount, error)
func (*StorageManagerProxy) NeedsCheckpoint ¶
func (p *StorageManagerProxy) NeedsCheckpoint( ctx context.Context, ) (bool, error)
func (*StorageManagerProxy) NotifyAppIoBlocked ¶
func (*StorageManagerProxy) NotifyAppIoResumed ¶
func (*StorageManagerProxy) OpenProxyFileDescriptor ¶
func (*StorageManagerProxy) PartitionMixed ¶
func (*StorageManagerProxy) PartitionPrivate ¶
func (p *StorageManagerProxy) PartitionPrivate( ctx context.Context, diskId string, ) error
func (*StorageManagerProxy) PartitionPublic ¶
func (p *StorageManagerProxy) PartitionPublic( ctx context.Context, diskId string, ) error
func (*StorageManagerProxy) PrepareUserStorage ¶
func (*StorageManagerProxy) RegisterListener ¶
func (p *StorageManagerProxy) RegisterListener( ctx context.Context, listener IStorageEventListener, ) error
func (*StorageManagerProxy) RunIdleMaintenance ¶
func (p *StorageManagerProxy) RunIdleMaintenance( ctx context.Context, ) error
func (*StorageManagerProxy) RunMaintenance ¶
func (p *StorageManagerProxy) RunMaintenance( ctx context.Context, ) error
func (*StorageManagerProxy) SetCeStorageProtection ¶
func (p *StorageManagerProxy) SetCeStorageProtection( ctx context.Context, secret []byte, ) error
func (*StorageManagerProxy) SetCloudMediaProvider ¶
func (p *StorageManagerProxy) SetCloudMediaProvider( ctx context.Context, authority string, ) error
func (*StorageManagerProxy) SetDebugFlags ¶
func (*StorageManagerProxy) SetPrimaryStorageUuid ¶
func (p *StorageManagerProxy) SetPrimaryStorageUuid( ctx context.Context, volumeUuid string, callback types.IPackageMoveObserver, ) error
func (*StorageManagerProxy) SetVolumeNickname ¶
func (*StorageManagerProxy) SetVolumeUserFlags ¶
func (*StorageManagerProxy) Shutdown ¶
func (p *StorageManagerProxy) Shutdown( ctx context.Context, observer IStorageShutdownObserver, ) error
func (*StorageManagerProxy) StartCheckpoint ¶
func (p *StorageManagerProxy) StartCheckpoint( ctx context.Context, numTries int32, ) error
func (*StorageManagerProxy) SupportsCheckpoint ¶
func (p *StorageManagerProxy) SupportsCheckpoint( ctx context.Context, ) (bool, error)
func (*StorageManagerProxy) UnlockCeStorage ¶
func (p *StorageManagerProxy) UnlockCeStorage( ctx context.Context, secret []byte, ) error
func (*StorageManagerProxy) Unmount ¶
func (p *StorageManagerProxy) Unmount( ctx context.Context, volId string, ) error
func (*StorageManagerProxy) UnmountObb ¶
func (p *StorageManagerProxy) UnmountObb( ctx context.Context, rawPath string, force bool, token IObbActionListener, nonce int32, ) error
func (*StorageManagerProxy) UnregisterListener ¶
func (p *StorageManagerProxy) UnregisterListener( ctx context.Context, listener IStorageEventListener, ) error
type StorageManagerStub ¶
type StorageManagerStub struct {
Impl IStorageManager
Transport binder.VersionAwareTransport
}
StorageManagerStub dispatches incoming binder transactions to a typed IStorageManager implementation.
func (*StorageManagerStub) Descriptor ¶
func (s *StorageManagerStub) Descriptor() string
func (*StorageManagerStub) OnTransaction ¶
func (s *StorageManagerStub) OnTransaction( ctx context.Context, code binder.TransactionCode, _data *parcel.Parcel, ) (*parcel.Parcel, error)
type StorageShutdownObserverProxy ¶
func NewStorageShutdownObserverProxy ¶
func NewStorageShutdownObserverProxy( remote binder.IBinder, ) *StorageShutdownObserverProxy
func (*StorageShutdownObserverProxy) AsBinder ¶
func (p *StorageShutdownObserverProxy) AsBinder() binder.IBinder
func (*StorageShutdownObserverProxy) OnShutDownComplete ¶
func (p *StorageShutdownObserverProxy) OnShutDownComplete( ctx context.Context, statusCode int32, ) error
type StorageShutdownObserverStub ¶
type StorageShutdownObserverStub struct {
Impl IStorageShutdownObserver
Transport binder.VersionAwareTransport
}
StorageShutdownObserverStub dispatches incoming binder transactions to a typed IStorageShutdownObserver implementation.
func (*StorageShutdownObserverStub) Descriptor ¶
func (s *StorageShutdownObserverStub) Descriptor() string
func (*StorageShutdownObserverStub) OnTransaction ¶
func (s *StorageShutdownObserverStub) OnTransaction( ctx context.Context, code binder.TransactionCode, _data *parcel.Parcel, ) (*parcel.Parcel, error)
type StorageVolume ¶
type StorageVolume struct {
Id string
Description string
MaxFileSize int64
FsUuid string
State string
}
func (*StorageVolume) MarshalParcel ¶
func (s *StorageVolume) MarshalParcel( p *parcel.Parcel, ) error
func (*StorageVolume) UnmarshalParcel ¶
func (s *StorageVolume) UnmarshalParcel( p *parcel.Parcel, ) error
type VolumeInfo ¶
type VolumeInfo struct {
Id string
Type int32
PartGuid string
MountFlags int32
MountUserId int32
State int32
FsType string
FsUuid string
FsLabel string
Path string
InternalPath string
}
func (*VolumeInfo) MarshalParcel ¶
func (s *VolumeInfo) MarshalParcel( p *parcel.Parcel, ) error
func (*VolumeInfo) UnmarshalParcel ¶
func (s *VolumeInfo) UnmarshalParcel( p *parcel.Parcel, ) error
type VolumeRecord ¶
type VolumeRecord struct {
Type int32
FsUuid string
PartGuid string
Nickname string
UserFlags int32
CreatedMillis int64
LastSeenMillis int64
LastTrimMillis int64
LastBenchMillis int64
}
func (*VolumeRecord) MarshalParcel ¶
func (s *VolumeRecord) MarshalParcel( p *parcel.Parcel, ) error
func (*VolumeRecord) UnmarshalParcel ¶
func (s *VolumeRecord) UnmarshalParcel( p *parcel.Parcel, ) error