API Reference | developer.brewmp.com API Reference | developer.brewmp.com


API Reference


Brew Release
Brew MP 1.0.2

This interface supports tracking the status of in-progress install and fetching the result.
IModInstallerCntx2 inherits from IModInstallerCntx, and adds a "Resume" method.
Install can be started using IModInstaller_StartInstall. The user can provide a signal using Set_Signal and it will be set once some progress has been made. The user can track the progress using the IModInstallerCntx2_GetInstallProgress() api. If the state returned in this call is MODINSTALLERCNTX_STATE_METADATA, then it indicates that the IModInstallerCntx2 object has unpacked metadata and is currently in a paused state. This can only occur if IModInstaller_StartInstall was called with uOpFlag containing MODMGR_PAUSE_INSTALL. At this point the caller could call IModInstallerCntx2_GetMetaData() to retrieve an ISettings object to read the metadata. In order to continue with installation, the caller will call IModInstallerCntx2_Resume()
If the install completes successfully the user should call IModInstallerCntx2_GetNumInstall() api to find out how many modules were in the package and were installed completely/partially by current install process. The user can callI ModInstallerCntx2_GetInstallResult() for all the mods installed to check the status or each module's install. The Interface does not dictate if partial installs are allowed or not; it is up to the implementation to decide if it wants to abort at error or try to install other modules in the package. This is possible since each module has its own status/error code that could be checked at the end of the install process. Check the implementation documentation to find out the exact behavior.
The user can only track one Install operation per context object at a time. The user can start multiple independent installs using IModInstaller interface and track each context object separately. All the objects of type IModInstallerCntx2 work independently of each other and do not share any state.
The interface does not support a method for cleaning up unsuccessful installations. The assumption is that this is handled implicitly by the underlying implementation - either on instantiation, or at some other appropriate time.
A caller obtains an object implementating this interface by calling IModInstallerCntx_QueryInterface(AEEIID_IModInstallerCntx2). The call flow is: IModInstaller_StartInstall - returns an IModInstallerCntx object IModInstallerCntx_QueryInterface(AEEIID_IModInstallerCntx2) - returns an IModInstallerCntx2 object
See the relevant .bid file for example, per-class usage. The following implementations are available.