backgroundassets

package
v0.19.0 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2026 License: MIT Imports: 16 Imported by: 0

Documentation

Rendered for darwin/amd64

Overview

Package backgroundassets provides a fluent Go API over the macOS BackgroundAssets framework.

Construction

New… functions create objects; each With… method sets one property and returns its receiver, so configuration calls chain. A <Type>FromID constructor adopts an Objective-C object obtained elsewhere.

Lifecycle

A wrapper releases its Objective-C object automatically once the garbage collector finds it unreachable. Call Release to relinquish the reference deterministically (for objects holding scarce resources); Release is idempotent, and afterwards the wrapper's methods are no-ops returning zero values.

Errors

Failing calls return errors carrying the Objective-C error domain and code. Match them against this package's Err… sentinel values with errors.Is, or inspect domain, code, and Apple's prose via errors.As with *errkit.Error.

Delegates

A …Delegate interface is implemented by a plain Go value and installed with the matching With… setter; the package builds the Objective-C delegate object behind the scenes. Optional protocol methods are separate one-method …Handler interfaces — implement the ones you need on the same value and the framework calls them too.

Types

Each base type below lists the concrete types you construct and pass where the base is accepted:

Index

Constants

This section is empty.

Variables

View Source
var ErrCodeAssetPackNotFound = errkit.New("BAManagedErrorDomain", 0)

ErrCodeAssetPackNotFound matches the BackgroundAssets error BAManagedErrorCodeAssetPackNotFound.

View Source
var ErrCodeCallFromExtensionNotAllowed = errkit.New("BAErrorDomain", 50)

ErrCodeCallFromExtensionNotAllowed matches the BackgroundAssets error BAErrorCodeCallFromExtensionNotAllowed.

View Source
var ErrCodeCallFromInactiveProcessNotAllowed = errkit.New("BAErrorDomain", 51)

ErrCodeCallFromInactiveProcessNotAllowed matches the BackgroundAssets error BAErrorCodeCallFromInactiveProcessNotAllowed.

View Source
var ErrCodeCallerConnectionInvalid = errkit.New("BAErrorDomain", 56)

ErrCodeCallerConnectionInvalid matches the BackgroundAssets error BAErrorCodeCallerConnectionInvalid.

View Source
var ErrCodeCallerConnectionNotAccepted = errkit.New("BAErrorDomain", 55)

ErrCodeCallerConnectionNotAccepted matches the BackgroundAssets error BAErrorCodeCallerConnectionNotAccepted.

View Source
var ErrCodeDownloadAlreadyFailed = errkit.New("BAErrorDomain", 103)

ErrCodeDownloadAlreadyFailed matches the BackgroundAssets error BAErrorCodeDownloadAlreadyFailed.

View Source
var ErrCodeDownloadAlreadyScheduled = errkit.New("BAErrorDomain", 100)

ErrCodeDownloadAlreadyScheduled matches the BackgroundAssets error BAErrorCodeDownloadAlreadyScheduled.

View Source
var ErrCodeDownloadBackgroundActivityProhibited = errkit.New("BAErrorDomain", 111)

ErrCodeDownloadBackgroundActivityProhibited matches the BackgroundAssets error BAErrorCodeDownloadBackgroundActivityProhibited.

View Source
var ErrCodeDownloadDoesNotExist = errkit.New("BAErrorDomain", 113)

ErrCodeDownloadDoesNotExist matches the BackgroundAssets error BAErrorCodeDownloadDoesNotExist.

View Source
var ErrCodeDownloadEssentialDownloadNotPermitted = errkit.New("BAErrorDomain", 109)

ErrCodeDownloadEssentialDownloadNotPermitted matches the BackgroundAssets error BAErrorCodeDownloadEssentialDownloadNotPermitted.

View Source
var ErrCodeDownloadFailedToStart = errkit.New("BAErrorDomain", 102)

ErrCodeDownloadFailedToStart matches the BackgroundAssets error BAErrorCodeDownloadFailedToStart.

View Source
var ErrCodeDownloadInvalid = errkit.New("BAErrorDomain", 0)

ErrCodeDownloadInvalid matches the BackgroundAssets error BAErrorCodeDownloadInvalid.

View Source
var ErrCodeDownloadNotScheduled = errkit.New("BAErrorDomain", 101)

ErrCodeDownloadNotScheduled matches the BackgroundAssets error BAErrorCodeDownloadNotScheduled.

View Source
var ErrCodeDownloadWouldExceedAllowance = errkit.New("BAErrorDomain", 112)

ErrCodeDownloadWouldExceedAllowance matches the BackgroundAssets error BAErrorCodeDownloadWouldExceedAllowance.

View Source
var ErrCodeFileNotFound = errkit.New("BAManagedErrorDomain", 1)

ErrCodeFileNotFound matches the BackgroundAssets error BAManagedErrorCodeFileNotFound.

View Source
var ErrCodeSessionDownloadAllowanceExceeded = errkit.New("BAErrorDomain", 204)

ErrCodeSessionDownloadAllowanceExceeded matches the BackgroundAssets error BAErrorCodeSessionDownloadAllowanceExceeded.

View Source
var ErrCodeSessionDownloadDisallowedByAllowance = errkit.New("BAErrorDomain", 203)

ErrCodeSessionDownloadDisallowedByAllowance matches the BackgroundAssets error BAErrorCodeSessionDownloadDisallowedByAllowance.

View Source
var ErrCodeSessionDownloadDisallowedByDomain = errkit.New("BAErrorDomain", 202)

ErrCodeSessionDownloadDisallowedByDomain matches the BackgroundAssets error BAErrorCodeSessionDownloadDisallowedByDomain.

View Source
var ErrCodeSessionDownloadNotPermittedBeforeAppLaunch = errkit.New("BAErrorDomain", 206)

ErrCodeSessionDownloadNotPermittedBeforeAppLaunch matches the BackgroundAssets error BAErrorCodeSessionDownloadNotPermittedBeforeAppLaunch.

Functions

func BAAssetPackIdentifierErrorKey

func BAAssetPackIdentifierErrorKey() uintptr

BAAssetPackIdentifierErrorKey returns the address of the symbol BAAssetPackIdentifierErrorKey.

func BADownloaderPriorityDefault

func BADownloaderPriorityDefault() int

BADownloaderPriorityDefault returns the value of the constant BADownloaderPriorityDefault.

func BADownloaderPriorityMax

func BADownloaderPriorityMax() int

BADownloaderPriorityMax returns the value of the constant BADownloaderPriorityMax.

func BADownloaderPriorityMin

func BADownloaderPriorityMin() int

BADownloaderPriorityMin returns the value of the constant BADownloaderPriorityMin.

func BAErrorDomain

func BAErrorDomain() obj.Object

BAErrorDomain returns the string constant BAErrorDomain, for use as a dictionary key or argument.

func BAManagedErrorDomain

func BAManagedErrorDomain() uintptr

BAManagedErrorDomain returns the address of the symbol BAManagedErrorDomain.

Types

type AppExtensionInfo added in v0.17.0

type AppExtensionInfo struct {
	objref.Handle
}

AppExtensionInfo is an idiomatic wrapper over the Objective-C class BAAppExtensionInfo.

func AppExtensionInfoFromID added in v0.17.0

func AppExtensionInfoFromID(id objc.ID) *AppExtensionInfo

AppExtensionInfoFromID adopts an existing Objective-C object as a AppExtensionInfo (nil for 0), retaining it and registering a release finalizer.

func NewAppExtensionInfo added in v0.17.0

func NewAppExtensionInfo() *AppExtensionInfo

NewAppExtensionInfo creates a new AppExtensionInfo.

func (*AppExtensionInfo) Description added in v0.17.0

func (aei *AppExtensionInfo) Description() string

Description returns the object's -description text.

func (*AppExtensionInfo) IsEqual added in v0.17.0

func (aei *AppExtensionInfo) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*AppExtensionInfo) IsKind added in v0.17.0

func (aei *AppExtensionInfo) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*AppExtensionInfo) RestrictedDownloadSizeRemaining added in v0.17.0

func (aei *AppExtensionInfo) RestrictedDownloadSizeRemaining() *foundation.Number

RestrictedDownloadSizeRemaining returns the number of bytes remaining that can be scheduled if the total download size is restricted. When a download is restricted, your extension can only schedule up to its `BADownloadAllowance` defined in your app's `Info.plist`. This result tells you the number of bytes remaining that can be scheduled before the application is launched. Once the application is launched, this restriction is removed.

func (*AppExtensionInfo) RestrictedEssentialDownloadSizeRemaining added in v0.17.0

func (aei *AppExtensionInfo) RestrictedEssentialDownloadSizeRemaining() *foundation.Number

RestrictedEssentialDownloadSizeRemaining returns the number of bytes remaining that can be scheduled if the total download size of optional assets is restricted. When a download is restricted, your extension can only schedule up to its `BAEssentialDownloadAllowance` defined in your app's `Info.plist`. This result tells you the number of bytes remaining that can be scheduled before the application is launched. Once the application is launched, this restriction is removed.

func (*AppExtensionInfo) String added in v0.17.0

func (aei *AppExtensionInfo) String() string

String returns the object's -description text, so a wrapper prints usefully under fmt.

type AssetPack added in v0.17.0

type AssetPack struct {
	objref.Handle
}

AssetPack is an idiomatic wrapper over the Objective-C class BAAssetPack.

An archive of assets that the system downloads together.

func AssetPackFromID added in v0.17.0

func AssetPackFromID(id objc.ID) *AssetPack

AssetPackFromID adopts an existing Objective-C object as a AssetPack (nil for 0), retaining it and registering a release finalizer.

func NewAssetPack added in v0.17.0

func NewAssetPack() *AssetPack

NewAssetPack creates a new AssetPack.

func (*AssetPack) Description added in v0.17.0

func (ap *AssetPack) Description() string

Description returns the object's -description text.

func (*AssetPack) Download added in v0.17.0

func (ap *AssetPack) Download() *Download

Download creates a download object for the asset pack that you schedule using a download manager.

func (*AssetPack) DownloadForContentRequest added in v0.17.0

func (ap *AssetPack) DownloadForContentRequest(contentRequest ContentRequest) *Download

DownloadForContentRequest creates a download object for the asset pack that you schedule using a download manager.

func (*AssetPack) DownloadSize added in v0.17.0

func (ap *AssetPack) DownloadSize() int

DownloadSize returns the size of the download file containing the asset pack in bytes. This is different than the installation size, which could be larger.

func (*AssetPack) Identifier added in v0.17.0

func (ap *AssetPack) Identifier() string

Identifier returns a unique identifier for the asset pack.

func (*AssetPack) IsEqual added in v0.17.0

func (ap *AssetPack) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*AssetPack) IsKind added in v0.17.0

func (ap *AssetPack) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*AssetPack) String added in v0.17.0

func (ap *AssetPack) String() string

String returns the object's -description text, so a wrapper prints usefully under fmt.

func (*AssetPack) UserInfo added in v0.17.0

func (ap *AssetPack) UserInfo() []byte

UserInfo returns JSON-encoded custom information that’s associated with the asset pack. This property is `nil` for Apple-hosted asset packs.

type AssetPackManager added in v0.17.0

type AssetPackManager struct {
	objref.Handle
}

AssetPackManager is an idiomatic wrapper over the Objective-C class BAAssetPackManager.

A class that manages asset packs.

func AssetPackManagerFromID added in v0.17.0

func AssetPackManagerFromID(id objc.ID) *AssetPackManager

AssetPackManagerFromID adopts an existing Objective-C object as a AssetPackManager (nil for 0), retaining it and registering a release finalizer.

func NewAssetPackManager added in v0.17.0

func NewAssetPackManager() *AssetPackManager

NewAssetPackManager creates a new AssetPackManager.

func SharedManager added in v0.17.0

func SharedManager() *AssetPackManager

SharedManager returns the shared asset-pack manager.

func (*AssetPackManager) AssetPackIsAvailableLocallyWithIdentifier added in v0.17.0

func (apm *AssetPackManager) AssetPackIsAvailableLocallyWithIdentifier(assetPackIdentifier string) bool

AssetPackIsAvailableLocallyWithIdentifier checks whether the asset pack with the specified identifier is available locally.

func (*AssetPackManager) CheckForUpdatesWithCompletionHandler added in v0.18.0

func (apm *AssetPackManager) CheckForUpdatesWithCompletionHandler(completionHandler func(obj.Object, obj.Object, unsafe.Pointer))

CheckForUpdatesWithCompletionHandler gets the latest asset-pack information from the server, updates outdated asset packs, and removes obsolete asset packs.

func (*AssetPackManager) Description added in v0.17.0

func (apm *AssetPackManager) Description() string

Description returns the object's -description text.

func (*AssetPackManager) EnsureLocalAvailabilityOfAssetPack added in v0.17.0

func (apm *AssetPackManager) EnsureLocalAvailabilityOfAssetPack(ctx context.Context, assetPack *AssetPack) error

EnsureLocalAvailabilityOfAssetPack ensures that the specified asset pack be available locally.

EnsureLocalAvailabilityOfAssetPack blocks until the operation completes or ctx is cancelled.

func (*AssetPackManager) EnsureLocalAvailabilityOfAssetPackRequireLatestVersion added in v0.17.0

func (apm *AssetPackManager) EnsureLocalAvailabilityOfAssetPackRequireLatestVersion(ctx context.Context, assetPack *AssetPack, shouldUpdate bool) error

EnsureLocalAvailabilityOfAssetPackRequireLatestVersion ensures that the specified asset pack is available locally, performing a download if necessary.

EnsureLocalAvailabilityOfAssetPackRequireLatestVersion blocks until the operation completes or ctx is cancelled.

func (*AssetPackManager) FileDescriptorForPathSearchingInAssetPackWithIdentifier added in v0.17.0

func (apm *AssetPackManager) FileDescriptorForPathSearchingInAssetPackWithIdentifier(path string, assetPackIdentifier string) (result int, err error)

FileDescriptorForPathSearchingInAssetPackWithIdentifier opens and returns a file descriptor for the asset file at the specified relative path.

func (*AssetPackManager) GetAllAssetPacks added in v0.17.0

func (apm *AssetPackManager) GetAllAssetPacks(ctx context.Context) (result obj.Object, err error)

GetAllAssetPacks gets the asset packs that are available to download.

GetAllAssetPacks blocks until the operation completes or ctx is cancelled.

func (*AssetPackManager) GetAssetPackWithIdentifier added in v0.17.0

func (apm *AssetPackManager) GetAssetPackWithIdentifier(ctx context.Context, assetPackIdentifier string) (result *AssetPack, err error)

GetAssetPackWithIdentifier gets the asset pack with the given identifier.

GetAssetPackWithIdentifier blocks until the operation completes or ctx is cancelled.

func (*AssetPackManager) GetLocalStatusOfAssetPackWithIdentifierCompletionHandler added in v0.18.0

func (apm *AssetPackManager) GetLocalStatusOfAssetPackWithIdentifierCompletionHandler(assetPackIdentifier string, completionHandler func(AssetPackStatus))

GetLocalStatusOfAssetPackWithIdentifierCompletionHandler gets an asset pack’s local status.

func (*AssetPackManager) GetStatusOfAssetPackWithIdentifierCompletionHandler added in v0.18.0

func (apm *AssetPackManager) GetStatusOfAssetPackWithIdentifierCompletionHandler(assetPackIdentifier string, completionHandler func(AssetPackStatus, unsafe.Pointer))

GetStatusOfAssetPackWithIdentifierCompletionHandler gets an asset pack’s status.

func (*AssetPackManager) GetStatusRelativeToAssetPackCompletionHandler added in v0.18.0

func (apm *AssetPackManager) GetStatusRelativeToAssetPackCompletionHandler(assetPack *AssetPack, completionHandler func(AssetPackStatus, unsafe.Pointer))

GetStatusRelativeToAssetPackCompletionHandler gets the current status relative to a particular asset pack.

func (*AssetPackManager) IsEqual added in v0.17.0

func (apm *AssetPackManager) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*AssetPackManager) IsKind added in v0.17.0

func (apm *AssetPackManager) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*AssetPackManager) RemoveAssetPackWithIdentifier added in v0.17.0

func (apm *AssetPackManager) RemoveAssetPackWithIdentifier(ctx context.Context, assetPackIdentifier string) error

RemoveAssetPackWithIdentifier removes the specified asset pack from the device.

RemoveAssetPackWithIdentifier blocks until the operation completes or ctx is cancelled.

func (*AssetPackManager) String added in v0.17.0

func (apm *AssetPackManager) String() string

String returns the object's -description text, so a wrapper prints usefully under fmt.

func (*AssetPackManager) URLForPath added in v0.17.0

func (apm *AssetPackManager) URLForPath(path string) (result string, err error)

URLForPath returns a URL for the specified relative path.

func (*AssetPackManager) WithDelegate added in v0.17.0

WithDelegate sets an object that receives notifications about events that occur as an asset pack is downloaded.

type AssetPackManifest added in v0.17.0

type AssetPackManifest struct {
	objref.Handle
}

AssetPackManifest is an idiomatic wrapper over the Objective-C class BAAssetPackManifest.

A manifest of asset packs that are available to download.

func AssetPackManifestFromID added in v0.17.0

func AssetPackManifestFromID(id objc.ID) *AssetPackManifest

AssetPackManifestFromID adopts an existing Objective-C object as a AssetPackManifest (nil for 0), retaining it and registering a release finalizer.

func NewAssetPackManifestFromDataApplicationGroupIdentifier added in v0.17.0

func NewAssetPackManifestFromDataApplicationGroupIdentifier(data []byte, applicationGroupIdentifier string) (result *AssetPackManifest, err error)

NewAssetPackManifestFromDataApplicationGroupIdentifier initializes a representation of a manifest in memory from JSON-encoded data.

func NewAssetPackManifestWithContentsOfURLApplicationGroupIdentifier added in v0.17.0

func NewAssetPackManifestWithContentsOfURLApplicationGroupIdentifier(url string, applicationGroupIdentifier string) (result *AssetPackManifest, err error)

NewAssetPackManifestWithContentsOfURLApplicationGroupIdentifier initializes a representation of a manifest in memory given a URL to the manifest’s representation as a JSON file on disk.

func (*AssetPackManifest) AllDownloads added in v0.17.0

func (apm *AssetPackManifest) AllDownloads() []*Download

AllDownloads creates download objects for every asset pack in this manifest. The order of the returned elements is unspecified.

func (*AssetPackManifest) AllDownloadsForContentRequest added in v0.17.0

func (apm *AssetPackManifest) AllDownloadsForContentRequest(contentRequest ContentRequest) []*Download

AllDownloadsForContentRequest creates download objects for every asset pack in this manifest. The order of the returned elements is unspecified.

func (*AssetPackManifest) AssetPacks added in v0.17.0

func (apm *AssetPackManifest) AssetPacks() []*AssetPack

AssetPacks returns the asset packs that are available to download. The order of the returned elements is unspecified.

func (*AssetPackManifest) Description added in v0.17.0

func (apm *AssetPackManifest) Description() string

Description returns the object's -description text.

func (*AssetPackManifest) IsEqual added in v0.17.0

func (apm *AssetPackManifest) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*AssetPackManifest) IsKind added in v0.17.0

func (apm *AssetPackManifest) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*AssetPackManifest) String added in v0.17.0

func (apm *AssetPackManifest) String() string

String returns the object's -description text, so a wrapper prints usefully under fmt.

type AssetPackStatus added in v0.17.0

type AssetPackStatus uint64

The status of an asset pack. Bitmask — values may be combined with |.

const (
	// A status value that indicates that the asset pack is available to download.
	AssetPackStatusDownloadAvailable AssetPackStatus = 1
	// A status value that indicates that an update to the asset pack is available to download.
	AssetPackStatusUpdateAvailable AssetPackStatus = 2
	// A status value that indicates that the downloaded asset pack is up to date.
	AssetPackStatusUpToDate AssetPackStatus = 4
	// A status value that indicates that the downloaded asset pack is out of date.
	AssetPackStatusOutOfDate AssetPackStatus = 8
	// A status value that indicates that the asset pack is no longer available to download.
	AssetPackStatusObsolete AssetPackStatus = 16
	// A status value that indicates that the system is currently downloading the asset pack.
	AssetPackStatusDownloading AssetPackStatus = 32
	// A status value that indicates that the system finished downloading the asset pack.
	AssetPackStatusDownloaded AssetPackStatus = 64
)

func (AssetPackStatus) String added in v0.17.0

func (e AssetPackStatus) String() string

String returns the AssetPackStatus constant's name, or its numeric form when the value is not a known constant.

type Clockid added in v0.17.0

type Clockid int32
const (
	ClockidRealtime           Clockid = 0
	ClockidMonotonic          Clockid = 6
	ClockidMonotonicRaw       Clockid = 4
	ClockidMonotonicRawApprox Clockid = 5
	ClockidUptimeRaw          Clockid = 8
	ClockidUptimeRawApprox    Clockid = 9
	ClockidProcessCputimeID   Clockid = 12
	ClockidThreadCputimeID    Clockid = 16
)

func (Clockid) String added in v0.17.0

func (e Clockid) String() string

String returns the Clockid constant's name, or its numeric form when the value is not a known constant.

type ContentRequest added in v0.17.0

type ContentRequest int64

The content request type used in the downloader extension.

const (
	// A content request resulting from the installation of the app.
	ContentRequestInstall ContentRequest = 1
	// A content request resulting from an update of the app.
	ContentRequestUpdate ContentRequest = 2
	// A content request resulting from a system request for updated content within the app.
	ContentRequestPeriodic ContentRequest = 3
)

func (ContentRequest) String added in v0.17.0

func (e ContentRequest) String() string

String returns the ContentRequest constant's name, or its numeric form when the value is not a known constant.

type DispatchAutoreleaseFrequency added in v0.17.0

type DispatchAutoreleaseFrequency uint64
const (
	DispatchAutoreleaseFrequencyInherit  DispatchAutoreleaseFrequency = 0
	DispatchAutoreleaseFrequencyWorkItem DispatchAutoreleaseFrequency = 1
	DispatchAutoreleaseFrequencyNever    DispatchAutoreleaseFrequency = 2
)

func (DispatchAutoreleaseFrequency) String added in v0.17.0

String returns the DispatchAutoreleaseFrequency constant's name, or its numeric form when the value is not a known constant.

type DispatchBlockFlags added in v0.17.0

type DispatchBlockFlags uint64

Bitmask — values may be combined with |.

const (
	DispatchBlockFlagsBarrier         DispatchBlockFlags = 1
	DispatchBlockFlagsDetached        DispatchBlockFlags = 2
	DispatchBlockFlagsAssignCurrent   DispatchBlockFlags = 4
	DispatchBlockFlagsNoQosClass      DispatchBlockFlags = 8
	DispatchBlockFlagsInheritQosClass DispatchBlockFlags = 16
	DispatchBlockFlagsEnforceQosClass DispatchBlockFlags = 32
)

func (DispatchBlockFlags) String added in v0.17.0

func (e DispatchBlockFlags) String() string

String returns the DispatchBlockFlags constant's name, or its numeric form when the value is not a known constant.

type Download added in v0.17.0

type Download struct {
	objref.Handle
}

Download is an idiomatic wrapper over the Objective-C class BADownload.

Download is an abstract base — you do not construct it directly. Construct one of URLDownload and pass it where a Download is accepted.

An object that represents an in-progress or concluded asset download.

func DownloadFromID added in v0.17.0

func DownloadFromID(id objc.ID) *Download

DownloadFromID adopts an existing Objective-C object as a Download (nil for 0), retaining it and registering a release finalizer.

func (*Download) CopyAsNonEssential added in v0.17.0

func (d *Download) CopyAsNonEssential() *Download

CopyAsNonEssential returns copies an existing download ensuring that it has `isEssential == false`. This serves as a convenience method for constructing a non-essential representation of an existing download. It is important to note that essential downloads can only be enqueued by the app extension during a content request. If an essential download fails, `copyAsNonEssential` can be used to create a copy with `isEssential == false` that can be re-queued with `BADownloadManager`.

func (*Download) Description added in v0.17.0

func (d *Download) Description() string

Description returns the object's -description text.

func (*Download) Identifier added in v0.17.0

func (d *Download) Identifier() string

Identifier returns a client defined identifier that uniquely identifies this asset.

func (*Download) IsEqual added in v0.17.0

func (d *Download) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*Download) IsEssential added in v0.17.0

func (d *Download) IsEssential() bool

IsEssential reports whether this download is essential. Essential downloads will occur while the app is being installed. Users cannot launch the app while these downloads are occurring. Essential downloads cannot be scheduled with `BADownloadManager`, they may only be scheduled from the extension with a `BAContentRequest` type of `Update` or `Install`. Essential downloads must have an accurate `fileSize` or they will fail.

func (*Download) IsKind added in v0.17.0

func (d *Download) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*Download) Priority added in v0.17.0

func (d *Download) Priority() int

Priority returns a client set priority to try to order downloads in order of importance

func (*Download) State added in v0.17.0

func (d *Download) State() DownloadState

State returns the current state of the respresented download.

func (*Download) String added in v0.17.0

func (d *Download) String() string

String returns the object's -description text, so a wrapper prints usefully under fmt.

func (*Download) UniqueIdentifier added in v0.17.0

func (d *Download) UniqueIdentifier() string

UniqueIdentifier returns a UUID that uniquely identifies the download object.

type DownloadManager added in v0.17.0

type DownloadManager struct {
	objref.Handle
}

DownloadManager is an idiomatic wrapper over the Objective-C class BADownloadManager.

An object that manages the queue of scheduled asset downloads.

func BADownloadManagerSharedManager

func BADownloadManagerSharedManager() *DownloadManager

BADownloadManagerSharedManager gets the singleton downloader object.

func DownloadManagerFromID added in v0.17.0

func DownloadManagerFromID(id objc.ID) *DownloadManager

DownloadManagerFromID adopts an existing Objective-C object as a DownloadManager (nil for 0), retaining it and registering a release finalizer.

func NewDownloadManager added in v0.17.0

func NewDownloadManager() *DownloadManager

NewDownloadManager creates a new DownloadManager.

func (*DownloadManager) CancelDownload added in v0.17.0

func (dm *DownloadManager) CancelDownload(download *Download) error

CancelDownload cancels an asset download.

func (*DownloadManager) Description added in v0.17.0

func (dm *DownloadManager) Description() string

Description returns the object's -description text.

func (*DownloadManager) FetchCurrentDownloads added in v0.17.0

func (dm *DownloadManager) FetchCurrentDownloads() (result []*Download, err error)

FetchCurrentDownloads returns fetches current downloads. Fetches the current list of scheduled or in-flight downloads queued by your application or extension.

FetchCurrentDownloads returns the collection as a Go slice.

func (*DownloadManager) IsEqual added in v0.17.0

func (dm *DownloadManager) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*DownloadManager) IsKind added in v0.17.0

func (dm *DownloadManager) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*DownloadManager) PerformWithExclusiveControl added in v0.18.0

func (dm *DownloadManager) PerformWithExclusiveControl(performHandler func(bool, unsafe.Pointer))

PerformWithExclusiveControl attempts to acquire immediate, exclusive access to the download manager.

func (*DownloadManager) PerformWithExclusiveControlBeforeDatePerformHandler added in v0.18.0

func (dm *DownloadManager) PerformWithExclusiveControlBeforeDatePerformHandler(date time.Time, performHandler func(bool, unsafe.Pointer))

PerformWithExclusiveControlBeforeDatePerformHandler acquires exclusive access to the BADownloadManager across the app and application extension. Acquires exclusive access to the BADownloadManager across the app and application extension. This ensures that your extension and app do not perform operations at the same time. Both the extension and app must use this API to ensure exclusive access.

func (*DownloadManager) ScheduleDownload added in v0.17.0

func (dm *DownloadManager) ScheduleDownload(download *Download) error

ScheduleDownload schedules an asset download to execute in the background at a nonspecific time in the future.

func (*DownloadManager) StartForegroundDownload added in v0.17.0

func (dm *DownloadManager) StartForegroundDownload(download *Download) error

StartForegroundDownload schedules an asset download that executes immediately in the foreground.

func (*DownloadManager) String added in v0.17.0

func (dm *DownloadManager) String() string

String returns the object's -description text, so a wrapper prints usefully under fmt.

func (*DownloadManager) WithDelegate added in v0.17.0

func (dm *DownloadManager) WithDelegate(delegate DownloadManagerDelegate) *DownloadManager

WithDelegate sets the download manager’s delegate.

type DownloadManagerDelegate added in v0.17.0

type DownloadManagerDelegate interface {
}

DownloadManagerDelegate receives the callbacks of the Objective-C protocol BADownloadManagerDelegate. Pass an implementation to the matching With… setter; the wrapper builds the Objective-C delegate object for you. Every method listed here is required. The protocol's optional methods are separate one-method interfaces (DownloadManagerDelegate…Handler): implement the ones you need on the same value and the framework will call them too.

type DownloadManagerDelegateDownloadDidBeginHandler added in v0.17.0

type DownloadManagerDelegateDownloadDidBeginHandler interface {
	DownloadDidBegin(download *Download)
}

DownloadManagerDelegateDownloadDidBeginHandler is the optional BADownloadManagerDelegate method downloadDidBegin:. Implement it on a DownloadManagerDelegate value to receive that callback; a value without it is simply never sent one.

type DownloadManagerDelegateDownloadDidPauseHandler added in v0.17.0

type DownloadManagerDelegateDownloadDidPauseHandler interface {
	DownloadDidPause(download *Download)
}

DownloadManagerDelegateDownloadDidPauseHandler is the optional BADownloadManagerDelegate method downloadDidPause:. Implement it on a DownloadManagerDelegate value to receive that callback; a value without it is simply never sent one.

type DownloadManagerDelegateDownloadDidWriteBytesTotalBytesWrittenTotalBytesExpectedToWriteHandler added in v0.17.0

type DownloadManagerDelegateDownloadDidWriteBytesTotalBytesWrittenTotalBytesExpectedToWriteHandler interface {
	DownloadDidWriteBytesTotalBytesWrittenTotalBytesExpectedToWrite(download *Download, bytesWritten int64, totalBytesWritten int64, totalExpectedBytes int64)
}

DownloadManagerDelegateDownloadDidWriteBytesTotalBytesWrittenTotalBytesExpectedToWriteHandler is the optional BADownloadManagerDelegate method download:didWriteBytes:totalBytesWritten:totalBytesExpectedToWrite:. Implement it on a DownloadManagerDelegate value to receive that callback; a value without it is simply never sent one.

type DownloadManagerDelegateDownloadFailedWithErrorHandler added in v0.17.0

type DownloadManagerDelegateDownloadFailedWithErrorHandler interface {
	DownloadFailedWithError(download *Download, err error)
}

DownloadManagerDelegateDownloadFailedWithErrorHandler is the optional BADownloadManagerDelegate method download:failedWithError:. Implement it on a DownloadManagerDelegate value to receive that callback; a value without it is simply never sent one.

type DownloadManagerDelegateDownloadFinishedWithFileURLHandler added in v0.17.0

type DownloadManagerDelegateDownloadFinishedWithFileURLHandler interface {
	DownloadFinishedWithFileURL(download *Download, fileURL string)
}

DownloadManagerDelegateDownloadFinishedWithFileURLHandler is the optional BADownloadManagerDelegate method download:finishedWithFileURL:. Implement it on a DownloadManagerDelegate value to receive that callback; a value without it is simply never sent one.

type DownloadProvider added in v0.17.0

type DownloadProvider interface {
	objref.Object
	// contains filtered or unexported methods
}

DownloadProvider is accepted wherever a BADownload (or one of its subclasses) is expected.

type DownloadState added in v0.17.0

type DownloadState int64

Constants that indicate the state of a download.

const (
	DownloadStateFailed      DownloadState = -1
	DownloadStateCreated     DownloadState = 0
	DownloadStateWaiting     DownloadState = 1
	DownloadStateDownloading DownloadState = 2
	DownloadStateFinished    DownloadState = 3
)

func (DownloadState) String added in v0.17.0

func (e DownloadState) String() string

String returns the DownloadState constant's name, or its numeric form when the value is not a known constant.

type DownloaderExtension added in v0.17.0

type DownloaderExtension interface {
}

DownloaderExtension is the Go form of the Objective-C protocol BADownloaderExtension.

type EntryID added in v0.17.0

type EntryID int32
const (
	EntryIDFirstEntry EntryID = 0
	EntryIDNextEntry  EntryID = -1
	EntryIDLastEntry  EntryID = -2
)

func (EntryID) String added in v0.17.0

func (e EntryID) String() string

String returns the EntryID constant's name, or its numeric form when the value is not a known constant.

type ErrorCode added in v0.17.0

type ErrorCode int64
const (
	ErrorCodeDownloadInvalid                            ErrorCode = 0
	ErrorCodeCallFromExtensionNotAllowed                ErrorCode = 50
	ErrorCodeCallFromInactiveProcessNotAllowed          ErrorCode = 51
	ErrorCodeCallerConnectionNotAccepted                ErrorCode = 55
	ErrorCodeCallerConnectionInvalid                    ErrorCode = 56
	ErrorCodeDownloadAlreadyScheduled                   ErrorCode = 100
	ErrorCodeDownloadNotScheduled                       ErrorCode = 101
	ErrorCodeDownloadFailedToStart                      ErrorCode = 102
	ErrorCodeDownloadAlreadyFailed                      ErrorCode = 103
	ErrorCodeDownloadEssentialDownloadNotPermitted      ErrorCode = 109
	ErrorCodeDownloadBackgroundActivityProhibited       ErrorCode = 111
	ErrorCodeDownloadWouldExceedAllowance               ErrorCode = 112
	ErrorCodeDownloadDoesNotExist                       ErrorCode = 113
	ErrorCodeSessionDownloadDisallowedByDomain          ErrorCode = 202
	ErrorCodeSessionDownloadDisallowedByAllowance       ErrorCode = 203
	ErrorCodeSessionDownloadAllowanceExceeded           ErrorCode = 204
	ErrorCodeSessionDownloadNotPermittedBeforeAppLaunch ErrorCode = 206
)

func (ErrorCode) String added in v0.17.0

func (e ErrorCode) String() string

String returns the ErrorCode constant's name, or its numeric form when the value is not a known constant.

type FilesecProperty added in v0.17.0

type FilesecProperty int32
const (
	FilesecPropertyOwner        FilesecProperty = 1
	FilesecPropertyGroup        FilesecProperty = 2
	FilesecPropertyUUID         FilesecProperty = 3
	FilesecPropertyMode         FilesecProperty = 4
	FilesecPropertyACL          FilesecProperty = 5
	FilesecPropertyGrpuuid      FilesecProperty = 6
	FilesecPropertyACLRaw       FilesecProperty = 100
	FilesecPropertyACLAllocsize FilesecProperty = 101
)

func (FilesecProperty) String added in v0.17.0

func (e FilesecProperty) String() string

String returns the FilesecProperty constant's name, or its numeric form when the value is not a known constant.

type Flag added in v0.17.0

type Flag int32
const (
	FlagFlagDeferInherit      Flag = 1
	FlagFlagNoInherit         Flag = 131072
	FlagEntryInherited        Flag = 16
	FlagEntryFileInherit      Flag = 32
	FlagEntryDirectoryInherit Flag = 64
	FlagEntryLimitInherit     Flag = 128
	FlagEntryOnlyInherit      Flag = 256
)

func (Flag) String added in v0.17.0

func (e Flag) String() string

String returns the Flag constant's name, or its numeric form when the value is not a known constant.

type Idtype added in v0.17.0

type Idtype int32
const (
	IdtypeAll  Idtype = 0
	IdtypePid  Idtype = 1
	IdtypePgid Idtype = 2
)

func (Idtype) String added in v0.17.0

func (e Idtype) String() string

String returns the Idtype constant's name, or its numeric form when the value is not a known constant.

type IpcInfoObjectType added in v0.17.0

type IpcInfoObjectType uint32
const (
	IpcInfoObjectTypeNone               IpcInfoObjectType = 0
	IpcInfoObjectTypeThreadControl      IpcInfoObjectType = 1
	IpcInfoObjectTypeTaskControl        IpcInfoObjectType = 2
	IpcInfoObjectTypeHost               IpcInfoObjectType = 3
	IpcInfoObjectTypeHostPriv           IpcInfoObjectType = 4
	IpcInfoObjectTypeProcessor          IpcInfoObjectType = 5
	IpcInfoObjectTypeProcessorSet       IpcInfoObjectType = 6
	IpcInfoObjectTypeProcessorSetName   IpcInfoObjectType = 7
	IpcInfoObjectTypeTimer              IpcInfoObjectType = 8
	IpcInfoObjectTypePortSubstOnce      IpcInfoObjectType = 9
	IpcInfoObjectTypeMig                IpcInfoObjectType = 10
	IpcInfoObjectTypeMemoryObject       IpcInfoObjectType = 11
	IpcInfoObjectTypeXmmPager           IpcInfoObjectType = 12
	IpcInfoObjectTypeXmmKernel          IpcInfoObjectType = 13
	IpcInfoObjectTypeXmmReply           IpcInfoObjectType = 14
	IpcInfoObjectTypeUndReply           IpcInfoObjectType = 15
	IpcInfoObjectTypeHostNotify         IpcInfoObjectType = 16
	IpcInfoObjectTypeHostSecurity       IpcInfoObjectType = 17
	IpcInfoObjectTypeLedger             IpcInfoObjectType = 18
	IpcInfoObjectTypeMainDevice         IpcInfoObjectType = 19
	IpcInfoObjectTypeTaskName           IpcInfoObjectType = 20
	IpcInfoObjectTypeSubsystem          IpcInfoObjectType = 21
	IpcInfoObjectTypeIODoneQueue        IpcInfoObjectType = 22
	IpcInfoObjectTypeSemaphore          IpcInfoObjectType = 23
	IpcInfoObjectTypeLockSet            IpcInfoObjectType = 24
	IpcInfoObjectTypeClock              IpcInfoObjectType = 25
	IpcInfoObjectTypeClockCtrl          IpcInfoObjectType = 26
	IpcInfoObjectTypeIokitIdent         IpcInfoObjectType = 27
	IpcInfoObjectTypeNamedEntry         IpcInfoObjectType = 28
	IpcInfoObjectTypeIokitConnect       IpcInfoObjectType = 29
	IpcInfoObjectTypeIokitObject        IpcInfoObjectType = 30
	IpcInfoObjectTypeUpl                IpcInfoObjectType = 31
	IpcInfoObjectTypeMemObjControl      IpcInfoObjectType = 32
	IpcInfoObjectTypeAuSessionport      IpcInfoObjectType = 33
	IpcInfoObjectTypeFileport           IpcInfoObjectType = 34
	IpcInfoObjectTypeLabelh             IpcInfoObjectType = 35
	IpcInfoObjectTypeTaskResume         IpcInfoObjectType = 36
	IpcInfoObjectTypeVoucher            IpcInfoObjectType = 37
	IpcInfoObjectTypeVoucherAttrControl IpcInfoObjectType = 38
	IpcInfoObjectTypeWorkInterval       IpcInfoObjectType = 39
	IpcInfoObjectTypeUxHandler          IpcInfoObjectType = 40
	IpcInfoObjectTypeUextObject         IpcInfoObjectType = 41
	IpcInfoObjectTypeArcadeReg          IpcInfoObjectType = 42
	IpcInfoObjectTypeEventlink          IpcInfoObjectType = 43
	IpcInfoObjectTypeTaskInspect        IpcInfoObjectType = 44
	IpcInfoObjectTypeTaskRead           IpcInfoObjectType = 45
	IpcInfoObjectTypeThreadInspect      IpcInfoObjectType = 46
	IpcInfoObjectTypeThreadRead         IpcInfoObjectType = 47
	IpcInfoObjectTypeSuidCred           IpcInfoObjectType = 48
	IpcInfoObjectTypeHypervisor         IpcInfoObjectType = 49
	IpcInfoObjectTypeTaskIDToken        IpcInfoObjectType = 50
	IpcInfoObjectTypeTaskFatal          IpcInfoObjectType = 51
	IpcInfoObjectTypeKcdata             IpcInfoObjectType = 52
	IpcInfoObjectTypeExclavesResource   IpcInfoObjectType = 53
	IpcInfoObjectTypeThreadResume       IpcInfoObjectType = 54
	IpcInfoObjectTypeUnknown            IpcInfoObjectType = 4294967295
)

func (IpcInfoObjectType) String added in v0.17.0

func (e IpcInfoObjectType) String() string

String returns the IpcInfoObjectType constant's name, or its numeric form when the value is not a known constant.

type LaunchDataType added in v0.17.0

type LaunchDataType int32
const (
	LaunchDataTypeDictionary LaunchDataType = 1
	LaunchDataTypeArray      LaunchDataType = 2
	LaunchDataTypeFd         LaunchDataType = 3
	LaunchDataTypeInteger    LaunchDataType = 4
	LaunchDataTypeReal       LaunchDataType = 5
	LaunchDataTypeBool       LaunchDataType = 6
	LaunchDataTypeString     LaunchDataType = 7
	LaunchDataTypeOpaque     LaunchDataType = 8
	LaunchDataTypeErrno      LaunchDataType = 9
	LaunchDataTypeMachport   LaunchDataType = 10
)

func (LaunchDataType) String added in v0.17.0

func (e LaunchDataType) String() string

String returns the LaunchDataType constant's name, or its numeric form when the value is not a known constant.

type MDLabelDomain

type MDLabelDomain int32

These constants are used to specify a domain to MDLabelCreate().

const (
	KMDLabelUserDomain  MDLabelDomain = 0
	KMDLabelLocalDomain MDLabelDomain = 1
)

func (MDLabelDomain) String

func (e MDLabelDomain) String() string

String returns the MDLabelDomain constant's name, or its numeric form when the value is not a known constant.

type MDQueryOptionFlags

type MDQueryOptionFlags int32
const (
	KMDQuerySynchronous        MDQueryOptionFlags = 1
	KMDQueryWantsUpdates       MDQueryOptionFlags = 4
	KMDQueryAllowFSTranslation MDQueryOptionFlags = 8
)

func (MDQueryOptionFlags) String

func (e MDQueryOptionFlags) String() string

String returns the MDQueryOptionFlags constant's name, or its numeric form when the value is not a known constant.

type MDQuerySortOptionFlags

type MDQuerySortOptionFlags int32
const (
	KMDQueryReverseSortOrderFlag MDQuerySortOptionFlags = 1
)

func (MDQuerySortOptionFlags) String

func (e MDQuerySortOptionFlags) String() string

String returns the MDQuerySortOptionFlags constant's name, or its numeric form when the value is not a known constant.

type MachVMRangeFlags added in v0.17.0

type MachVMRangeFlags uint64

Bitmask — values may be combined with |.

const (
	MachVMRangeFlagsNone MachVMRangeFlags = 0
)

func (MachVMRangeFlags) String added in v0.17.0

func (e MachVMRangeFlags) String() string

String returns the MachVMRangeFlags constant's name, or its numeric form when the value is not a known constant.

type MachVMRangeFlavor added in v0.17.0

type MachVMRangeFlavor uint32
const (
	MachVMRangeFlavorInvalid MachVMRangeFlavor = 0
	MachVMRangeFlavorV1      MachVMRangeFlavor = 1
)

func (MachVMRangeFlavor) String added in v0.17.0

func (e MachVMRangeFlavor) String() string

String returns the MachVMRangeFlavor constant's name, or its numeric form when the value is not a known constant.

type MachVMRangeTag added in v0.17.0

type MachVMRangeTag uint16
const (
	MachVMRangeTagDefault MachVMRangeTag = 0
	MachVMRangeTagData    MachVMRangeTag = 1
	MachVMRangeTagFixed   MachVMRangeTag = 2
)

func (MachVMRangeTag) String added in v0.17.0

func (e MachVMRangeTag) String() string

String returns the MachVMRangeTag constant's name, or its numeric form when the value is not a known constant.

type ManagedAssetPackDownloadDelegate added in v0.17.0

type ManagedAssetPackDownloadDelegate interface {
}

ManagedAssetPackDownloadDelegate receives the callbacks of the Objective-C protocol BAManagedAssetPackDownloadDelegate. Pass an implementation to the matching With… setter; the wrapper builds the Objective-C delegate object for you. Every method listed here is required. The protocol's optional methods are separate one-method interfaces (ManagedAssetPackDownloadDelegate…Handler): implement the ones you need on the same value and the framework will call them too.

type ManagedAssetPackDownloadDelegateDownloadOfAssetPackBeganHandler added in v0.17.0

type ManagedAssetPackDownloadDelegateDownloadOfAssetPackBeganHandler interface {
	DownloadOfAssetPackBegan(assetPack *AssetPack)
}

ManagedAssetPackDownloadDelegateDownloadOfAssetPackBeganHandler is the optional BAManagedAssetPackDownloadDelegate method downloadOfAssetPackBegan:. Implement it on a ManagedAssetPackDownloadDelegate value to receive that callback; a value without it is simply never sent one.

type ManagedAssetPackDownloadDelegateDownloadOfAssetPackFailedWithErrorHandler added in v0.17.0

type ManagedAssetPackDownloadDelegateDownloadOfAssetPackFailedWithErrorHandler interface {
	DownloadOfAssetPackFailedWithError(assetPack *AssetPack, err error)
}

ManagedAssetPackDownloadDelegateDownloadOfAssetPackFailedWithErrorHandler is the optional BAManagedAssetPackDownloadDelegate method downloadOfAssetPack:failedWithError:. Implement it on a ManagedAssetPackDownloadDelegate value to receive that callback; a value without it is simply never sent one.

type ManagedAssetPackDownloadDelegateDownloadOfAssetPackFinishedHandler added in v0.17.0

type ManagedAssetPackDownloadDelegateDownloadOfAssetPackFinishedHandler interface {
	DownloadOfAssetPackFinished(assetPack *AssetPack)
}

ManagedAssetPackDownloadDelegateDownloadOfAssetPackFinishedHandler is the optional BAManagedAssetPackDownloadDelegate method downloadOfAssetPackFinished:. Implement it on a ManagedAssetPackDownloadDelegate value to receive that callback; a value without it is simply never sent one.

type ManagedAssetPackDownloadDelegateDownloadOfAssetPackHasProgressHandler added in v0.17.0

type ManagedAssetPackDownloadDelegateDownloadOfAssetPackHasProgressHandler interface {
	DownloadOfAssetPackHasProgress(assetPack *AssetPack, progress obj.Object)
}

ManagedAssetPackDownloadDelegateDownloadOfAssetPackHasProgressHandler is the optional BAManagedAssetPackDownloadDelegate method downloadOfAssetPack:hasProgress:. Implement it on a ManagedAssetPackDownloadDelegate value to receive that callback; a value without it is simply never sent one.

type ManagedAssetPackDownloadDelegateDownloadOfAssetPackPausedHandler added in v0.17.0

type ManagedAssetPackDownloadDelegateDownloadOfAssetPackPausedHandler interface {
	DownloadOfAssetPackPaused(assetPack *AssetPack)
}

ManagedAssetPackDownloadDelegateDownloadOfAssetPackPausedHandler is the optional BAManagedAssetPackDownloadDelegate method downloadOfAssetPackPaused:. Implement it on a ManagedAssetPackDownloadDelegate value to receive that callback; a value without it is simply never sent one.

type ManagedDownloaderExtension added in v0.17.0

type ManagedDownloaderExtension interface {
}

ManagedDownloaderExtension is the Go form of the Objective-C protocol BAManagedDownloaderExtension.

type ManagedErrorCode added in v0.17.0

type ManagedErrorCode int64

An error code for a managed asset pack.

const (
	// An error code that indicates the system couldn’t find an asset pack with the given identifier.
	ManagedErrorCodeAssetPackNotFound ManagedErrorCode = 0
	// An error code that indicates the system couldn’t find a file at the specified path.
	ManagedErrorCodeFileNotFound ManagedErrorCode = 1
)

func (ManagedErrorCode) String added in v0.17.0

func (e ManagedErrorCode) String() string

String returns the ManagedErrorCode constant's name, or its numeric form when the value is not a known constant.

type MpoFlags added in v0.17.0

type MpoFlags uint32

Bitmask — values may be combined with |.

const (
	MpoFlagsPort                        MpoFlags = 0
	MpoFlagsServicePort                 MpoFlags = 1024
	MpoFlagsConnectionPort              MpoFlags = 2048
	MpoFlagsReplyPort                   MpoFlags = 4096
	MpoFlagsWeakReplyPort               MpoFlags = 16384
	MpoFlagsNotificationPort            MpoFlags = 17408
	MpoFlagsExceptionPort               MpoFlags = 32768
	MpoFlagsConnectionPortWithPortArray MpoFlags = 65536
)

func (MpoFlags) String added in v0.17.0

func (e MpoFlags) String() string

String returns the MpoFlags constant's name, or its numeric form when the value is not a known constant.

type OSClockid added in v0.17.0

type OSClockid uint32
const (
	OSClockidTime OSClockid = 32
)

func (OSClockid) String added in v0.17.0

func (e OSClockid) String() string

String returns the OSClockid constant's name, or its numeric form when the value is not a known constant.

type Perm added in v0.17.0

type Perm int32
const (
	PermReadData           Perm = 2
	PermListDirectory      Perm = 2
	PermWriteData          Perm = 4
	PermAddFile            Perm = 4
	PermExecute            Perm = 8
	PermSearch             Perm = 8
	PermDelete             Perm = 16
	PermAppendData         Perm = 32
	PermAddSubdirectory    Perm = 32
	PermDeleteChild        Perm = 64
	PermReadAttributes     Perm = 128
	PermWriteAttributes    Perm = 256
	PermReadExtattributes  Perm = 512
	PermWriteExtattributes Perm = 1024
	PermReadSecurity       Perm = 2048
	PermWriteSecurity      Perm = 4096
	PermChangeOwner        Perm = 8192
	PermSynchronize        Perm = 1048576
)

func (Perm) String added in v0.17.0

func (e Perm) String() string

String returns the Perm constant's name, or its numeric form when the value is not a known constant.

type PtrauthKey added in v0.17.0

type PtrauthKey int32
const (
	Ptrauth_key_none                     PtrauthKey = -1
	Ptrauth_key_asia                     PtrauthKey = 0
	Ptrauth_key_asib                     PtrauthKey = 1
	Ptrauth_key_asda                     PtrauthKey = 2
	Ptrauth_key_asdb                     PtrauthKey = 3
	Ptrauth_key_process_independent_code PtrauthKey = 0
	Ptrauth_key_process_dependent_code   PtrauthKey = 1
	Ptrauth_key_process_independent_data PtrauthKey = 2
	Ptrauth_key_process_dependent_data   PtrauthKey = 3
	Ptrauth_key_return_address           PtrauthKey = 1
	Ptrauth_key_frame_pointer            PtrauthKey = 3
	Ptrauth_key_function_pointer         PtrauthKey = 0
	Ptrauth_key_block_function           PtrauthKey = 0
	Ptrauth_key_cxx_vtable_pointer       PtrauthKey = 2
	Ptrauth_key_method_list_pointer      PtrauthKey = 2
	Ptrauth_key_objc_isa_pointer         PtrauthKey = 2
	Ptrauth_key_objc_super_pointer       PtrauthKey = 2
	Ptrauth_key_objc_sel_pointer         PtrauthKey = 3
	Ptrauth_key_objc_class_ro_pointer    PtrauthKey = 2
	Ptrauth_key_block_descriptor_pointer PtrauthKey = 2
	Ptrauth_key_init_fini_pointer        PtrauthKey = 0
)

func (PtrauthKey) String added in v0.17.0

func (e PtrauthKey) String() string

String returns the PtrauthKey constant's name, or its numeric form when the value is not a known constant.

type QosClass added in v0.17.0

type QosClass uint32
const (
	QosClassUserInteractive QosClass = 33
	QosClassUserInitiated   QosClass = 25
	QosClassDefault         QosClass = 21
	QosClassUtility         QosClass = 17
	QosClassBackground      QosClass = 9
	QosClassUnspecified     QosClass = 0
)

func (QosClass) String added in v0.17.0

func (e QosClass) String() string

String returns the QosClass constant's name, or its numeric form when the value is not a known constant.

type Tag added in v0.17.0

type Tag int32
const (
	TagUndefinedTag  Tag = 0
	TagExtendedAllow Tag = 1
	TagExtendedDeny  Tag = 2
)

func (Tag) String added in v0.17.0

func (e Tag) String() string

String returns the Tag constant's name, or its numeric form when the value is not a known constant.

type Type added in v0.17.0

type Type int32
const (
	TypeExtended Type = 256
	TypeAccess   Type = 0
	TypeDefault  Type = 1
	TypeAfs      Type = 2
	TypeCoda     Type = 3
	TypeNtfs     Type = 4
	TypeNwfs     Type = 5
)

func (Type) String added in v0.17.0

func (e Type) String() string

String returns the Type constant's name, or its numeric form when the value is not a known constant.

type URLDownload added in v0.17.0

type URLDownload struct {
	Download
}

URLDownload is an idiomatic wrapper over the Objective-C class BAURLDownload.

It embeds Download, promoting that type's methods.

An object that represents a remote asset to download.

func NewURLDownloadWithIdentifierRequestApplicationGroupIdentifier added in v0.17.0

func NewURLDownloadWithIdentifierRequestApplicationGroupIdentifier(identifier string, request obj.Object, applicationGroupIdentifier string) *URLDownload

NewURLDownloadWithIdentifierRequestApplicationGroupIdentifier creates a download that uses the specified identifier and App Group.

func NewURLDownloadWithIdentifierRequestApplicationGroupIdentifierPriority added in v0.17.0

func NewURLDownloadWithIdentifierRequestApplicationGroupIdentifierPriority(identifier string, request obj.Object, applicationGroupIdentifier string, priority int) *URLDownload

NewURLDownloadWithIdentifierRequestApplicationGroupIdentifierPriority creates a prioritized download that uses the specified identifier and App Group.

func NewURLDownloadWithIdentifierRequestEssentialFileSizeApplicationGroupIdentifierPriority added in v0.17.0

func NewURLDownloadWithIdentifierRequestEssentialFileSizeApplicationGroupIdentifierPriority(identifier string, request obj.Object, essential bool, fileSize int, applicationGroupIdentifier string, priority int) *URLDownload

NewURLDownloadWithIdentifierRequestEssentialFileSizeApplicationGroupIdentifierPriority constructs a download object to represent the download of a asset located inside of the provided

func NewURLDownloadWithIdentifierRequestFileSizeApplicationGroupIdentifier added in v0.17.0

func NewURLDownloadWithIdentifierRequestFileSizeApplicationGroupIdentifier(identifier string, request obj.Object, fileSize int, applicationGroupIdentifier string) *URLDownload

NewURLDownloadWithIdentifierRequestFileSizeApplicationGroupIdentifier constructs a download object to represent the download of a asset located inside of the provided

func URLDownloadFromID added in v0.17.0

func URLDownloadFromID(id objc.ID) *URLDownload

URLDownloadFromID adopts an existing Objective-C object as a URLDownload (nil for 0), retaining it and registering a release finalizer.

type VirtualMemoryGuardExceptionCode added in v0.17.0

type VirtualMemoryGuardExceptionCode uint32
const (
	KGUARD_EXC_DEALLOC_GAP                   VirtualMemoryGuardExceptionCode = 1
	KGUARD_EXC_RECLAIM_COPYIO_FAILURE        VirtualMemoryGuardExceptionCode = 2
	KGUARD_EXC_RECLAIM_INDEX_FAILURE         VirtualMemoryGuardExceptionCode = 4
	KGUARD_EXC_RECLAIM_DEALLOCATE_FAILURE    VirtualMemoryGuardExceptionCode = 8
	KGUARD_EXC_RECLAIM_ACCOUNTING_FAILURE    VirtualMemoryGuardExceptionCode = 9
	KGUARD_EXC_SEC_IOPL_ON_EXEC_PAGE         VirtualMemoryGuardExceptionCode = 10
	KGUARD_EXC_SEC_EXEC_ON_IOPL_PAGE         VirtualMemoryGuardExceptionCode = 11
	KGUARD_EXC_SEC_UPL_WRITE_ON_EXEC_REGION  VirtualMemoryGuardExceptionCode = 12
	KGUARD_EXC_LARGE_ALLOCATION_TELEMETRY    VirtualMemoryGuardExceptionCode = 13
	KGUARD_EXC_SEC_ACCESS_FAULT              VirtualMemoryGuardExceptionCode = 98
	KGUARD_EXC_SEC_ASYNC_ACCESS_FAULT        VirtualMemoryGuardExceptionCode = 99
	KGUARD_EXC_SEC_COPY_DENIED               VirtualMemoryGuardExceptionCode = 100
	KGUARD_EXC_SEC_SHARING_DENIED            VirtualMemoryGuardExceptionCode = 101
	KGUARD_EXC_MTE_SYNC_FAULT                VirtualMemoryGuardExceptionCode = 200
	KGUARD_EXC_MTE_ASYNC_USER_FAULT          VirtualMemoryGuardExceptionCode = 201
	KGUARD_EXC_MTE_ASYNC_KERN_FAULT          VirtualMemoryGuardExceptionCode = 202
	KGUARD_EXC_GUARD_OBJECT_ASYNC_USER_FAULT VirtualMemoryGuardExceptionCode = 203
	KGUARD_EXC_GUARD_OBJECT_ASYNC_KERN_FAULT VirtualMemoryGuardExceptionCode = 204
)

func (VirtualMemoryGuardExceptionCode) String added in v0.17.0

String returns the VirtualMemoryGuardExceptionCode constant's name, or its numeric form when the value is not a known constant.

type XpcListenerCreateFlags added in v0.17.0

type XpcListenerCreateFlags uint64

Bitmask — values may be combined with |.

const (
	XpcListenerCreateFlagsNone            XpcListenerCreateFlags = 0
	XpcListenerCreateFlagsInactive        XpcListenerCreateFlags = 1
	XpcListenerCreateFlagsForceMach       XpcListenerCreateFlags = 2
	XpcListenerCreateFlagsForceXpcservice XpcListenerCreateFlags = 4
)

func (XpcListenerCreateFlags) String added in v0.17.0

func (e XpcListenerCreateFlags) String() string

String returns the XpcListenerCreateFlags constant's name, or its numeric form when the value is not a known constant.

type XpcSessionCreateFlags added in v0.17.0

type XpcSessionCreateFlags uint64

Bitmask — values may be combined with |.

const (
	XpcSessionCreateFlagsNone           XpcSessionCreateFlags = 0
	XpcSessionCreateFlagsInactive       XpcSessionCreateFlags = 1
	XpcSessionCreateFlagsMachPrivileged XpcSessionCreateFlags = 2
)

func (XpcSessionCreateFlags) String added in v0.17.0

func (e XpcSessionCreateFlags) String() string

String returns the XpcSessionCreateFlags constant's name, or its numeric form when the value is not a known constant.

Jump to

Keyboard shortcuts

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