storage

package
v0.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 16, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package storage provides Go bindings for Android Storage Manager.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AStorageManager_obbCallbackFunc

type AStorageManager_obbCallbackFunc = capi.AStorageManager_obbCallbackFunc

type Error

type Error int32

Error represents an NDK error code.

func (Error) Error

func (e Error) Error() string

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

Manager wraps the NDK AStorageManager handle.

func NewManager

func NewManager() *Manager

NewManager creates a new Manager.

func NewManagerFromPointer

func NewManagerFromPointer(ptr unsafe.Pointer) *Manager

NewManagerFromPointer wraps a raw AStorageManager pointer.

func (*Manager) Close

func (h *Manager) Close() error

Close releases the underlying NDK handle.

func (*Manager) IsObbMounted

func (h *Manager) IsObbMounted(filename string) int32

IsObbMounted returns the value directly.

func (*Manager) MountObb

func (h *Manager) MountObb(filename string, key string, cb AStorageManager_obbCallbackFunc, data unsafe.Pointer)

MountObb calls the underlying NDK function.

func (*Manager) MountedObbPath

func (h *Manager) MountedObbPath(filename string) string

MountedObbPath returns the value directly.

func (*Manager) Pointer

func (h *Manager) Pointer() unsafe.Pointer

Pointer returns the underlying pointer as unsafe.Pointer.

func (*Manager) UnmountObb

func (h *Manager) UnmountObb(filename string, force int32, cb AStorageManager_obbCallbackFunc, data unsafe.Pointer)

UnmountObb calls the underlying NDK function.

type OBB_STATE

type OBB_STATE int32
const (
	AOBB_STATE_MOUNTED                 OBB_STATE = 1
	AOBB_STATE_UNMOUNTED               OBB_STATE = 2
	AOBB_STATE_ERROR_INTERNAL          OBB_STATE = 20
	AOBB_STATE_ERROR_COULD_NOT_MOUNT   OBB_STATE = 21
	AOBB_STATE_ERROR_COULD_NOT_UNMOUNT OBB_STATE = 22
	AOBB_STATE_ERROR_NOT_MOUNTED       OBB_STATE = 23
	AOBB_STATE_ERROR_ALREADY_MOUNTED   OBB_STATE = 24
	AOBB_STATE_ERROR_PERMISSION_DENIED OBB_STATE = 25
)

Jump to

Keyboard shortcuts

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