Exemple #1
0
AAFRESULT STDMETHODCALLTYPE
    ImplAAFPluginDef::GetLocatorAt (
	  aafUInt32 index,
      ImplAAFLocator ** ppLocator)
{
	if(ppLocator == NULL)
		return(AAFRESULT_NULL_PARAM);

	aafUInt32 count;
	AAFRESULT hr;
	hr = CountLocators (&count);
	if (AAFRESULT_FAILED (hr)) return hr;

	if (index >= count)
	  return AAFRESULT_BADINDEX;

	ImplAAFLocator *pLocator;
	_locators.getValueAt(pLocator,index);

	ASSERTU(pLocator);
	pLocator->AcquireReference();
	(*ppLocator)=pLocator;

	return AAFRESULT_SUCCESS;
}
Exemple #2
0
AAFRESULT STDMETHODCALLTYPE
    ImplAAFPluginDef::RemoveLocatorAt (
	  aafUInt32 index)
{
	aafUInt32 count;
	AAFRESULT hr;
	ImplAAFLocator	*pLoc;
	
	hr = CountLocators (&count);
	if (AAFRESULT_FAILED (hr)) return hr;

	if (index >= count)
	  return AAFRESULT_BADINDEX;

	pLoc = _locators.removeAt(index);
	if(pLoc)
		pLoc->ReleaseReference();

	return AAFRESULT_SUCCESS;
}
AAFRESULT STDMETHODCALLTYPE
    ImplAAFEssenceDescriptor::GetLocatorAt (aafUInt32 index,
											ImplAAFLocator ** ppLocator)
{
	if (! ppLocator) return AAFRESULT_NULL_PARAM;
	
	aafUInt32 count;
	AAFRESULT hr;
	hr = CountLocators (&count);
	if (AAFRESULT_FAILED (hr)) return hr;
	
	if (index >= count)
		return AAFRESULT_BADINDEX;
	
	_locators.getValueAt(*ppLocator, index);
	ASSERTU(*ppLocator);
	(*ppLocator)->AcquireReference();

	return AAFRESULT_SUCCESS;
}
Exemple #4
0
AAFRESULT STDMETHODCALLTYPE
    ImplAAFPluginDef::InsertLocatorAt (
	  aafUInt32 index,
      ImplAAFLocator *pLocator)
{
	if(pLocator == NULL)
		return(AAFRESULT_NULL_PARAM);

	aafUInt32 count;
	AAFRESULT ar;
	ar = CountLocators (&count);
	if (AAFRESULT_FAILED (ar)) return ar;

	if (index > count)
	  return AAFRESULT_BADINDEX;

	if(pLocator->attached())
		return(AAFRESULT_OBJECT_ALREADY_ATTACHED);

	_locators.insertAt(pLocator,index);
	pLocator->AcquireReference();
	
	return AAFRESULT_SUCCESS;
}