Пример #1
0
void CExtensionManager::AddRawDependency(IExtension *ext, IdentityToken_t *other, void *iface)
{
	CExtension *pExt = (CExtension *)ext;
	CExtension *pOwner = GetExtensionFromIdent(other);

	IfaceInfo info;

	info.iface = (SMInterface *)iface;
	info.owner = pOwner;

	pExt->AddDependency(&info);
	pOwner->AddChildDependent(pExt, (SMInterface *)iface);
}
Пример #2
0
void CExtensionManager::BindDependency(IExtension *pRequester, IfaceInfo *pInfo)
{
	CExtension *pExt = (CExtension *)pRequester;
	CExtension *pOwner = (CExtension *)pInfo->owner;

	pExt->AddDependency(pInfo);

	IExtensionInterface *pAPI = pExt->GetAPI();
	if (pAPI && !pAPI->QueryInterfaceDrop(pInfo->iface))
	{
		pOwner->AddChildDependent(pExt, pInfo->iface);
	}
}