jsbindings/jsbindings.cpp
/**
 * @brief Removes a JS listener for a particular event
 *
 * @param[in] aamp        Instance of AAMP_JS
 * @param[in] type        Event type
 * @param[in] jsCallback  Callback to be removed as listener
 */
@brief Removes a JS listener for a particular event
@param[in] aamp        Instance of AAMP_JS
@param[in] type        Event type
@param[in] jsCallback  Callback to be removed as listener
@brief Removes a JS listener for a particular event @param [ in ] aamp Instance of AAMP_JS @param [ in ] type Event type @param [ in ] jsCallback Callback to be removed as listener
void AAMP_JSListener::RemoveEventListener(AAMP_JS* aamp, AAMPEventType type, JSObjectRef jsCallback)
{
	LOG("[AAMP_JS] %s(%p, %d, %p)", __FUNCTION__, aamp, type, jsCallback);
	AAMP_JSListener** ppListener = &aamp->_listeners;
	while (*ppListener != NULL)
	{
		AAMP_JSListener* pListener = *ppListener;
		if ((pListener->_type == type) && (pListener->_jsCallback == jsCallback))
		{
			*ppListener = pListener->_pNext;
			aamp->_aamp->RemoveEventListener(type, pListener);
			delete pListener;
			return;
		}
		ppListener = &pListener->_pNext;
	}
}
void AAMP_JSListener :: RemoveEventListener ( AAMP_JS * aamp , AAMPEventType type , JSObjectRef jsCallback ) { LOG ( " " , __FUNCTION__ , aamp , type , jsCallback ) ; AAMP_JSListener * * ppListener = & aamp -> _listeners ; while ( * ppListener != NULL ) { AAMP_JSListener * pListener = * ppListener ; if ( ( pListener -> _type == type ) && ( pListener -> _jsCallback == jsCallback ) ) { * ppListener = pListener -> _pNext ; aamp -> _aamp -> RemoveEventListener ( type , pListener ) ; delete pListener ; return ; } ppListener = & pListener -> _pNext ; } }
@brief Removes a JS listener for a particular event
 @param[in] aamp        Instance of AAMP_JS
 @param[in] type        Event type
 @param[in] jsCallback  Callback to be removed as listener
@brief Removes a JS listener for a particular event @param [ in ] aamp Instance of AAMP_JS @param [ in ] type Event type @param [ in ] jsCallback Callback to be removed as listener