Files
AdvancedSessionsPlugin/Source/AdvancedSessions/Classes/GetFriendsCallbackProxy.h
mordentral d234ef1735 Removed old style enums in favor of strongly typed enums
Former-commit-id: 0a33d916dbc0e318c63472c0768a0f934af31857
2016-10-21 11:04:27 -04:00

49 lines
1.9 KiB
C++

// Copyright 1998-2015 Epic Games, Inc. All Rights Reserved.
#pragma once
#include "OnlineSubSystemHeader.h"
#include "GetFriendsCallbackProxy.generated.h"
DECLARE_LOG_CATEGORY_EXTERN(AdvancedGetFriendsLog, Log, All);
DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FBlueprintGetFriendsListDelegate, const TArray<FBPFriendInfo>&, Results);
UCLASS(MinimalAPI)
class UGetFriendsCallbackProxy : public UOnlineBlueprintCallProxyBase
{
GENERATED_UCLASS_BODY()
// Called when the friends list successfully was retrieved
UPROPERTY(BlueprintAssignable)
FBlueprintGetFriendsListDelegate OnSuccess;
// Called when there was an error retrieving the friends list
UPROPERTY(BlueprintAssignable)
FBlueprintGetFriendsListDelegate OnFailure;
// Gets the players list of friends from the OnlineSubsystem and returns it, can be retrieved later with GetStoredFriendsList
UFUNCTION(BlueprintCallable, meta=(BlueprintInternalUseOnly = "true", WorldContext="WorldContextObject"), Category = "Online|AdvancedFriends")
static UGetFriendsCallbackProxy* GetAndStoreFriendsList(UObject* WorldContextObject, class APlayerController* PlayerController);
virtual void Activate() override;
private:
// Internal callback when the friends list is retrieved
void OnReadFriendsListCompleted(int32 LocalUserNum, bool bWasSuccessful, const FString& ListName, const FString& ErrorString);
// The player controller triggering things
TWeakObjectPtr<APlayerController> PlayerControllerWeakPtr;
// The delegate executed
FOnReadFriendsListComplete FriendListReadCompleteDelegate;
// The Type of friends list to get
// Removed because all but the facebook interfaces don't even currently support anything but the default friends list.
//EBPFriendsLists FriendListToGet;
// The world context object in which this call is taking place
UObject* WorldContextObject;
};