81 UPROPERTY(BlueprintReadOnly)
89 UPROPERTY(BlueprintReadOnly)
92 UPROPERTY(BlueprintReadOnly)
95 UPROPERTY(BlueprintReadWrite, Meta=(DisplayName=
"Module Id"))
98 UPROPERTY(BlueprintReadOnly)
99 FString ModuleVersion;
101 UPROPERTY(BlueprintReadOnly)
104 UPROPERTY(BlueprintReadOnly)
107 UPROPERTY(BlueprintReadOnly)
110 UPROPERTY(BlueprintReadOnly)
113 UPROPERTY(BlueprintReadOnly)
114 FGuid CurrentSessionGuid;
116 UPROPERTY(BlueprintReadOnly)
118#pragma endregion PublicProperties
122 UPROPERTY(BlueprintReadOnly)
123 bool bSessionInProgress;
125 UPROPERTY(BlueprintReadOnly)
126 bool bWebSocketEnabled;
131 virtual void Initialize(FSubsystemCollectionBase& Collection)
override;
133 UFUNCTION(BlueprintCallable, Category =
"Apex|API")
136 UFUNCTION(BlueprintPure, BlueprintCallable, Category = "
Apex|API")
137 bool HasLaunchAuthToken();
139 UFUNCTION(BlueprintPure, BlueprintCallable, Category = "
Apex|API")
142 UFUNCTION(BlueprintCallable, Category = "
Apex|API")
143 void LoginWithAuthToken();
145 UFUNCTION(BlueprintCallable, Category = "
Apex|API")
146 void Login(const FString& InUserName, const FString& InPassword,
bool bShouldLogout = true);
148 UFUNCTION(BlueprintCallable, Category = "
Apex|API")
151 UFUNCTION(BlueprintCallable, Category = "
Apex|API")
152 bool IsWebSocketConnected();
154 UFUNCTION(BlueprintCallable, Category = "
Apex|API", meta = (Tooltip = "This function only needs to be called when a user has logged out."))
155 void ConnectWebSocketService();
157 UFUNCTION(BlueprintCallable, Category = "
Apex|API")
158 void RequestAuthorizationCode();
160 UFUNCTION(BlueprintCallable, Category = "
Apex|API")
163 UFUNCTION(BlueprintCallable, Category = "
Apex|API")
166 UFUNCTION(BlueprintCallable, Category = "
Apex|API")
169 UFUNCTION(BlueprintCallable, Category = "
Apex|API")
170 bool FetchTopTen(FString Scenario,
int OrgUnit);
172 UFUNCTION(BlueprintCallable, Category = "
Apex|API", meta = (DisplayName = "Fetch Top Ten By User"))
173 bool FetchTopTenByCurrentUser(FString Scenario);
175 UFUNCTION(BlueprintCallable, Category = "
Apex|API", meta=(DisplayName = "Fetch Top Ten By User"))
176 bool FetchTopTenByUser(
int UserId, FString Scenario,
int OrgUnit);
178 UFUNCTION(BlueprintCallable, Category = "
Apex|API")
179 bool FetchTopTenByTimeRange(
float TimePriorToToday, FString Scenario,
int OrgUnit);
181 UFUNCTION(BlueprintCallable, Category = "
Apex|API")
182 void FilloutLaunchToken();
184 UFUNCTION(BlueprintCallable, Category = "
Apex|API")
185 void VerifyModuleAccess(
int InModuleId);
189#pragma region PrivateFunctions
190 TSharedRef<FJsonObject> GetUserJsonObject(TSharedRef<FJsonObject>& RootJsonObject);
191 bool FetchTopTen(
int UserId,
float TimePriorToToday, FString Scenario,
int OrgUnit);
192 void HandleLogin(
class UVaRestJsonObject* LoginJsonObject);
193 void SetupModuleSettings();
194 void SendHeartbeat();
196 void OnLoginComplete(
const class UVaRestRequestJSON* Request);
197 void OnLoginFail(
const class UVaRestRequestJSON* Request);
198 void OnLogoutComplete(
const class UVaRestRequestJSON* Request);
199 void OnLogoutFail(
const class UVaRestRequestJSON* Request);
200 void OnUserVerificationComplete(
const class UVaRestRequestJSON* Request);
201 void OnUserVerificationFail(
const class UVaRestRequestJSON* Request);
202 void OnPingComplete(
const class UVaRestRequestJSON* Request);
203 void OnPingFail(
const class UVaRestRequestJSON* Request);
204 void OnJoinSessionComplete(
const class UVaRestRequestJSON* Request);
205 void OnJoinSessionFail(
const class UVaRestRequestJSON* Request);
206 void OnCompleteSessionComplete(
const class UVaRestRequestJSON* Request);
207 void OnCompleteSessionFail(
const class UVaRestRequestJSON* Request);
208 void OnSendSessionEventComplete(
const class UVaRestRequestJSON* Request);
209 void OnSendSessionEventFail(
const class UVaRestRequestJSON* Request);
210 void OnTopTenComplete(
const class UVaRestRequestJSON* Request);
211 void OnTopTenFail(
const class UVaRestRequestJSON* Request);
212#pragma endregion PrivateFunctions
216#pragma region PrivateVariables
217 class UVaRestSubsystem* VaRestSubsystem;
222 FTimerHandle HeartbeatHandle;
225 TUniquePtr<ApexWebSocket> ApexSocket;
226#pragma endregion PrivateVariables
232 UPROPERTY(BlueprintAssignable, Category =
"Apex|Event")
233 FOnApexRequestComplete OnRequestComplete;
235 UPROPERTY(BlueprintAssignable, Category = "
Apex|Event")
236 FOnApexRequestFail OnRequestFail;
238 FOnStaticApexRequestComplete OnStaticRequestComplete;
239 FOnStaticApexRequestFail OnStaticRequestFail;
242 UPROPERTY(BlueprintAssignable, Category = "
Apex|Event")
243 FOnApexTopTenDataComplete OnFetchTopTenComplete;
245 UPROPERTY(BlueprintAssignable, Category = "
Apex|Event")
246 FOnApexTopTenDataFail OnFetchTopTenFail;
248 FOnStaticApexTopTenDataComplete OnStaticFetchTopTenComplete;
250 FOnStaticApexTopTenDataFail OnStaticFetchTopTenFail;
253 UPROPERTY(BlueprintAssignable, Category = "
Apex|Event")
254 FOnApexWebSocketConnected OnWebSocketConnected;
256 UPROPERTY(BlueprintAssignable, Category = "
Apex|Event")
257 FOnApexWebSocketConnectFailed OnWebSocketConnectFailed;
259 UPROPERTY(BlueprintAssignable, Category = "
Apex|Event")
260 FOnApexWebSocketDisconnected OnWebSocketDisconnected;
262 UPROPERTY(BlueprintAssignable, Category = "
Apex|Event")
263 FOnApexAuthCodeRetrieved OnAuthorizationCodeRetrieved;
265 FOnStaticApexWebSocketConnected OnStaticWebSocketConnected;
267 FOnStaticApexWebSocketConnectFailed OnStaticWebSocketConnectFailed;
269 FOnStaticApexWebSocketDisconnected OnStaticWebSocketDisconnected;
271 FOnStaticApexAuthCodeRetrieved OnStaticAuthorizationCodeRetrieved;
272#pragma endregion Events