Skip to content

Commit e8455e3

Browse files
committed
Decouple Satori plugin from Nakama plugin
1 parent 46262af commit e8455e3

23 files changed

+1513
-356
lines changed

Satori/Source/SatoriBlueprints/Private/SatoriClientRequests.cpp

Lines changed: 76 additions & 76 deletions
Large diffs are not rendered by default.

Satori/Source/SatoriBlueprints/Public/SatoriClientRequests.h

Lines changed: 44 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -5,27 +5,27 @@
55
#include "CoreMinimal.h"
66
#include "SatoriClient.h"
77
#include "Kismet/BlueprintAsyncActionBase.h"
8-
#include "NakamaError.h"
8+
#include "SatoriError.h"
99

1010
#include "SatoriClientRequests.generated.h"
1111

1212
// Delegates
13-
DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams(FOnSatoriAuthenticateCustom, UNakamaSession*, Session, FNakamaError, Error);
14-
DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams(FOnSatoriAuthenticateRefresh, UNakamaSession*, Session, FNakamaError, Error);
15-
DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FOnSatoriAuthenticateLogout, FNakamaError, Error);
16-
DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams(FOnSatoriIdentify, UNakamaSession*, Session, FNakamaError, Error);
17-
DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams(FOnSatoriListIdentityProperties, FSatoriProperties, Properties, FNakamaError, Error);
18-
DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FOnSatoriUpdateProperties, FNakamaError, Error);
19-
DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FOnSatoriDeleteIdentity, FNakamaError, Error);
13+
DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams(FOnSatoriAuthenticateCustom, USatoriSession*, Session, FSatoriError, Error);
14+
DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams(FOnSatoriAuthenticateRefresh, USatoriSession*, Session, FSatoriError, Error);
15+
DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FOnSatoriAuthenticateLogout, FSatoriError, Error);
16+
DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams(FOnSatoriIdentify, USatoriSession*, Session, FSatoriError, Error);
17+
DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams(FOnSatoriListIdentityProperties, FSatoriProperties, Properties, FSatoriError, Error);
18+
DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FOnSatoriUpdateProperties, FSatoriError, Error);
19+
DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FOnSatoriDeleteIdentity, FSatoriError, Error);
2020

21-
DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FOnSatoriPostEvent, FNakamaError, Error);
22-
DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams(FOnSatoriGetExperiments, FSatoriExperimentList, Experiments, FNakamaError, Error);
23-
DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams(FOnSatoriGetFlags, FSatoriFlagList, Flags, FNakamaError, Error);
24-
DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams(FOnSatoriGetFlagOverrides, FSatoriFlagOverrideList, FlagOverrides, FNakamaError, Error);
25-
DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams(FOnSatoriGetLiveEvents, FSatoriLiveEventList, LiveEvents, FNakamaError, Error);
26-
DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams(FOnSatoriGetMessages, FSatoriMessageList, Messages, FNakamaError, Error);
27-
DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FOnSatoriUpdateMessage, FNakamaError, Error);
28-
DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FOnSatoriDeleteMessage, FNakamaError, Error);
21+
DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FOnSatoriPostEvent, FSatoriError, Error);
22+
DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams(FOnSatoriGetExperiments, FSatoriExperimentList, Experiments, FSatoriError, Error);
23+
DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams(FOnSatoriGetFlags, FSatoriFlagList, Flags, FSatoriError, Error);
24+
DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams(FOnSatoriGetFlagOverrides, FSatoriFlagOverrideList, FlagOverrides, FSatoriError, Error);
25+
DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams(FOnSatoriGetLiveEvents, FSatoriLiveEventList, LiveEvents, FSatoriError, Error);
26+
DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams(FOnSatoriGetMessages, FSatoriMessageList, Messages, FSatoriError, Error);
27+
DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FOnSatoriUpdateMessage, FSatoriError, Error);
28+
DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FOnSatoriDeleteMessage, FSatoriError, Error);
2929

3030

3131

@@ -95,7 +95,7 @@ class SATORIBLUEPRINTS_API USatoriClientAuthenticateRefresh : public UBlueprintA
9595
TObjectPtr<USatoriClient> SatoriClient;
9696

9797
UPROPERTY()
98-
TObjectPtr<UNakamaSession> UserSession;
98+
TObjectPtr<USatoriSession> UserSession;
9999

100100
UPROPERTY(BlueprintAssignable)
101101
FOnSatoriAuthenticateRefresh OnSuccess;
@@ -110,7 +110,7 @@ class SATORIBLUEPRINTS_API USatoriClientAuthenticateRefresh : public UBlueprintA
110110
* @param Client The Client to use.
111111
*/
112112
UFUNCTION(BlueprintCallable, Category = "Satori|Authentication", meta = (BlueprintInternalUseOnly = "true"))
113-
static USatoriClientAuthenticateRefresh* AuthenticateRefresh(USatoriClient* Client, UNakamaSession* Session);
113+
static USatoriClientAuthenticateRefresh* AuthenticateRefresh(USatoriClient* Client, USatoriSession* Session);
114114

115115
virtual void Activate() override;
116116
};
@@ -131,7 +131,7 @@ class SATORIBLUEPRINTS_API USatoriClientAuthenticateLogout : public UBlueprintAs
131131
TObjectPtr<USatoriClient> SatoriClient;
132132

133133
UPROPERTY()
134-
TObjectPtr<UNakamaSession> UserSession;
134+
TObjectPtr<USatoriSession> UserSession;
135135

136136
UPROPERTY(BlueprintAssignable)
137137
FOnSatoriAuthenticateLogout OnSuccess;
@@ -146,7 +146,7 @@ class SATORIBLUEPRINTS_API USatoriClientAuthenticateLogout : public UBlueprintAs
146146
* @param Client The Client to use.
147147
*/
148148
UFUNCTION(BlueprintCallable, Category = "Satori|Authentication", meta = (BlueprintInternalUseOnly = "true"))
149-
static USatoriClientAuthenticateLogout* AuthenticateLogout(USatoriClient* Client, UNakamaSession* Session);
149+
static USatoriClientAuthenticateLogout* AuthenticateLogout(USatoriClient* Client, USatoriSession* Session);
150150

151151
virtual void Activate() override;
152152
};
@@ -167,7 +167,7 @@ class SATORIBLUEPRINTS_API USatoriClientIdentify : public UBlueprintAsyncActionB
167167
TObjectPtr<USatoriClient> SatoriClient;
168168

169169
UPROPERTY()
170-
TObjectPtr<UNakamaSession> UserSession;
170+
TObjectPtr<USatoriSession> UserSession;
171171

172172
UPROPERTY(BlueprintAssignable)
173173
FOnSatoriIdentify OnSuccess;
@@ -185,7 +185,7 @@ class SATORIBLUEPRINTS_API USatoriClientIdentify : public UBlueprintAsyncActionB
185185
UFUNCTION(BlueprintCallable, Category = "Satori|Identity", meta = (BlueprintInternalUseOnly = "true", AutoCreateRefTerm = "DefaultProperties,CustomProperties"))
186186
static USatoriClientIdentify* Identify(
187187
USatoriClient* Client,
188-
UNakamaSession* Session,
188+
USatoriSession* Session,
189189
const FString& ID,
190190
const TMap<FString, FString>& DefaultProperties,
191191
const TMap<FString, FString>& CustomProperties);
@@ -214,7 +214,7 @@ class SATORIBLUEPRINTS_API USatoriClientListIdentityProperties : public UBluepri
214214
TObjectPtr<USatoriClient> SatoriClient;
215215

216216
UPROPERTY()
217-
TObjectPtr<UNakamaSession> UserSession;
217+
TObjectPtr<USatoriSession> UserSession;
218218

219219
UPROPERTY(BlueprintAssignable)
220220
FOnSatoriListIdentityProperties OnSuccess;
@@ -229,7 +229,7 @@ class SATORIBLUEPRINTS_API USatoriClientListIdentityProperties : public UBluepri
229229
* @param Client The Client to use.
230230
*/
231231
UFUNCTION(BlueprintCallable, Category = "Satori|Identity", meta = (BlueprintInternalUseOnly = "true"))
232-
static USatoriClientListIdentityProperties* ListIdentityProperties(USatoriClient* Client, UNakamaSession* Session);
232+
static USatoriClientListIdentityProperties* ListIdentityProperties(USatoriClient* Client, USatoriSession* Session);
233233

234234
virtual void Activate() override;
235235
};
@@ -250,7 +250,7 @@ class SATORIBLUEPRINTS_API USatoriClientUpdateProperties : public UBlueprintAsyn
250250
TObjectPtr<USatoriClient> SatoriClient;
251251

252252
UPROPERTY()
253-
TObjectPtr<UNakamaSession> UserSession;
253+
TObjectPtr<USatoriSession> UserSession;
254254

255255
UPROPERTY(BlueprintAssignable)
256256
FOnSatoriUpdateProperties OnSuccess;
@@ -268,7 +268,7 @@ class SATORIBLUEPRINTS_API USatoriClientUpdateProperties : public UBlueprintAsyn
268268
UFUNCTION(BlueprintCallable, Category = "Satori|Identity", meta = (BlueprintInternalUseOnly = "true", AutoCreateRefTerm = "DefaultProperties,CustomProperties"))
269269
static USatoriClientUpdateProperties* UpdateProperties(
270270
USatoriClient* Client,
271-
UNakamaSession* Session,
271+
USatoriSession* Session,
272272
const TMap<FString, FString>& DefaultProperties,
273273
const TMap<FString, FString>& CustomProperties,
274274
const bool bRecompute);
@@ -297,7 +297,7 @@ class SATORIBLUEPRINTS_API USatoriClientDeleteIdentity : public UBlueprintAsyncA
297297
TObjectPtr<USatoriClient> SatoriClient;
298298

299299
UPROPERTY()
300-
TObjectPtr<UNakamaSession> UserSession;
300+
TObjectPtr<USatoriSession> UserSession;
301301

302302
UPROPERTY(BlueprintAssignable)
303303
FOnSatoriDeleteIdentity OnSuccess;
@@ -312,7 +312,7 @@ class SATORIBLUEPRINTS_API USatoriClientDeleteIdentity : public UBlueprintAsyncA
312312
* @param Client The Client to use.
313313
*/
314314
UFUNCTION(BlueprintCallable, Category = "Satori|Identity", meta = (BlueprintInternalUseOnly = "true"))
315-
static USatoriClientDeleteIdentity* DeleteIdentity(USatoriClient* Client, UNakamaSession* Session);
315+
static USatoriClientDeleteIdentity* DeleteIdentity(USatoriClient* Client, USatoriSession* Session);
316316

317317
virtual void Activate() override;
318318
};
@@ -337,7 +337,7 @@ class SATORIBLUEPRINTS_API USatoriClientPostEvent : public UBlueprintAsyncAction
337337
TObjectPtr<USatoriClient> SatoriClient;
338338

339339
UPROPERTY()
340-
TObjectPtr<UNakamaSession> UserSession;
340+
TObjectPtr<USatoriSession> UserSession;
341341

342342
UPROPERTY(BlueprintAssignable)
343343
FOnSatoriPostEvent OnSuccess;
@@ -353,7 +353,7 @@ class SATORIBLUEPRINTS_API USatoriClientPostEvent : public UBlueprintAsyncAction
353353
* @param Client The Client to use.
354354
*/
355355
UFUNCTION(BlueprintCallable, Category = "Satori|Events", meta = (BlueprintInternalUseOnly = "true"))
356-
static USatoriClientPostEvent* PostEvent(USatoriClient* Client, UNakamaSession* Session, const TArray<FSatoriEvent>& Events);
356+
static USatoriClientPostEvent* PostEvent(USatoriClient* Client, USatoriSession* Session, const TArray<FSatoriEvent>& Events);
357357

358358
virtual void Activate() override;
359359

@@ -377,7 +377,7 @@ class SATORIBLUEPRINTS_API USatoriClientGetExperiments : public UBlueprintAsyncA
377377
TObjectPtr<USatoriClient> SatoriClient;
378378

379379
UPROPERTY()
380-
TObjectPtr<UNakamaSession> UserSession;
380+
TObjectPtr<USatoriSession> UserSession;
381381

382382
UPROPERTY(BlueprintAssignable)
383383
FOnSatoriGetExperiments OnSuccess;
@@ -393,7 +393,7 @@ class SATORIBLUEPRINTS_API USatoriClientGetExperiments : public UBlueprintAsyncA
393393
* @param Client The Client to use.
394394
*/
395395
UFUNCTION(BlueprintCallable, Category = "Satori|Experiments", meta = (BlueprintInternalUseOnly = "true", AutoCreateRefTerm = "Names"))
396-
static USatoriClientGetExperiments* GetExperiments(USatoriClient* Client, UNakamaSession* Session, const TArray<FString>& Names);
396+
static USatoriClientGetExperiments* GetExperiments(USatoriClient* Client, USatoriSession* Session, const TArray<FString>& Names);
397397

398398
virtual void Activate() override;
399399

@@ -417,7 +417,7 @@ class SATORIBLUEPRINTS_API USatoriClientGetFlags : public UBlueprintAsyncActionB
417417
TObjectPtr<USatoriClient> SatoriClient;
418418

419419
UPROPERTY()
420-
TObjectPtr<UNakamaSession> UserSession;
420+
TObjectPtr<USatoriSession> UserSession;
421421

422422
UPROPERTY(BlueprintAssignable)
423423
FOnSatoriGetFlags OnSuccess;
@@ -433,7 +433,7 @@ class SATORIBLUEPRINTS_API USatoriClientGetFlags : public UBlueprintAsyncActionB
433433
* @param Client The Client to use.
434434
*/
435435
UFUNCTION(BlueprintCallable, Category = "Satori|Flags", meta = (BlueprintInternalUseOnly = "true", AutoCreateRefTerm = "Names"))
436-
static USatoriClientGetFlags* GetFlags(USatoriClient* Client, UNakamaSession* Session, const TArray<FString>& Names);
436+
static USatoriClientGetFlags* GetFlags(USatoriClient* Client, USatoriSession* Session, const TArray<FString>& Names);
437437

438438
virtual void Activate() override;
439439

@@ -457,7 +457,7 @@ class SATORIBLUEPRINTS_API USatoriClientGetFlagOverrides : public UBlueprintAsyn
457457
TObjectPtr<USatoriClient> SatoriClient;
458458

459459
UPROPERTY()
460-
TObjectPtr<UNakamaSession> UserSession;
460+
TObjectPtr<USatoriSession> UserSession;
461461

462462
UPROPERTY(BlueprintAssignable)
463463
FOnSatoriGetFlagOverrides OnSuccess;
@@ -473,7 +473,7 @@ class SATORIBLUEPRINTS_API USatoriClientGetFlagOverrides : public UBlueprintAsyn
473473
* @param Client The Client to use.
474474
*/
475475
UFUNCTION(BlueprintCallable, Category = "Satori|Flags", meta = (BlueprintInternalUseOnly = "true", AutoCreateRefTerm = "Names"))
476-
static USatoriClientGetFlagOverrides* GetFlagOverrides(USatoriClient* Client, UNakamaSession* Session, const TArray<FString>& Names);
476+
static USatoriClientGetFlagOverrides* GetFlagOverrides(USatoriClient* Client, USatoriSession* Session, const TArray<FString>& Names);
477477

478478
virtual void Activate() override;
479479

@@ -497,7 +497,7 @@ class SATORIBLUEPRINTS_API USatoriClientGetLiveEvents : public UBlueprintAsyncAc
497497
TObjectPtr<USatoriClient> SatoriClient;
498498

499499
UPROPERTY()
500-
TObjectPtr<UNakamaSession> UserSession;
500+
TObjectPtr<USatoriSession> UserSession;
501501

502502
UPROPERTY(BlueprintAssignable)
503503
FOnSatoriGetLiveEvents OnSuccess;
@@ -513,7 +513,7 @@ class SATORIBLUEPRINTS_API USatoriClientGetLiveEvents : public UBlueprintAsyncAc
513513
* @param Client The Client to use.
514514
*/
515515
UFUNCTION(BlueprintCallable, Category = "Satori|LiveEvents", meta = (BlueprintInternalUseOnly = "true", AutoCreateRefTerm = "LiveEventNames"))
516-
static USatoriClientGetLiveEvents* GetLiveEvents(USatoriClient* Client, UNakamaSession* Session, const TArray<FString>& LiveEventNames);
516+
static USatoriClientGetLiveEvents* GetLiveEvents(USatoriClient* Client, USatoriSession* Session, const TArray<FString>& LiveEventNames);
517517

518518
virtual void Activate() override;
519519

@@ -537,7 +537,7 @@ class SATORIBLUEPRINTS_API USatoriClientGetMessages : public UBlueprintAsyncActi
537537
TObjectPtr<USatoriClient> SatoriClient;
538538

539539
UPROPERTY()
540-
TObjectPtr<UNakamaSession> UserSession;
540+
TObjectPtr<USatoriSession> UserSession;
541541

542542
UPROPERTY(BlueprintAssignable)
543543
FOnSatoriGetMessages OnSuccess;
@@ -555,7 +555,7 @@ class SATORIBLUEPRINTS_API USatoriClientGetMessages : public UBlueprintAsyncActi
555555
UFUNCTION(BlueprintCallable, Category = "Satori|Messages", meta = (BlueprintInternalUseOnly = "true"))
556556
static USatoriClientGetMessages* GetMessages(
557557
USatoriClient* Client,
558-
UNakamaSession* Session,
558+
USatoriSession* Session,
559559
int32 Limit,
560560
bool Forward,
561561
const FString& Cursor);
@@ -584,7 +584,7 @@ class SATORIBLUEPRINTS_API USatoriClientUpdateMessage : public UBlueprintAsyncAc
584584
TObjectPtr<USatoriClient> SatoriClient;
585585

586586
UPROPERTY()
587-
TObjectPtr<UNakamaSession> UserSession;
587+
TObjectPtr<USatoriSession> UserSession;
588588

589589
UPROPERTY(BlueprintAssignable)
590590
FOnSatoriUpdateMessage OnSuccess;
@@ -602,7 +602,7 @@ class SATORIBLUEPRINTS_API USatoriClientUpdateMessage : public UBlueprintAsyncAc
602602
UFUNCTION(BlueprintCallable, Category = "Satori|Messages", meta = (BlueprintInternalUseOnly = "true"))
603603
static USatoriClientUpdateMessage* UpdateMessage(
604604
USatoriClient* Client,
605-
UNakamaSession* Session,
605+
USatoriSession* Session,
606606
const FString& MessageId,
607607
const FDateTime ReadTime,
608608
const FDateTime ConsumeTime);
@@ -631,7 +631,7 @@ class SATORIBLUEPRINTS_API USatoriClientDeleteMessage : public UBlueprintAsyncAc
631631
TObjectPtr<USatoriClient> SatoriClient;
632632

633633
UPROPERTY()
634-
TObjectPtr<UNakamaSession> UserSession;
634+
TObjectPtr<USatoriSession> UserSession;
635635

636636
UPROPERTY(BlueprintAssignable)
637637
FOnSatoriDeleteMessage OnSuccess;
@@ -647,7 +647,7 @@ class SATORIBLUEPRINTS_API USatoriClientDeleteMessage : public UBlueprintAsyncAc
647647
* @param Client The Client to use.
648648
*/
649649
UFUNCTION(BlueprintCallable, Category = "Satori|Messages", meta = (BlueprintInternalUseOnly = "true"))
650-
static USatoriClientDeleteMessage* DeleteMessage(USatoriClient* Client, UNakamaSession* Session, const FString& MessageId);
650+
static USatoriClientDeleteMessage* DeleteMessage(USatoriClient* Client, USatoriSession* Session, const FString& MessageId);
651651

652652
virtual void Activate() override;
653653

Satori/Source/SatoriBlueprints/SatoriBlueprints.Build.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,7 @@ public SatoriBlueprints(ReadOnlyTargetRules Target) : base(Target)
4141
"SlateCore",
4242
"Engine",
4343
"JsonUtilities",
44-
"Json",
45-
"NakamaUnreal",
44+
"Json"
4645

4746
// ... private dependencies that you statically link with here ...
4847
}

0 commit comments

Comments
 (0)