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 AddPartC(::Social::Events::Event const& event, ::Json::Value& eventBody);
68
69 MCNAPI ::std::string BuildCommonSchemaMsg(::Social::Events::Event const& event);
70
71 MCNAPI explicit OneDSEventListener(::Core::Path logFileName);
72
74 ::Json::Value& properties,
76 ::std::string,
77 ::std::vector<::Social::Events::Property>,
78 ::std::less<::std::string>,
79 ::std::vector<::std::string>,
80 ::std::vector<::std::vector<::Social::Events::Property>>> const& dynamicProperties
81 );
82
83 MCNAPI ::std::vector<::std::string> _buildEventPayloads(
84 ::std::vector<::Social::Events::Event> events,
85 ::std::function<void(::std::string const&, ::std::string const&)> onEventSerialized
86 );
87
89
90 MCNAPI bool _sendBatch();
91
92 MCNAPI void _sendEvents(::std::string const& eventPayload, ::std::string const& endpoint);
93 // NOLINTEND
94
95public:
96 // static variables
97 // NOLINTBEGIN
98 MCNAPI static ::std::string const& ENDPOINT_IDENTIFIER();
99
100 MCNAPI static ::std::string const& ONEDS_URL();
101
102 MCNAPI static ::std::string const& PARTA_IDENTIFIER();
103
104 MCNAPI static ::std::string const& SAFETY_ENDPOINT_IDENTIFIER();
105
106 MCNAPI static ::std::string const& SAFETY_PARTA_IDENTIFIER();
107 // NOLINTEND
108
109public:
110 // constructor thunks
111 // NOLINTBEGIN
112 MCNAPI void* $ctor(::Core::Path logFileName);
113 // NOLINTEND
114
115public:
116 // destructor thunk
117 // NOLINTBEGIN
118 MCNAPI void $dtor();
119 // NOLINTEND
120
121public:
122 // virtual function thunks
123 // NOLINTBEGIN
124 MCNAPI void $sendEvent(::Social::Events::Event const& event);
125
126 MCNAPI int $getEventTagsFilter() const;
127
129
130 MCNAPI void $_flushEventQueue();
131
132
133 // NOLINTEND
134
135public:
136 // vftables
137 // NOLINTBEGIN
138 MCNAPI static void** $vftable();
139 // NOLINTEND
140};
141
142} // namespace Social::Events
Definition Response.h:13
Definition Async.h:8
Definition Path.h:10
Definition Value.h:16
Definition AggregationEventListener.h:18
Definition Event.h:18
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()
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:8
Definition Alias.h:14