diff --git a/Source/modio/Private/BlueprintCallbackProxies/CallbackProxy_GalaxyAuth.cpp b/Source/modio/Private/BlueprintCallbackProxies/CallbackProxy_GalaxyAuth.cpp index cc001e7..9161990 100644 --- a/Source/modio/Private/BlueprintCallbackProxies/CallbackProxy_GalaxyAuth.cpp +++ b/Source/modio/Private/BlueprintCallbackProxies/CallbackProxy_GalaxyAuth.cpp @@ -10,12 +10,13 @@ UCallbackProxy_GalaxyAuth::UCallbackProxy_GalaxyAuth(const FObjectInitializer &O { } -UCallbackProxy_GalaxyAuth *UCallbackProxy_GalaxyAuth::GalaxyAuth( UObject *WorldContext, const FString& Appdata ) +UCallbackProxy_GalaxyAuth *UCallbackProxy_GalaxyAuth::GalaxyAuth( UObject *WorldContext, const FString& Appdata, bool bTermsAgreed) { UCallbackProxy_GalaxyAuth *Proxy = NewObject(); Proxy->SetFlags(RF_StrongRefOnFrame); Proxy->Appdata = Appdata; Proxy->WorldContextObject = WorldContext; + Proxy->bTermsAgreed = bTermsAgreed; return Proxy; } @@ -25,7 +26,7 @@ void UCallbackProxy_GalaxyAuth::Activate() FModioSubsystemPtr Modio = FModioSubsystem::Get( World ); if( Modio.IsValid() ) { - Modio->GalaxyAuth( Appdata, FModioGenericDelegate::CreateUObject( this, &UCallbackProxy_GalaxyAuth::OnGalaxyAuthDelegate ) ); + Modio->GalaxyAuth( Appdata, bTermsAgreed, FModioGenericDelegate::CreateUObject( this, &UCallbackProxy_GalaxyAuth::OnGalaxyAuthDelegate ) ); } else { diff --git a/Source/modio/Private/BlueprintCallbackProxies/CallbackProxy_OculusAuth.cpp b/Source/modio/Private/BlueprintCallbackProxies/CallbackProxy_OculusAuth.cpp index 132f02e..98f03a3 100644 --- a/Source/modio/Private/BlueprintCallbackProxies/CallbackProxy_OculusAuth.cpp +++ b/Source/modio/Private/BlueprintCallbackProxies/CallbackProxy_OculusAuth.cpp @@ -10,7 +10,7 @@ UCallbackProxy_OculusAuth::UCallbackProxy_OculusAuth(const FObjectInitializer &O { } -UCallbackProxy_OculusAuth *UCallbackProxy_OculusAuth::OculusAuth( UObject *WorldContext, const FString& Nonce, const FString& OculusUserId, const FString& AccessToken, const FString& Email, const FString& Device, int32 DateExpires ) +UCallbackProxy_OculusAuth *UCallbackProxy_OculusAuth::OculusAuth( UObject *WorldContext, const FString& Nonce, const FString& OculusUserId, const FString& AccessToken, const FString& Email, const FString& Device, int32 DateExpires, bool bTermsAgreed) { UCallbackProxy_OculusAuth *Proxy = NewObject(); Proxy->SetFlags(RF_StrongRefOnFrame); @@ -21,6 +21,7 @@ UCallbackProxy_OculusAuth *UCallbackProxy_OculusAuth::OculusAuth( UObject *World Proxy->Device = Device; Proxy->DateExpires = DateExpires; Proxy->WorldContextObject = WorldContext; + Proxy->bTermsAgreed = bTermsAgreed; return Proxy; } @@ -30,7 +31,7 @@ void UCallbackProxy_OculusAuth::Activate() FModioSubsystemPtr Modio = FModioSubsystem::Get( World ); if( Modio.IsValid() ) { - Modio->OculusAuth( Nonce, OculusUserId, AccessToken, Email, Device, DateExpires, FModioGenericDelegate::CreateUObject( this, &UCallbackProxy_OculusAuth::OnOculusAuthDelegate ) ); + Modio->OculusAuth( Nonce, OculusUserId, AccessToken, Email, Device, DateExpires, bTermsAgreed, FModioGenericDelegate::CreateUObject( this, &UCallbackProxy_OculusAuth::OnOculusAuthDelegate ) ); } else { diff --git a/Source/modio/Private/BlueprintCallbackProxies/CallbackProxy_SteamAuth.cpp b/Source/modio/Private/BlueprintCallbackProxies/CallbackProxy_SteamAuth.cpp index 7821805..139dc72 100644 --- a/Source/modio/Private/BlueprintCallbackProxies/CallbackProxy_SteamAuth.cpp +++ b/Source/modio/Private/BlueprintCallbackProxies/CallbackProxy_SteamAuth.cpp @@ -10,12 +10,13 @@ UCallbackProxy_SteamAuth::UCallbackProxy_SteamAuth(const FObjectInitializer &Obj { } -UCallbackProxy_SteamAuth *UCallbackProxy_SteamAuth::SteamAuth( UObject *WorldContext, const FString& Base64Ticket ) +UCallbackProxy_SteamAuth *UCallbackProxy_SteamAuth::SteamAuth( UObject *WorldContext, const FString& Base64Ticket, bool bTermsAgreed) { UCallbackProxy_SteamAuth *Proxy = NewObject(); Proxy->SetFlags(RF_StrongRefOnFrame); Proxy->Base64Ticket = Base64Ticket; Proxy->WorldContextObject = WorldContext; + Proxy->bTermsAgreed = bTermsAgreed; return Proxy; } @@ -25,7 +26,7 @@ void UCallbackProxy_SteamAuth::Activate() FModioSubsystemPtr Modio = FModioSubsystem::Get( World ); if( Modio.IsValid() ) { - Modio->SteamAuth( Base64Ticket, FModioGenericDelegate::CreateUObject( this, &UCallbackProxy_SteamAuth::OnSteamAuthDelegate ) ); + Modio->SteamAuth( Base64Ticket, bTermsAgreed, FModioGenericDelegate::CreateUObject( this, &UCallbackProxy_SteamAuth::OnSteamAuthDelegate ) ); } else { diff --git a/Source/modio/Private/ModioSubsystem.cpp b/Source/modio/Private/ModioSubsystem.cpp index 67420fb..ea889ed 100644 --- a/Source/modio/Private/ModioSubsystem.cpp +++ b/Source/modio/Private/ModioSubsystem.cpp @@ -186,22 +186,22 @@ void FModioSubsystem::GetUserModfiles(int32 Limit, int32 Offset, FModioModfileAr modioFreeFilter(&modio_filter_creator); } -void FModioSubsystem::SteamAuth(const FString &Base64Ticket, FModioGenericDelegate SteamAuthDelegate) +void FModioSubsystem::SteamAuth(const FString &Base64Ticket, bool TermsAgreed, FModioGenericDelegate SteamAuthDelegate) { FModioAsyncRequest_SteamAuth *Request = CreateAsyncRequest( this, SteamAuthDelegate ); - modioSteamAuthEncoded( Request, TCHAR_TO_UTF8(*Base64Ticket), FModioAsyncRequest_SteamAuth::Response ); + modioSteamAuthEncoded( Request, TCHAR_TO_UTF8(*Base64Ticket), TermsAgreed, FModioAsyncRequest_SteamAuth::Response ); } -void FModioSubsystem::GalaxyAuth(const FString &Appdata, FModioGenericDelegate GalaxyAuthDelegate) +void FModioSubsystem::GalaxyAuth(const FString &Appdata, bool TermsAgreed, FModioGenericDelegate GalaxyAuthDelegate) { FModioAsyncRequest_GalaxyAuth *Request = CreateAsyncRequest( this, GalaxyAuthDelegate ); - modioGalaxyAuth( Request, TCHAR_TO_UTF8(*Appdata), FModioAsyncRequest_GalaxyAuth::Response ); + modioGalaxyAuth( Request, TCHAR_TO_UTF8(*Appdata), TermsAgreed, FModioAsyncRequest_GalaxyAuth::Response ); } -void FModioSubsystem::OculusAuth(const FString& Nonce, const FString& OculusUserId, const FString& AccessToken, const FString& Email, const FString& Device, int32 DateExpires, FModioGenericDelegate OculusAuthDelegate) +void FModioSubsystem::OculusAuth(const FString& Nonce, const FString& OculusUserId, const FString& AccessToken, const FString& Email, const FString& Device, int32 DateExpires, bool TermsAgreed, FModioGenericDelegate OculusAuthDelegate) { FModioAsyncRequest_OculusAuth *Request = CreateAsyncRequest( this, OculusAuthDelegate ); - modioOculusAuth( Request, TCHAR_TO_UTF8(*Nonce), TCHAR_TO_UTF8(*OculusUserId), TCHAR_TO_UTF8(*AccessToken), TCHAR_TO_UTF8(*Email), TCHAR_TO_UTF8(*Device), (u32)DateExpires, FModioAsyncRequest_GalaxyAuth::Response ); + modioOculusAuth( Request, TCHAR_TO_UTF8(*Nonce), TCHAR_TO_UTF8(*OculusUserId), TCHAR_TO_UTF8(*AccessToken), TCHAR_TO_UTF8(*Email), TCHAR_TO_UTF8(*Device), (u32)DateExpires, TermsAgreed, FModioAsyncRequest_GalaxyAuth::Response ); } void FModioSubsystem::Process() diff --git a/Source/modio/Public/BlueprintCallbackProxies/CallbackProxy_GalaxyAuth.h b/Source/modio/Public/BlueprintCallbackProxies/CallbackProxy_GalaxyAuth.h index a06f050..f5d9732 100644 --- a/Source/modio/Public/BlueprintCallbackProxies/CallbackProxy_GalaxyAuth.h +++ b/Source/modio/Public/BlueprintCallbackProxies/CallbackProxy_GalaxyAuth.h @@ -19,6 +19,7 @@ class MODIO_API UCallbackProxy_GalaxyAuth : public UOnlineBlueprintCallProxyBase GENERATED_UCLASS_BODY() FString Appdata; + bool bTermsAgreed; // The world context object in which this call is taking place UPROPERTY() @@ -31,7 +32,7 @@ class MODIO_API UCallbackProxy_GalaxyAuth : public UOnlineBlueprintCallProxyBase FGalaxyAuthResult OnFailure; UFUNCTION(BlueprintCallable, Category = "mod.io", meta = (BlueprintInternalUseOnly = "true", DefaultToSelf="WorldContext")) - static UCallbackProxy_GalaxyAuth *GalaxyAuth( UObject *WorldContext, const FString &Appdata); + static UCallbackProxy_GalaxyAuth *GalaxyAuth( UObject *WorldContext, const FString &Appdata, bool bTermsAgreed = false); virtual void Activate() override; diff --git a/Source/modio/Public/BlueprintCallbackProxies/CallbackProxy_OculusAuth.h b/Source/modio/Public/BlueprintCallbackProxies/CallbackProxy_OculusAuth.h index fda3955..78d882c 100644 --- a/Source/modio/Public/BlueprintCallbackProxies/CallbackProxy_OculusAuth.h +++ b/Source/modio/Public/BlueprintCallbackProxies/CallbackProxy_OculusAuth.h @@ -25,6 +25,7 @@ class MODIO_API UCallbackProxy_OculusAuth : public UOnlineBlueprintCallProxyBase FString Email; FString Device; int32 DateExpires; + bool bTermsAgreed; // The world context object in which this call is taking place UPROPERTY() @@ -37,7 +38,7 @@ class MODIO_API UCallbackProxy_OculusAuth : public UOnlineBlueprintCallProxyBase FOculusAuthResult OnFailure; UFUNCTION(BlueprintCallable, Category = "mod.io", meta = (BlueprintInternalUseOnly = "true", DefaultToSelf="WorldContext")) - static UCallbackProxy_OculusAuth *OculusAuth( UObject *WorldContext, const FString &Nonce, const FString &OculusUserId, const FString &AccessToken, const FString &Email, const FString &Device, int32 DateExpires); + static UCallbackProxy_OculusAuth *OculusAuth( UObject *WorldContext, const FString &Nonce, const FString &OculusUserId, const FString &AccessToken, const FString &Email, const FString &Device, int32 DateExpires, bool bTermsAgreed); virtual void Activate() override; diff --git a/Source/modio/Public/BlueprintCallbackProxies/CallbackProxy_SteamAuth.h b/Source/modio/Public/BlueprintCallbackProxies/CallbackProxy_SteamAuth.h index c6cc033..3ef0b28 100644 --- a/Source/modio/Public/BlueprintCallbackProxies/CallbackProxy_SteamAuth.h +++ b/Source/modio/Public/BlueprintCallbackProxies/CallbackProxy_SteamAuth.h @@ -19,6 +19,7 @@ class MODIO_API UCallbackProxy_SteamAuth : public UOnlineBlueprintCallProxyBase GENERATED_UCLASS_BODY() FString Base64Ticket; + bool bTermsAgreed; // The world context object in which this call is taking place UPROPERTY() @@ -31,7 +32,7 @@ class MODIO_API UCallbackProxy_SteamAuth : public UOnlineBlueprintCallProxyBase FSteamAuthResult OnFailure; UFUNCTION(BlueprintCallable, Category = "mod.io", meta = (BlueprintInternalUseOnly = "true", DefaultToSelf="WorldContext")) - static UCallbackProxy_SteamAuth *SteamAuth( UObject *WorldContext, const FString &Base64Ticket); + static UCallbackProxy_SteamAuth *SteamAuth( UObject *WorldContext, const FString &Base64Ticket, bool bTermsAgreed); virtual void Activate() override; diff --git a/Source/modio/Public/ModioSubsystem.h b/Source/modio/Public/ModioSubsystem.h index a7a9383..1274391 100644 --- a/Source/modio/Public/ModioSubsystem.h +++ b/Source/modio/Public/ModioSubsystem.h @@ -100,11 +100,11 @@ struct MODIO_API FModioSubsystem : public TSharedFromThis