omni::ext::subscribeToExtensionEnable
Defined in omni/ext/ExtensionsUtils.h
- 
inline std::pair<IHookHolderPtr, IHookHolderPtr> omni::ext::subscribeToExtensionEnable(ExtensionManager *manager, const std::function<void(const char *extId)> &onEnable, const std::function<void(const char *extId)> &onDisable = nullptr, const char *extFullName = "", const char *hookName = nullptr)
- A wrapper function to subscribe to extension enable (and optionally disable) events. - Parameters
- manager – The ExtensionManager instance 
- onEnable – The - std::functionthat captures the invocable to call on enable (may be empty). If the extension is already enabled, this is invoked immediately
- onDisable – The - std::functionthat captures the invocable to call on disable (may be empty)
- extFullName – See IExtensionManagerHooks::createExtensionStateChangeHook() 
- hookName – See IExtensionManagerHooks::createExtensionStateChangeHook() 
 
- Returns
- a - std::pairof IHookHolderPtr objects (- firstrepresents the enable holder and- secondrepresents the disable holder)