82 UPROPERTY(BlueprintReadOnly)
90 UPROPERTY(BlueprintReadOnly)
93 UPROPERTY(BlueprintReadOnly)
96 UPROPERTY(BlueprintReadWrite, Meta=(DisplayName=
"Module Id"))
99 UPROPERTY(BlueprintReadOnly)
100 FString ModuleVersion;
102 UPROPERTY(BlueprintReadOnly)
105 UPROPERTY(BlueprintReadOnly)
108 UPROPERTY(BlueprintReadOnly)
111 UPROPERTY(BlueprintReadOnly)
114 UPROPERTY(BlueprintReadOnly)
115 FGuid CurrentSessionGuid;
117 UPROPERTY(BlueprintReadOnly)
120#pragma endregion PublicProperties
124 UPROPERTY(BlueprintReadOnly)
125 bool bSessionInProgress;
127 UPROPERTY(BlueprintReadOnly)
128 bool bWebSocketEnabled;
130 UPROPERTY(BlueprintReadOnly)
131 FString ReturnTarget;
133 UPROPERTY(BlueprintReadOnly)
134 FString ReturnTargetType;
136 UPROPERTY(BlueprintReadOnly)
137 FString ReturnParameters;
142 virtual
void Initialize(FSubsystemCollectionBase& Collection) override;
144 UFUNCTION(BlueprintCallable, Category = "
Apex|API")
145 void ExitApplication(const FString& InReturnTarget, const FString& InReturnTargetType);
147 UFUNCTION(BlueprintCallable, Category = "
Apex|API")
150 UFUNCTION(BlueprintPure, BlueprintCallable, Category = "
Apex|API")
151 bool HasLaunchAuthToken();
153 UFUNCTION(BlueprintPure, BlueprintCallable, Category = "
Apex|API")
156 UFUNCTION(BlueprintCallable, Category = "
Apex|API")
157 void LoginWithAuthToken();
159 UFUNCTION(BlueprintCallable, Category = "
Apex|API")
160 void Login(const FString& InUserName, const FString& InPassword,
bool bShouldLogout = true);
162 UFUNCTION(BlueprintCallable, Category = "
Apex|API")
165 UFUNCTION(BlueprintCallable, Category = "
Apex|API")
166 bool IsWebSocketConnected();
168 UFUNCTION(BlueprintCallable, Category = "
Apex|API", meta = (Tooltip = "This function only needs to be called when a user has logged out."))
169 void ConnectWebSocketService();
171 UFUNCTION(BlueprintCallable, Category = "
Apex|API")
172 void RequestAuthorizationCode();
174 UFUNCTION(BlueprintCallable, Category = "
Apex|API")
177 UFUNCTION(BlueprintCallable, Category = "
Apex|API")
180 UFUNCTION(BlueprintCallable, Category = "
Apex|API")
183 UFUNCTION(BlueprintCallable, Category = "
Apex|API")
184 bool FetchTopTen(FString Scenario,
int OrgUnit);
186 UFUNCTION(BlueprintCallable, Category = "
Apex|API", meta = (DisplayName = "Fetch Top Ten By User"))
187 bool FetchTopTenByCurrentUser(FString Scenario);
189 UFUNCTION(BlueprintCallable, Category = "
Apex|API", meta=(DisplayName = "Fetch Top Ten By User"))
190 bool FetchTopTenByUser(
int UserId, FString Scenario,
int OrgUnit);
192 UFUNCTION(BlueprintCallable, Category = "
Apex|API")
193 bool FetchTopTenByTimeRange(
float TimePriorToToday, FString Scenario,
int OrgUnit);
195 UFUNCTION(BlueprintCallable, Category = "
Apex|API")
196 void FilloutLaunchToken();
198 UFUNCTION(BlueprintCallable, Category = "
Apex|API")
199 void VerifyModuleAccess(
int InModuleId);
202 UFUNCTION(BlueprintCallable, Category = "
Apex|SDK")
203 void SetExitTarget(const FString& InExitTarget, const FString& InExitTargetType);
205 UFUNCTION(BlueprintCallable, Category = "
Apex|SDK")
206 void SetExitParameters(const FString& SetExitTarget);
210#pragma region PrivateFunctions
211 TSharedRef<FJsonObject> GetUserJsonObject(TSharedRef<FJsonObject>& RootJsonObject);
212 bool FetchTopTen(
int UserId,
float TimePriorToToday, FString Scenario,
int OrgUnit);
213 void HandleLogin(
class UVaRestJsonObject* LoginJsonObject);
214 void SetupModuleSettings();
215 void SendHeartbeat();
216 void ParseIntentData(
const FString& InIntentData);
218 void OnLoginComplete(
const class UVaRestRequestJSON* Request);
219 void OnLoginFail(
const class UVaRestRequestJSON* Request);
220 void OnLogoutComplete(
const class UVaRestRequestJSON* Request);
221 void OnLogoutFail(
const class UVaRestRequestJSON* Request);
222 void OnUserVerificationComplete(
const class UVaRestRequestJSON* Request);
223 void OnUserVerificationFail(
const class UVaRestRequestJSON* Request);
224 void OnPingComplete(
const class UVaRestRequestJSON* Request);
225 void OnPingFail(
const class UVaRestRequestJSON* Request);
226 void OnJoinSessionComplete(
const class UVaRestRequestJSON* Request);
227 void OnJoinSessionFail(
const class UVaRestRequestJSON* Request);
228 void OnCompleteSessionComplete(
const class UVaRestRequestJSON* Request);
229 void OnCompleteSessionFail(
const class UVaRestRequestJSON* Request);
230 void OnSendSessionEventComplete(
const class UVaRestRequestJSON* Request);
231 void OnSendSessionEventFail(
const class UVaRestRequestJSON* Request);
232 void OnTopTenComplete(
const class UVaRestRequestJSON* Request);
233 void OnTopTenFail(
const class UVaRestRequestJSON* Request);
234#pragma endregion PrivateFunctions
238#pragma region PrivateVariables
239 class UVaRestSubsystem* VaRestSubsystem;
244 FTimerHandle HeartbeatHandle;
247 TUniquePtr<ApexWebSocket> ApexSocket;
248#pragma endregion PrivateVariables
254 UPROPERTY(BlueprintAssignable, Category =
"Apex|Event")
255 FOnApexRequestComplete OnRequestComplete;
257 UPROPERTY(BlueprintAssignable, Category = "
Apex|Event")
258 FOnApexRequestFail OnRequestFail;
260 FOnStaticApexRequestComplete OnStaticRequestComplete;
261 FOnStaticApexRequestFail OnStaticRequestFail;
264 UPROPERTY(BlueprintAssignable, Category = "
Apex|Event")
265 FOnApexTopTenDataComplete OnFetchTopTenComplete;
267 UPROPERTY(BlueprintAssignable, Category = "
Apex|Event")
268 FOnApexTopTenDataFail OnFetchTopTenFail;
270 FOnStaticApexTopTenDataComplete OnStaticFetchTopTenComplete;
272 FOnStaticApexTopTenDataFail OnStaticFetchTopTenFail;
275 UPROPERTY(BlueprintAssignable, Category = "
Apex|Event")
276 FOnApexWebSocketConnected OnWebSocketConnected;
278 UPROPERTY(BlueprintAssignable, Category = "
Apex|Event")
279 FOnApexWebSocketConnectFailed OnWebSocketConnectFailed;
281 UPROPERTY(BlueprintAssignable, Category = "
Apex|Event")
282 FOnApexWebSocketDisconnected OnWebSocketDisconnected;
284 UPROPERTY(BlueprintAssignable, Category = "
Apex|Event")
285 FOnApexAuthCodeRetrieved OnAuthorizationCodeRetrieved;
287 FOnStaticApexWebSocketConnected OnStaticWebSocketConnected;
289 FOnStaticApexWebSocketConnectFailed OnStaticWebSocketConnectFailed;
291 FOnStaticApexWebSocketDisconnected OnStaticWebSocketDisconnected;
293 FOnStaticApexAuthCodeRetrieved OnStaticAuthorizationCodeRetrieved;
294#pragma endregion Events