48 lines
1.6 KiB
C++
48 lines
1.6 KiB
C++
// Copyright 1998-2015 Epic Games, Inc. All Rights Reserved.
|
|
#pragma once
|
|
|
|
#include "CoreMinimal.h"
|
|
#include "BlueprintDataDefinitions.h"
|
|
#include "Interfaces/OnlineIdentityInterface.h"
|
|
#include "Engine/LocalPlayer.h"
|
|
#include "LogoutUserCallbackProxy.generated.h"
|
|
|
|
UCLASS(MinimalAPI)
|
|
class ULogoutUserCallbackProxy : public UOnlineBlueprintCallProxyBase
|
|
{
|
|
GENERATED_UCLASS_BODY()
|
|
|
|
// Called when there is a successful destroy
|
|
UPROPERTY(BlueprintAssignable)
|
|
FEmptyOnlineDelegate OnSuccess;
|
|
|
|
// Called when there is an unsuccessful destroy
|
|
UPROPERTY(BlueprintAssignable)
|
|
FEmptyOnlineDelegate OnFailure;
|
|
|
|
// Logs out of the identity interface
|
|
UFUNCTION(BlueprintCallable, meta=(BlueprintInternalUseOnly = "true", WorldContext="WorldContextObject"), Category = "Online|AdvancedIdentity")
|
|
static ULogoutUserCallbackProxy* LogoutUser(UObject* WorldContextObject, class APlayerController* PlayerController);
|
|
|
|
// UOnlineBlueprintCallProxyBase interface
|
|
virtual void Activate() override;
|
|
// End of UOnlineBlueprintCallProxyBase interface
|
|
|
|
private:
|
|
// Internal callback when the operation completes, calls out to the public success/failure callbacks
|
|
void OnCompleted(int LocalUserNum, bool bWasSuccessful);
|
|
|
|
private:
|
|
// The player controller triggering things
|
|
TWeakObjectPtr<APlayerController> PlayerControllerWeakPtr;
|
|
|
|
// The delegate executed by the online subsystem
|
|
FOnLogoutCompleteDelegate Delegate;
|
|
|
|
// Handle to the registered OnDestroySessionComplete delegate
|
|
FDelegateHandle DelegateHandle;
|
|
|
|
// The world context object in which this call is taking place
|
|
TWeakObjectPtr<UObject> WorldContextObject;
|
|
};
|