LeviLamina
Loading...
Searching...
No Matches
AggregationEventListener.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/core/utility/NonOwnerPointer.h"
7#include "mc/events/IEventListener.h"
8
9// auto generated forward declare list
10// clang-format off
11class AppPlatform;
12namespace Core { class Path; }
13namespace Social::Events { class Event; }
14// clang-format on
15
16namespace Social::Events {
17
18class AggregationEventListener : public ::Social::Events::IEventListener {
19public:
20 // member variables
21 // NOLINTBEGIN
37 // NOLINTEND
38
39public:
40 // prevent constructor by default
41 AggregationEventListener& operator=(AggregationEventListener const&);
42 AggregationEventListener(AggregationEventListener const&);
43 AggregationEventListener();
44
45public:
46 // virtual functions
47 // NOLINTBEGIN
48 virtual ~AggregationEventListener() /*override*/;
49
50 virtual void recordEvent(
51 ::Social::Events::Event const& event,
53 ) /*override*/;
54
55 virtual void sendEvents(bool forceSend) /*override*/;
56
57 virtual void sendEvent(::Social::Events::Event const& event) = 0;
58
59 virtual void stopDebugEventLogging() /*override*/;
60
61 virtual void _flushEventQueue();
62
63 virtual bool _checkAgainstEventAllowlist(::Social::Events::Event const& event) const;
64
65 virtual bool _isListenerReadyForEvents() const;
66 // NOLINTEND
67
68public:
69 // member functions
70 // NOLINTBEGIN
71 MCNAPI explicit AggregationEventListener(::Core::Path const& logFileName);
72
73#ifdef LL_PLAT_C
74 MCNAPI AggregationEventListener(
75 uint regBatchSize,
76 uint regSendInterval,
77 uint throttledSendInterval,
78 ::Core::Path const& logFileName
79 );
80#endif
81
82 MCNAPI void _handleAggregation(
83 ::std::deque<::Social::Events::Event>& listOfSameTypeEvents,
84 ::Social::Events::Event const& event
85 );
86
87 MCNAPI bool _needToSendAggregatedEvents() const;
88
90 ::Social::Events::Event const& event,
91 ::std::unordered_map<::std::string, ::std::deque<::Social::Events::Event>>& eventQueue
92 );
93
94 MCNAPI void _sendCustomAggregatedEvents(bool forceSend);
95
96 MCNAPI void _sendEvents(::std::unordered_map<::std::string, ::std::deque<::Social::Events::Event>>& queueToSend);
97
98 MCNAPI void _sendNextEvent(::std::unordered_map<::std::string, ::std::deque<::Social::Events::Event>>& queueToSend);
99 // NOLINTEND
100
101public:
102 // constructor thunks
103 // NOLINTBEGIN
104 MCNAPI void* $ctor(::Core::Path const& logFileName);
105
106#ifdef LL_PLAT_C
107 MCNAPI void*
108 $ctor(uint regBatchSize, uint regSendInterval, uint throttledSendInterval, ::Core::Path const& logFileName);
109#endif
110 // NOLINTEND
111
112public:
113 // destructor thunk
114 // NOLINTBEGIN
115 MCNAPI void $dtor();
116 // NOLINTEND
117
118public:
119 // virtual function thunks
120 // NOLINTBEGIN
121 MCNAPI void
123
124 MCNAPI void $sendEvents(bool forceSend);
125
127
128 MCNAPI void $_flushEventQueue();
129
131
132 MCNAPI bool $_isListenerReadyForEvents() const;
133
134
135 // NOLINTEND
136
137public:
138 // vftables
139 // NOLINTBEGIN
140 MCNAPI static void** $vftable();
141 // NOLINTEND
142};
143
144} // namespace Social::Events
Definition AppPlatform.h:91
Definition NonOwnerPointer.h:9
Definition Path.h:17
MCAPI bool _needToSendAggregatedEvents() const
MCAPI AggregationEventListener(::Core::Path const &logFileName)
MCAPI void $recordEvent(::Social::Events::Event const &event, ::Bedrock::NonOwnerPointer<::AppPlatform > const &appPlatform)
MCAPI void * $ctor(::Core::Path const &logFileName)
MCAPI void _sendCustomAggregatedEvents(bool forceSend)
MCAPI void _sendEvents(::std::unordered_map<::std::string, ::std::deque<::Social::Events::Event > > &queueToSend)
MCAPI void $sendEvents(bool forceSend)
MCAPI void _sendNextEvent(::std::unordered_map<::std::string, ::std::deque<::Social::Events::Event > > &queueToSend)
MCAPI void _recordAggregatedEvent(::Social::Events::Event const &event, ::std::unordered_map<::std::string, ::std::deque<::Social::Events::Event > > &eventQueue)
MCAPI void _handleAggregation(::std::deque<::Social::Events::Event > &listOfSameTypeEvents, ::Social::Events::Event const &event)
MCAPI bool $_checkAgainstEventAllowlist(::Social::Events::Event const &event) const
Definition Event.h:18
Definition IEventListener.h:16
Definition Alias.h:14