---@meta profile

--------------------------------------------------------------------------------
-- iOS Profile C module
--------------------------------------------------------------------------------

---@alias profile_filter_flags integer

---@class profile_info*
---@field PayloadIdentifier? string Profile ID
---@field PayloadUUID? string Description file UUID
---@field PayloadDisplayName? string display name
---@field PayloadDescription? string Description
---@field PayloadOrganization? string Organization name
---@field PayloadType? string payload Type
---@field PayloadVersion? integer payload version
---@field PayloadRemovalDisallowed? boolean Whether to disable removal
---@field PayloadContent? table payload content
---@field [string] any Other system return fields

---@class profile*
---@type profile*
local M = {}

--- Import the description file and let the system confirm the installation.
---@param path string Description file path
---@param install? boolean Whether to install directly; default false
---@return string? taskIdentifier Task ID
---@return string? errMsg error message
function M.import(path, install) end

--- Installation description file.
---@param path string Description file path
---@param install? boolean Whether to install directly; default true
---@return string? taskIdentifier Task ID
---@return string? errMsg error message
function M.install(path, install) end

--- Lists installed description files.
---@param filterFlags? profile_filter_flags Filter tag, default 1
---@return profile_info*[] profiles Description file list
function M.list(filterFlags) end

--- Lists installed profiles by filter tag.
---@param filterFlags? profile_filter_flags Filter tag, default 1
---@return profile_info*[] profiles Description file list
function M.filter(filterFlags) end

--- Get the description file for the specified ID.
---@param identifier string Profile ID
---@return profile_info*? profile Description file information
function M.fetch(identifier) end

--- Removes the profile for the specified ID.
---@param identifier string Profile ID
function M.remove(identifier) end

--- Clear profiles matching filter tags.
---@param filterFlags? profile_filter_flags Filter tag, default 1
---@return integer count Remove quantity
function M.clear(filterFlags) end

return M
