RDK Documentation (Open Sourced RDK Components)
FakeAampEventManager.cpp
1 /*
2 * If not stated otherwise in this file or this component's license file the
3 * following copyright and licenses apply:
4 *
5 * Copyright 2022 RDK Management
6 *
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
10 *
11 * http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 */
19 
20 #include "AampEventManager.h"
21 #include "MockAampEventManager.h"
22 
23 MockAampEventManager *g_mockAampEventManager = nullptr;
24 
26 {
27 }
28 
30 {
31 }
32 
34 {
35 }
36 
38 {
39 }
40 
41 void AampEventManager::SendEvent(const AAMPEventPtr &eventData, AAMPEventMode eventMode)
42 {
43  if (g_mockAampEventManager != nullptr)
44  {
45  g_mockAampEventManager->SendEvent(eventData, eventMode);
46  }
47 }
48 
50 {
51 }
52 
54 {
55 }
56 
58 {
59 }
60 
62 {
63  if (g_mockAampEventManager != nullptr)
64  {
65  return g_mockAampEventManager->IsEventListenerAvailable(eventType);
66  }
67  else
68  {
69  return false;
70  }
71 }
72 
73 void AampEventManager::SetFakeTuneFlag(bool isFakeTuneSetting)
74 {
75 }
76 
77 void AampEventManager::SetAsyncTuneState(bool isAsyncTuneSetting)
78 {
79 }
80 
82 {
83 }
84 
86 {
87  return false;
88 }
AampEventManager.h
Event Handler for AAMP Player.
AampEventManager::AampEventManager
AampEventManager(AampLogManager *logObj)
Default Constructor.
Definition: AampEventManager.cpp:49
EventListener
Class for sed event to Listener.
Definition: AampEventListener.h:35
AampEventManager::SetPlayerState
void SetPlayerState(PrivAAMPState state)
SetPlayerState - Flag to update player state.
Definition: AampEventManager.cpp:264
AampEventManager::SetFakeTuneFlag
void SetFakeTuneFlag(bool isFakeTuneSetting)
SetFakeTuneFlag - Some events are restricted for FakeTune.
Definition: AampEventManager.cpp:236
AampEventManager::AddEventListener
void AddEventListener(AAMPEventType eventType, EventListener *eventListener)
AddEventListener - Register listener for one eventtype.
Definition: AampEventManager.cpp:155
AampLogManager
AampLogManager Class.
Definition: AampLogManager.h:150
AampEventManager::~AampEventManager
~AampEventManager()
Destructor Function.
Definition: AampEventManager.cpp:63
AAMPEventMode
AAMPEventMode
AAMP event modes.
Definition: AampEvent.h:97
AampEventManager::IsSpecificEventListenerAvailable
bool IsSpecificEventListenerAvailable(AAMPEventType eventType)
IsSpecificEventListenerAvailable - Check if this particular listener present for this event.
Definition: AampEventManager.cpp:206
AampEventManager::IsEventListenerAvailable
bool IsEventListenerAvailable(AAMPEventType eventType)
IsEventListenerAvailable - Check if any listners present for this event.
Definition: AampEventManager.cpp:221
PrivAAMPState
PrivAAMPState
Mapping all required status codes based on JS player requirement. These requirements may be forced by...
Definition: AampEvent.h:156
AampEventManager::AddListenerForAllEvents
void AddListenerForAllEvents(EventListener *eventListener)
AddListenerForAllEvents - Register one listener for all events.
Definition: AampEventManager.cpp:125
AampEventManager::RemoveListenerForAllEvents
void RemoveListenerForAllEvents(EventListener *eventListener)
RemoveListenerForAllEvents - Remove listener for all events.
Definition: AampEventManager.cpp:140
AampEventManager::SendEvent
void SendEvent(const AAMPEventPtr &eventData, AAMPEventMode eventMode=AAMP_EVENT_DEFAULT_MODE)
SendEvent - Generic function to send events.
Definition: AampEventManager.cpp:274
AampEventManager::FlushPendingEvents
void FlushPendingEvents()
FlushPendingEvents - Clear all pending events from EventManager.
Definition: AampEventManager.cpp:85
AAMPEventType
AAMPEventType
Type of the events sending to the JSPP player.
Definition: AampEvent.h:44
AampEventManager::SetAsyncTuneState
void SetAsyncTuneState(bool isAsyncTuneSetting)
SetAsyncTuneState - Flag for Async Tune.
Definition: AampEventManager.cpp:246
AampEventManager::RemoveEventListener
void RemoveEventListener(AAMPEventType eventType, EventListener *eventListener)
RemoveEventListener - Remove one listener registration for one event.
Definition: AampEventManager.cpp:179
MockAampEventManager
Definition: MockAampEventManager.h:26