# This file is generated by objective.metadata
#
# Last update: Wed Jul 23 12:27:07 2025
#
# flake8: noqa

import objc, sys
from typing import NewType

if sys.maxsize > 2**32:

    def sel32or64(a, b):
        return b

else:

    def sel32or64(a, b):
        return a


if objc.arch == "arm64":

    def selAorI(a, b):
        return a

else:

    def selAorI(a, b):
        return b


misc = {}
constants = """$BAAssetPackIdentifierErrorKey$BADownloaderPriorityDefault@q$BADownloaderPriorityMax@q$BADownloaderPriorityMin@q$BAErrorDomain$BAManagedErrorDomain$"""
enums = """$BAAssetPackStatusDownloadAvailable@1$BAAssetPackStatusDownloaded@64$BAAssetPackStatusDownloading@32$BAAssetPackStatusObsolete@16$BAAssetPackStatusOutOfDate@8$BAAssetPackStatusUpToDate@4$BAAssetPackStatusUpdateAvailable@2$BAContentRequestInstall@1$BAContentRequestPeriodic@3$BAContentRequestUpdate@2$BADownloadStateCreated@0$BADownloadStateDownloading@2$BADownloadStateFailed@-1$BADownloadStateFinished@3$BADownloadStateWaiting@1$BAErrorCodeCallFromExtensionNotAllowed@50$BAErrorCodeCallFromInactiveProcessNotAllowed@51$BAErrorCodeCallerConnectionInvalid@56$BAErrorCodeCallerConnectionNotAccepted@55$BAErrorCodeDownloadAlreadyFailed@103$BAErrorCodeDownloadAlreadyScheduled@100$BAErrorCodeDownloadBackgroundActivityProhibited@111$BAErrorCodeDownloadDoesNotExist@113$BAErrorCodeDownloadEssentialDownloadNotPermitted@109$BAErrorCodeDownloadFailedToStart@102$BAErrorCodeDownloadInvalid@0$BAErrorCodeDownloadNotScheduled@101$BAErrorCodeDownloadWouldExceedAllowance@112$BAErrorCodeSessionDownloadAllowanceExceeded@204$BAErrorCodeSessionDownloadDisallowedByAllowance@203$BAErrorCodeSessionDownloadDisallowedByDomain@202$BAErrorCodeSessionDownloadNotPermittedBeforeAppLaunch@206$BAManagedErrorCodeAssetPackNotFound@0$BAManagedErrorCodeFileNotFound@1$"""
misc.update(
    {
        "BAAssetPackStatus": NewType("BAAssetPackStatus", int),
        "BAErrorCode": NewType("BAErrorCode", int),
        "BAManagedErrorCode": NewType("BAManagedErrorCode", int),
        "BAContentRequest": NewType("BAContentRequest", int),
        "BADownloadState": NewType("BADownloadState", int),
    }
)
misc.update(
    {
        "BADownloadState": NewType("BADownloadState", int),
        "BADownloaderPriority": NewType("BADownloaderPriority", int),
    }
)
misc.update({})
r = objc.registerMetaDataForSelector
objc._updatingMetadata(True)
try:
    r(
        b"BAAssetPackManager",
        b"URLForPath:error:",
        {"arguments": {3: {"type_modifier": b"o"}}},
    )
    r(
        b"BAAssetPackManager",
        b"checkForUpdatesWithCompletionHandler:",
        {
            "arguments": {
                2: {
                    "callable": {
                        "retval": {"type": b"v"},
                        "arguments": {
                            0: {"type": b"^v"},
                            1: {"type": b"@"},
                            2: {"type": b"@"},
                            3: {"type": b"@"},
                        },
                    }
                }
            }
        },
    )
    r(
        b"BAAssetPackManager",
        b"contentsAtPath:searchingInAssetPackWithIdentifier:options:error:",
        {"arguments": {5: {"type_modifier": b"o"}}},
    )
    r(
        b"BAAssetPackManager",
        b"ensureLocalAvailabilityOfAssetPack:completionHandler:",
        {
            "arguments": {
                3: {
                    "callable": {
                        "retval": {"type": b"v"},
                        "arguments": {0: {"type": b"^v"}, 1: {"type": b"@"}},
                    }
                }
            }
        },
    )
    r(
        b"BAAssetPackManager",
        b"fileDescriptorForPath:searchingInAssetPackWithIdentifier:error:",
        {"arguments": {4: {"type_modifier": b"o"}}},
    )
    r(
        b"BAAssetPackManager",
        b"getAllAssetPacksWithCompletionHandler:",
        {
            "arguments": {
                2: {
                    "callable": {
                        "retval": {"type": b"v"},
                        "arguments": {
                            0: {"type": b"^v"},
                            1: {"type": b"@"},
                            2: {"type": b"@"},
                        },
                    }
                }
            }
        },
    )
    r(
        b"BAAssetPackManager",
        b"getAssetPackWithIdentifier:completionHandler:",
        {
            "arguments": {
                3: {
                    "callable": {
                        "retval": {"type": b"v"},
                        "arguments": {
                            0: {"type": b"^v"},
                            1: {"type": b"@"},
                            2: {"type": b"@"},
                        },
                    }
                }
            }
        },
    )
    r(
        b"BAAssetPackManager",
        b"getStatusOfAssetPackWithIdentifier:completionHandler:",
        {
            "arguments": {
                3: {
                    "callable": {
                        "retval": {"type": b"v"},
                        "arguments": {
                            0: {"type": b"^v"},
                            1: {"type": b"Q"},
                            2: {"type": b"@"},
                        },
                    }
                }
            }
        },
    )
    r(
        b"BAAssetPackManager",
        b"removeAssetPackWithIdentifier:completionHandler:",
        {
            "arguments": {
                3: {
                    "callable": {
                        "retval": {"type": b"v"},
                        "arguments": {0: {"type": b"^v"}, 1: {"type": b"@"}},
                    }
                }
            }
        },
    )
    r(
        b"BAAssetPackManifest",
        b"initFromData:applicationGroupIdentifier:error:",
        {"arguments": {4: {"type_modifier": b"o"}}},
    )
    r(
        b"BAAssetPackManifest",
        b"initWithContentsOfURL:applicationGroupIdentifier:error:",
        {"arguments": {4: {"type_modifier": b"o"}}},
    )
    r(b"BADownload", b"isEssential", {"retval": {"type": b"Z"}})
    r(
        b"BADownloadManager",
        b"cancelDownload:error:",
        {"retval": {"type": b"Z"}, "arguments": {3: {"type_modifier": b"o"}}},
    )
    r(
        b"BADownloadManager",
        b"etchCurrentDownloads:",
        {"arguments": {2: {"type_modifier": b"o"}}},
    )
    r(
        b"BADownloadManager",
        b"fetchCurrentDownloads:",
        {"arguments": {2: {"type_modifier": b"o"}}},
    )
    r(
        b"BADownloadManager",
        b"fetchCurrentDownloadsWithCompletionHandler:",
        {
            "arguments": {
                2: {
                    "callable": {
                        "retval": {"type": b"v"},
                        "arguments": {
                            0: {"type": b"^v"},
                            1: {"type": b"@"},
                            2: {"type": b"@"},
                        },
                    }
                }
            }
        },
    )
    r(
        b"BADownloadManager",
        b"performWithExclusiveControl:",
        {
            "arguments": {
                2: {
                    "callable": {
                        "retval": {"type": b"v"},
                        "arguments": {
                            0: {"type": b"^v"},
                            1: {"type": b"Z"},
                            2: {"type": b"@"},
                        },
                    }
                }
            }
        },
    )
    r(
        b"BADownloadManager",
        b"performWithExclusiveControlBeforeDate:performHandler:",
        {
            "arguments": {
                3: {
                    "callable": {
                        "retval": {"type": b"v"},
                        "arguments": {
                            0: {"type": b"^v"},
                            1: {"type": b"Z"},
                            2: {"type": b"@"},
                        },
                    }
                }
            }
        },
    )
    r(
        b"BADownloadManager",
        b"scheduleDownload:error:",
        {"retval": {"type": b"Z"}, "arguments": {3: {"type_modifier": b"o"}}},
    )
    r(
        b"BADownloadManager",
        b"startForegroundDownload:error:",
        {"retval": {"type": b"Z"}, "arguments": {3: {"type_modifier": b"o"}}},
    )
    r(
        b"BAURLDownload",
        b"initWithIdentifier:request:essential:fileSize:applicationGroupIdentifier:priority:",
        {"arguments": {4: {"type": b"Z"}}},
    )
    r(
        b"NSObject",
        b"backgroundDownload:didReceiveChallenge:completionHandler:",
        {
            "required": False,
            "retval": {"type": b"v"},
            "arguments": {
                2: {"type": b"@"},
                3: {"type": b"@"},
                4: {
                    "callable": {
                        "retval": {"type": b"v"},
                        "arguments": {
                            0: {"type": b"^v"},
                            1: {"type": b"q"},
                            2: {"type": b"@"},
                        },
                    },
                    "type": b"@?",
                },
            },
        },
    )
    r(
        b"NSObject",
        b"backgroundDownload:failedWithError:",
        {
            "required": False,
            "retval": {"type": b"v"},
            "arguments": {2: {"type": b"@"}, 3: {"type": b"@"}},
        },
    )
    r(
        b"NSObject",
        b"backgroundDownload:finishedWithFileURL:",
        {
            "required": False,
            "retval": {"type": b"v"},
            "arguments": {2: {"type": b"@"}, 3: {"type": b"@"}},
        },
    )
    r(
        b"NSObject",
        b"download:didReceiveChallenge:completionHandler:",
        {
            "required": False,
            "retval": {"type": b"v"},
            "arguments": {
                2: {"type": b"@"},
                3: {"type": b"@"},
                4: {
                    "callable": {
                        "retval": {"type": b"v"},
                        "arguments": {
                            0: {"type": b"^v"},
                            1: {"type": b"q"},
                            2: {"type": b"@"},
                        },
                    },
                    "type": b"@?",
                },
            },
        },
    )
    r(
        b"NSObject",
        b"download:didWriteBytes:totalBytesWritten:totalBytesExpectedToWrite:",
        {
            "required": False,
            "retval": {"type": b"v"},
            "arguments": {
                2: {"type": b"@"},
                3: {"type": b"q"},
                4: {"type": b"q"},
                5: {"type": b"q"},
            },
        },
    )
    r(
        b"NSObject",
        b"download:failedWithError:",
        {
            "required": False,
            "retval": {"type": b"v"},
            "arguments": {2: {"type": b"@"}, 3: {"type": b"@"}},
        },
    )
    r(
        b"NSObject",
        b"download:finishedWithFileURL:",
        {
            "required": False,
            "retval": {"type": b"v"},
            "arguments": {2: {"type": b"@"}, 3: {"type": b"@"}},
        },
    )
    r(
        b"NSObject",
        b"downloadDidBegin:",
        {"required": False, "retval": {"type": b"v"}, "arguments": {2: {"type": b"@"}}},
    )
    r(
        b"NSObject",
        b"downloadDidPause:",
        {"required": False, "retval": {"type": b"v"}, "arguments": {2: {"type": b"@"}}},
    )
    r(
        b"NSObject",
        b"downloadOfAssetPack:failedWithError:",
        {
            "required": False,
            "retval": {"type": b"v"},
            "arguments": {2: {"type": b"@"}, 3: {"type": b"@"}},
        },
    )
    r(
        b"NSObject",
        b"downloadOfAssetPack:hasProgress:",
        {
            "required": False,
            "retval": {"type": b"v"},
            "arguments": {2: {"type": b"@"}, 3: {"type": b"@"}},
        },
    )
    r(
        b"NSObject",
        b"downloadOfAssetPackBegan:",
        {"required": False, "retval": {"type": b"v"}, "arguments": {2: {"type": b"@"}}},
    )
    r(
        b"NSObject",
        b"downloadOfAssetPackFinished:",
        {"required": False, "retval": {"type": b"v"}, "arguments": {2: {"type": b"@"}}},
    )
    r(
        b"NSObject",
        b"downloadOfAssetPackPaused:",
        {"required": False, "retval": {"type": b"v"}, "arguments": {2: {"type": b"@"}}},
    )
    r(
        b"NSObject",
        b"downloadsForRequest:manifestURL:extensionInfo:",
        {
            "required": False,
            "retval": {"type": b"@"},
            "arguments": {2: {"type": b"q"}, 3: {"type": b"@"}, 4: {"type": b"@"}},
        },
    )
    r(
        b"NSObject",
        b"extensionWillTerminate",
        {"required": False, "retval": {"type": b"v"}},
    )
    r(
        b"NSObject",
        b"shouldDownloadAssetPack:",
        {"required": False, "retval": {"type": b"Z"}, "arguments": {2: {"type": b"@"}}},
    )
finally:
    objc._updatingMetadata(False)

objc.registerNewKeywordsFromSelector(
    "BAAssetPackManifest", b"initFromData:applicationGroupIdentifier:error:"
)
objc.registerNewKeywordsFromSelector(
    "BAAssetPackManifest", b"initWithContentsOfURL:applicationGroupIdentifier:error:"
)
objc.registerNewKeywordsFromSelector(
    "BAURLDownload", b"initWithIdentifier:request:applicationGroupIdentifier:"
)
objc.registerNewKeywordsFromSelector(
    "BAURLDownload", b"initWithIdentifier:request:applicationGroupIdentifier:priority:"
)
objc.registerNewKeywordsFromSelector(
    "BAURLDownload",
    b"initWithIdentifier:request:essential:fileSize:applicationGroupIdentifier:priority:",
)
objc.registerNewKeywordsFromSelector(
    "BAURLDownload", b"initWithIdentifier:request:fileSize:applicationGroupIdentifier:"
)
expressions = {}

# END OF FILE
