--- Globally available utility functions.
module "DBM"

--- Registers a callback functions that will be called on a certain DBM-event.
-- @usage The following events are currently supported: "raidJoin", "raidLeave", "pull", "wipe" and "kill". The "raidJoin" and "raidLeave" event handlers receive the name of the player that joined/left. The "pull", "wipe" and "kill" events receive the affected boss mod.
-- @param event The event on which the function will be called.
-- @param func The function that will be called. The first argument passed to the function will be the event, the following arguments are event-specific.
DBM:RegisterCallback(event, func)

--- Schedules a function which will be called after a given time.
-- @usage This method should not be used by boss mods. Use mod:Schedule(t, func, ...) instead.
-- @param t The time in seconds after which the function is called.
-- @param func The function that will be called.
-- @param ... The arguments passed to the function.
function DBM:Schedule(t, func, ...)

--- Cancels a scheduled task.
-- @usage This method should not be used by boss mods. Use mod:Unschedule(func, ...) instead.
-- @param func The scheduled function which will be canceled.
-- @param ... The arguments used when scheduling the function. This can match more than one scheduled tasks if you provide fewer arguments than a scheduled function actually has.
function DBM:Unschedule(func, ...)

--- Creates a "pizza timer".
-- @param time The time in seconds.
-- @param text The text that will be displayed on the timer.
-- @param broadcast Set this to true to broadcast the timer to the raid. Requires (A) or (L).
function DBM:CreatePizzaTimer(time, text, broadcast)

--- Loads DBM-GUI if it is not already loaded and toggles the option menu.
function DBM:LoadGUI()

--- Checks if the player is in a raid or a party.
-- @return Returns true if the player is in a raid or a party.
function DBM:IsInRaid()

--- Checks the raid priveleges of a player.
-- @param name The name of the player.
-- @return Returns the raid rank, 0 = no privileges or player not found, 1 = promoted, 2 = leader.
function DBM:GetRaidRank(name)

--- Gets the raid subgroup of a player.
-- @param name The name of the player.
-- @return Returns the raid subgroup in which the given player is or 0 if the player is not in the raid.
function DBM:GetRaidSubgroup(name)

--- Gets the class of a player.
-- @param name The name of the player.
-- @return Returns the english name of the player's class in uppercase letters (e.g. PRIEST) or UNKNOWN if the player is not in the raid.
function DBM:GetRaidClass(name)

--- Gets a unit ID of the given raid member.
-- @param name The name of the player.
-- @return Returns a valid unit id, "none" (which is a valid ID) if the player is not in the raid.
function DBM:GetRaidUnitId(name)

--- Loads boss mods for an instance.
-- @param mod An addon object of an addon that is not yet loaded. All addon objects are stored in @see DBM.AddOns and created automatically based on metadata from the toc file.
-- @return Returns true if the mod was loaded successfully, false otherwise.
function DBM:LoadMod(mod)

--- Starts the auto-recovery function that requests the state of all currently running boss mods from random raid members who have the latest version of DBM installed.
-- @usage You usually don't need to call this by hand, it is done automatically when logging in during a boss fight.
function DBM:RequestTimers()

--- Disables DBM.
function DBM:Disable()

--- Enables DBM.
function DBM:Enable()

--- Checks if DBM is enabled.
-- @return Returns true if DBM is enabled, false otherwise.
function DBM:IsEnabled()

--- Prints a message to the default chat frame.
-- @usage Don't use this in boss mods, use mod:AddMsg(text, prefix) instead.
-- @param text The text that will be displayed.
-- @param prefix A prefix for the text. Optional; default value is "Deadly Boss Mods"
function DBM:AddMsg(text, prefix)

--- Creates a new boss mod object.
-- @param name A unique identifier for the boss mod.
-- @param modId The name of the addon to which the boss mod belongs (e.g. DBM-Ulduar).
-- @param modSubTab The identifier of the subtab in which the mod should be placed. (see DBM-Naxx for examples)
function DBM:NewMod(name, modId, modSubTab)

--- Gets the boss with the given identifier.
-- @param name The name of the boss mod.
-- @return Returns a boss mod object or nil.
function DBM:GetModByName(name)

--- Creates a mod localization object.
-- @param name The name of the boss mod for which the localization will be created.
-- @return Returns a localization object.
function DBM:CreateModLocalization(name)

--- Gets a localization object.
-- @param name The name of the boss mod
-- @return Returns the localization object of the boss mod.
function DBM:GetModLocalization(name)
