RDK Documentation (Open Sourced RDK Components)
AAMP_JSListener Class Reference

Event listener impl for AAMP events. More...

Inheritance diagram for AAMP_JSListener:
Inheritance graph
Collaboration diagram for AAMP_JSListener:
Collaboration graph

Public Member Functions

 AAMP_JSListener (AAMP_JS *aamp, AAMPEventType type, JSObjectRef jsCallback)
 
virtual ~AAMP_JSListener ()
 AAMP_JSListener Destructor.
 
 AAMP_JSListener (const AAMP_JSListener &)=delete
 AAMP_JSListener Copy Constructor.
 
AAMP_JSListeneroperator= (const AAMP_JSListener &)=delete
 AAMP_JSListener Assignment operator overloading.
 
void Event (const AAMPEventPtr &e)
 Dispatch JS event for the corresponding AAMP event. More...
 
virtual void setEventProperties (const AAMPEventPtr &e, JSContextRef context, JSObjectRef eventObj)
 Set JS event properties. More...
 
- Public Member Functions inherited from AAMPEventObjectListener
void SendEvent (const AAMPEventPtr &event) override
 API to send event. More...
 
virtual ~AAMPEventObjectListener ()
 AAMPEventListener destructor.
 
- Public Member Functions inherited from EventListener
virtual ~EventListener ()
 EventListener destructor.
 

Static Public Member Functions

static void AddEventListener (AAMP_JS *aamp, AAMPEventType type, JSObjectRef jsCallback)
 Adds a JS function as listener for a particular event. More...
 
static void RemoveEventListener (AAMP_JS *aamp, AAMPEventType type, JSObjectRef jsCallback)
 Removes a JS listener for a particular event. More...
 

Data Fields

AAMP_JS_aamp
 
AAMPEventType _type
 
JSObjectRef _jsCallback
 
AAMP_JSListener_pNext
 

yes

Event listener impl for AAMP events.

Definition at line 637 of file jsbindings.cpp.

Constructor & Destructor Documentation

◆ AAMP_JSListener()

AAMP_JSListener::AAMP_JSListener ( AAMP_JS aamp,
AAMPEventType  type,
JSObjectRef  jsCallback 
)
inline
@brief AAMP_JSListener Constructor
Parameters
[in]aampinstance of AAMP_JS
[in]typeevent type
[in]jsCallbackcallback to be registered as listener

Definition at line 651 of file jsbindings.cpp.

Member Function Documentation

◆ AddEventListener()

void AAMP_JSListener::AddEventListener ( AAMP_JS aamp,
AAMPEventType  type,
JSObjectRef  jsCallback 
)
static

Adds a JS function as listener for a particular event.

Parameters
[in]aampjsObj instance of AAMP_JS
[in]typeevent type
[in]jsCallbackcallback to be registered as listener

Definition at line 1953 of file jsbindings.cpp.

◆ RemoveEventListener()

void AAMP_JSListener::RemoveEventListener ( AAMP_JS aamp,
AAMPEventType  type,
JSObjectRef  jsCallback 
)
static

Removes a JS listener for a particular event.

Parameters
[in]aampinstance of AAMP_JS
[in]typeevent type
[in]jsCallbackcallback to be removed as listener

Definition at line 2130 of file jsbindings.cpp.

◆ Event()

void AAMP_JSListener::Event ( const AAMPEventPtr &  e)
inlinevirtual

Dispatch JS event for the corresponding AAMP event.

Parameters
[in]eAAMP event object

Implements AAMPEventObjectListener.

Definition at line 685 of file jsbindings.cpp.

◆ setEventProperties()


The documentation for this class was generated from the following file: