LeviLamina
Loading...
Searching...
No Matches
OneDSEventListener.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/core/threading/Async.h"
7#include "mc/events/AggregationEventListener.h"
8#include "mc/platform/brstd/flat_map.h"
9
10// auto generated forward declare list
11// clang-format off
12namespace Bedrock::Http { class Response; }
13namespace Core { class Path; }
14namespace Json { class Value; }
15namespace Social::Events { class Event; }
16namespace Social::Events { class Property; }
17// clang-format on
18
19namespace Social::Events {
20
21class OneDSEventListener : public ::Social::Events::AggregationEventListener {
22public:
23 // member variables
24 // NOLINTBEGIN
39 // NOLINTEND
40
41public:
42 // prevent constructor by default
43 OneDSEventListener& operator=(OneDSEventListener const&);
44 OneDSEventListener(OneDSEventListener const&);
45 OneDSEventListener();
46
47public:
48 // virtual functions
49 // NOLINTBEGIN
50 virtual ~OneDSEventListener() /*override*/;
51
52 virtual void sendEvent(::Social::Events::Event const& event) /*override*/;
53
54 virtual int getEventTagsFilter() const /*override*/;
55
56 virtual bool _checkAgainstEventAllowlist(::Social::Events::Event const& event) const /*override*/;
57
58 virtual void _flushEventQueue() /*override*/;
59 // NOLINTEND
60
61public:
62 // member functions
63 // NOLINTBEGIN
64 MCNAPI void
65 AddPartA(::std::string const& eventName, ::Json::Value& eventBody, int64 eventTimestamp, bool isSafetyEvent);
66
67 MCNAPI void AddPartAExtensions(::Json::Value& eventBody);
68
69 MCNAPI void AddPartC(::Social::Events::Event const& event, ::Json::Value& eventBody);
70
71 MCNAPI ::std::string BuildCommonSchemaMsg(::Social::Events::Event const& event);
72
73 MCNAPI explicit OneDSEventListener(::Core::Path logFileName);
74
76 ::Json::Value& properties,
78 ::std::string,
79 ::std::vector<::Social::Events::Property>,
80 ::std::less<::std::string>,
81 ::std::vector<::std::string>,
82 ::std::vector<::std::vector<::Social::Events::Property>>> const& dynamicProperties
83 );
84
85 MCNAPI ::std::vector<::std::string> _buildEventPayloads(
86 ::std::vector<::Social::Events::Event> events,
87 ::std::function<void(::std::string const&, ::std::string const&)> onEventSerialized
88 );
89
91
92 MCNAPI bool _sendBatch();
93
94 MCNAPI void _sendEvents(::std::string const& eventPayload, ::std::string const& endpoint);
95 // NOLINTEND
96
97public:
98 // static variables
99 // NOLINTBEGIN
100 MCNAPI static ::std::string const& ENDPOINT_IDENTIFIER();
101
102 MCNAPI static ::std::string const& ONEDS_URL();
103
104 MCNAPI static ::std::string const& PARTA_IDENTIFIER();
105
106 MCNAPI static ::std::string const& SAFETY_ENDPOINT_IDENTIFIER();
107
108 MCNAPI static ::std::string const& SAFETY_PARTA_IDENTIFIER();
109 // NOLINTEND
110
111public:
112 // constructor thunks
113 // NOLINTBEGIN
114 MCNAPI void* $ctor(::Core::Path logFileName);
115 // NOLINTEND
116
117public:
118 // destructor thunk
119 // NOLINTBEGIN
120 MCNAPI void $dtor();
121 // NOLINTEND
122
123public:
124 // virtual function thunks
125 // NOLINTBEGIN
126 MCNAPI void $sendEvent(::Social::Events::Event const& event);
127
128 MCNAPI int $getEventTagsFilter() const;
129
131
132 MCNAPI void $_flushEventQueue();
133
134
135 // NOLINTEND
136
137public:
138 // vftables
139 // NOLINTBEGIN
140 MCNAPI static void** $vftable();
141 // NOLINTEND
142};
143
144} // namespace Social::Events
Definition Response.h:7
Definition Async.h:8
Definition Path.h:12
Definition Value.h:16
Definition AggregationEventListener.h:18
Definition Event.h:19
MCAPI void _sendEvents(::std::string const &eventPayload, ::std::string const &endpoint)
MCAPI OneDSEventListener(::Core::Path logFileName)
MCAPI void AddPartC(::Social::Events::Event const &event, ::Json::Value &eventBody)
static MCAPI void ** $vftable()
MCAPI void AddPartAExtensions(::Json::Value &eventBody)
static MCAPI ::std::string const & ENDPOINT_IDENTIFIER()
static MCAPI ::std::string const & SAFETY_PARTA_IDENTIFIER()
MCAPI void AddPartA(::std::string const &eventName, ::Json::Value &eventBody, int64 eventTimestamp, bool isSafetyEvent)
MCAPI void * $ctor(::Core::Path logFileName)
static MCAPI ::std::string const & SAFETY_ENDPOINT_IDENTIFIER()
MCAPI bool $_checkAgainstEventAllowlist(::Social::Events::Event const &event) const
MCAPI void _handleAsyncResponse(::Bedrock::Threading::Async<::Bedrock::Http::Response > asyncResponse)
MCAPI int $getEventTagsFilter() const
MCAPI ::std::vector<::std::string > _buildEventPayloads(::std::vector<::Social::Events::Event > events, ::std::function< void(::std::string const &, ::std::string const &)> onEventSerialized)
MCAPI void $sendEvent(::Social::Events::Event const &event)
static MCAPI ::std::string const & PARTA_IDENTIFIER()
static MCAPI ::std::string const & ONEDS_URL()
MCAPI void _addDynamicPropertiesFromEvent(::Json::Value &properties, ::brstd::flat_map< ::std::string, ::std::vector<::Social::Events::Property >, ::std::less<::std::string >, ::std::vector<::std::string >, ::std::vector<::std::vector<::Social::Events::Property > > > const &dynamicProperties)
MCAPI::std::string BuildCommonSchemaMsg(::Social::Events::Event const &event)
Definition Property.h:7
Definition flat_map.h:15
Definition Alias.h:14