5#include "CoreMinimal.h"
6#include "OnlineSubsystemPico.h"
7#include "UObject/NoExportTypes.h"
8#include "OnlineSubsystemPicoNames.h"
9#include "PPF_Platform.h"
10#include "Kismet/BlueprintFunctionLibrary.h"
11#include "Pico_Matchmaking.generated.h"
15DECLARE_LOG_CATEGORY_EXTERN(PicoMatchmaking, Log, All);
36DECLARE_MULTICAST_DELEGATE_FourParams(FMatchmakingMatchFoundNotify,
bool,
int,
const FString&,
UPico_Room* );
37DECLARE_MULTICAST_DELEGATE_ThreeParams(FMatchmakingCancelNotify,
bool,
int,
const FString& );
39DECLARE_DYNAMIC_DELEGATE_ThreeParams(FMatchmakingReportResultsInsecure,
bool, bIsError,
int, ErrorCode,
const FString&, ErrorMessage);
40DECLARE_DYNAMIC_DELEGATE_FourParams(FMatchmakingGetStats,
bool, bIsError,
int, ErrorCode,
const FString&, ErrorMessage,
UPico_MatchmakingStats*, MatchmakingStats);
41DECLARE_DYNAMIC_DELEGATE_FourParams(FMatchmakingBrowse2,
bool, bIsError,
int, ErrorCode,
const FString&, ErrorMessage,
UPico_MatchmakingBrowseResult*, MatchmakingBrowseResult);
42DECLARE_DYNAMIC_DELEGATE_FourParams(FMatchmakingBrowse2CustomPage,
bool, bIsError,
int, ErrorCode,
const FString&, ErrorMessage,
UPico_MatchmakingBrowseResult*, MatchmakingBrowseResult);
43DECLARE_DYNAMIC_DELEGATE_ThreeParams(FMatchmakingCancel,
bool, bIsError,
int, ErrorCode,
const FString&, ErrorMessage);
44DECLARE_DYNAMIC_DELEGATE_FourParams(FMatchmakingCreateAndEnqueueRoom2,
bool, bIsError,
int, ErrorCode,
const FString&, ErrorMessage,
UPico_MatchmakingEnqueueResultAndRoom*, MatchmakingEnqueueResultAndRoom);
45DECLARE_DYNAMIC_DELEGATE_FourParams(FMatchmakingEnqueue2,
bool, bIsError,
int, ErrorCode,
const FString&, ErrorMessage,
UPico_MatchmakingEnqueueResult*, MatchmakingEnqueueResult);
46DECLARE_DYNAMIC_DELEGATE_FourParams(FMatchmakingGetAdminSnapshot,
bool, bIsError,
int, ErrorCode,
const FString&, ErrorMessage,
UPico_MatchmakingAdminSnapshot*, MatchmakingAdminSnapshot);
47DECLARE_DYNAMIC_DELEGATE_ThreeParams(FMatchmakingStartMatch,
bool, bIsError,
int, ErrorCode,
const FString&, ErrorMessage);
65 FOnlineSubsystemPico& PicoSubsystem;
71 FDelegateHandle MatchmakingMatchFoundHandle;
72 void OnMatchmakingMatchFoundNotification(ppfMessageHandle Message,
bool bIsError);
74 FDelegateHandle MatchmakingCancelHandle;
75 void OnMatchmakingCancelNotification(ppfMessageHandle Message,
bool bIsError);
77 FMatchmakingMatchFoundNotify MatchmakingMatchFoundNotify;
78 FMatchmakingCancelNotify MatchmakingCancelNotify;
80 FMatchmakingReportResultsInsecure ReportResultsInsecureDelegate;
81 FMatchmakingGetStats GetStatsDelegate;
82 FMatchmakingBrowse2 Browse2Delegate;
83 FMatchmakingBrowse2CustomPage Browse2CustomPageDelegate;
84 FMatchmakingCancel CancelDelegate;
85 FMatchmakingCreateAndEnqueueRoom2 CreateAndEnqueueRoom2Delegate;
86 FMatchmakingEnqueue2 Enqueue2Delegate;
87 FMatchmakingGetAdminSnapshot GetAdminSnapshotDelegate;
88 FMatchmakingStartMatch StartMatchDelegate;
102 bool ReportResultsInsecure(
const FString& RoomID,
const TMap<FString, int>& Data, FMatchmakingReportResultsInsecure InDelegate);
118 bool GetStats(
const FString& Pool, uint32 MaxLevel,
EMatchmakingStatApproach Approach = EMatchmakingStatApproach::Trailing, FMatchmakingGetStats InDelegate = FMatchmakingGetStats());
166 bool Cancel(FMatchmakingCancel InDelegate);
234 bool StartMatch(
const FString& RoomId, FMatchmakingStartMatch InDelegate);
238 ppfID GetppfID(
const FString& StringID);
270 UFUNCTION(BlueprintCallable, meta = (WorldContext =
"WorldContextObject"), Category =
"OnlinePico|Matchmaking")
271 static
void ReportResultsInsecure(UObject* WorldContextObject, const FString& RoomID, const TMap<FString,
int>& Data, FMatchmakingReportResultsInsecure InDelegate);
282 UFUNCTION(BlueprintCallable, meta = (WorldContext = "WorldContextObject"), Category = "OnlinePico|Matchmaking")
284 static
void GetStats(UObject* WorldContextObject, const FString& Pool, int32 MaxLevel,
EMatchmakingStatApproach approach, FMatchmakingGetStats InDelegate);
295 UFUNCTION(BlueprintCallable, meta = (WorldContext = "WorldContextObject"), Category = "OnlinePico|Matchmaking")
296 static
void Browse2(UObject* WorldContextObject, const FString& Pool,
FPicoMatchmakingOptions MatchmakingOptions, FMatchmakingBrowse2 InDelegate);
307 UFUNCTION(BlueprintCallable, meta = (WorldContext = "WorldContextObject"), Category = "OnlinePico|Matchmaking")
308 static
void Browse2CustomPage(UObject* WorldContextObject, const FString& Pool,
FPicoMatchmakingOptions MatchmakingOptions,
int PageIndex,
int PageSize, FMatchmakingBrowse2CustomPage InDelegate);
320 UFUNCTION(BlueprintCallable, meta = (WorldContext = "WorldContextObject"), Category = "OnlinePico|Matchmaking")
321 static
void Cancel(UObject* WorldContextObject, FMatchmakingCancel InDelegate);
331 UFUNCTION(BlueprintCallable, meta = (WorldContext = "WorldContextObject"), Category = "OnlinePico|Matchmaking")
332 static
void CreateAndEnqueueRoom2(UObject* WorldContextObject, const FString& Pool,
FPicoMatchmakingOptions MatchmakingOptions, FMatchmakingCreateAndEnqueueRoom2 InDelegate);
346 UFUNCTION(BlueprintCallable, meta = (WorldContext = "WorldContextObject"), Category = "OnlinePico|Matchmaking")
347 static
void Enqueue2(UObject* WorldContextObject, const FString& Pool,
FPicoMatchmakingOptions MatchmakingOptions, FMatchmakingEnqueue2 InDelegate);
359 UFUNCTION(BlueprintCallable, meta = (WorldContext = "WorldContextObject"), Category = "OnlinePico|Matchmaking")
360 static
void GetAdminSnapshot(UObject* WorldContextObject, FMatchmakingGetAdminSnapshot InDelegate);
373 UFUNCTION(BlueprintCallable, meta = (WorldContext = "WorldContextObject"), Category = "OnlinePico|Matchmaking")
374 static
void StartMatch(UObject* WorldContextObject, const FString& RoomId, FMatchmakingStartMatch InDelegate);
386 unsigned int DrawCount;
387 unsigned int LossCount;
388 unsigned int SkillLevel;
390 double SkillStandardDeviation;
391 unsigned int WinCount;
394 void InitParams(ppfMatchmakingStatsHandle InHandle);
397 UFUNCTION(BlueprintPure, Category =
"Pico Platform|Matchmaking|Matchmaking Stats")
398 int32 GetDrawCount();
401 UFUNCTION(BlueprintPure, Category = "Pico Platform|Matchmaking|Matchmaking Stats")
402 int32 GetLossCount();
405 UFUNCTION(BlueprintPure, Category = "Pico Platform|Matchmaking|Matchmaking Stats")
406 int32 GetSkillLevel();
409 UFUNCTION(BlueprintPure, Category = "Pico Platform|Matchmaking|Matchmaking Stats")
410 float GetSkillMean();
413 UFUNCTION(BlueprintPure, Category = "Pico Platform|Matchmaking|Matchmaking Stats")
414 float GetSkillStandardDeviation();
417 UFUNCTION(BlueprintPure, Category = "Pico Platform|Matchmaking|Matchmaking Stats")
420 UFUNCTION(BlueprintPure, Category = "Pico Platform|Matchmaking|Matchmaking Stats")
421 FString GetDebugString();
436 void InitParams(ppfMatchmakingBrowseResultHandle InHandle);
439 UFUNCTION(BlueprintPure, Category =
"Pico Platform|Matchmaking|Matchmaking Browse Result")
443 UFUNCTION(BlueprintPure, Category = "Pico Platform|Matchmaking|Matchmaking Browse Result")
446 UFUNCTION(BlueprintPure, Category = "Pico Platform|Matchmaking|Matchmaking Browse Result")
447 FString GetDebugString();
457 TArray<UPico_MatchmakingRoom*> MatchmakingRoomArray;
461 void InitParams(ppfMatchmakingRoomArrayHandle InHandle);
464 UFUNCTION(BlueprintPure, Category =
"Pico Platform|Matchmaking|Matchmaking Room Array")
469 UFUNCTION(BlueprintPure, Category = "Pico Platform|Matchmaking|Matchmaking Room Array")
472 UFUNCTION(BlueprintPure, Category = "Pico Platform|Matchmaking|Matchmaking Room Array")
473 int32 GetTotalSize();
475 UFUNCTION(BlueprintPure, Category = "Pico Platform|Matchmaking|Matchmaking Room Array")
476 FString GetDebugString();
487 unsigned int PingTime;
491 void InitParams(ppfMatchmakingRoomHandle InHandle);
494 UFUNCTION(BlueprintPure, Category =
"Pico Platform|Matchmaking|Matchmaking Room")
498 UFUNCTION(BlueprintPure, Category = "Pico Platform|Matchmaking|Matchmaking Room")
502 UFUNCTION(BlueprintPure, Category = "Pico Platform|Matchmaking|Matchmaking Room")
503 bool GetHasPingTime();
505 UFUNCTION(BlueprintPure, Category = "Pico Platform|Matchmaking|Matchmaking Room")
506 FString GetDebugString();
522 void InitParams(ppfMatchmakingEnqueueResultAndRoomHandle InHandle);
525 UFUNCTION(BlueprintPure, Category =
"Pico Platform|Matchmaking|Matchmaking Enqueue Result And Room")
529 UFUNCTION(BlueprintPure, Category = "Pico Platform|Matchmaking|Matchmaking Enqueue Result And Room")
532 UFUNCTION(BlueprintPure, Category = "Pico Platform|Matchmaking|Matchmaking Enqueue Result And Room")
533 FString GetDebugString();
545 unsigned int AverageWait;
546 unsigned int MatchesInLastHourCount;
547 unsigned int MaxExpectedWait;
549 unsigned int RecentMatchPercentage;
552 void InitParams(ppfMatchmakingEnqueueResultHandle InHandle);
555 UFUNCTION(BlueprintPure, Category =
"Pico Platform|Matchmaking|Matchmaking Enqueue Result")
559 UFUNCTION(BlueprintPure, Category = "Pico Platform|Matchmaking|Matchmaking Enqueue Result")
560 int32 GetAverageWait();
563 UFUNCTION(BlueprintPure, Category = "Pico Platform|Matchmaking|Matchmaking Enqueue Result")
564 int32 GetMatchesInLastHourCount();
567 UFUNCTION(BlueprintPure, Category = "Pico Platform|Matchmaking|Matchmaking Enqueue Result")
568 int32 GetMaxExpectedWait();
571 UFUNCTION(BlueprintPure, Category = "Pico Platform|Matchmaking|Matchmaking Enqueue Result")
575 UFUNCTION(BlueprintPure, Category = "Pico Platform|Matchmaking|Matchmaking Enqueue Result")
576 int32 GetRecentMatchPercentage();
578 UFUNCTION(BlueprintPure, Category = "Pico Platform|Matchmaking|Matchmaking Enqueue Result")
579 FString GetDebugString();
591 double MyCurrentThreshold;
594 void InitParams(ppfMatchmakingAdminSnapshotHandle InHandle);
597 UFUNCTION(BlueprintPure, Category =
"Pico Platform|Matchmaking|Matchmaking Admin Snapshot")
600 UFUNCTION(BlueprintPure, Category = "Pico Platform|Matchmaking|Matchmaking Admin Snapshot")
601 float GetMyCurrentThreshold();
604 UFUNCTION(BlueprintPure, Category = "Pico Platform|Matchmaking|Matchmaking Admin Snapshot")
605 FString GetDebugString();
615 TArray<UPico_MatchmakingAdminSnapshotCandidate*> MatchmakingAdminSnapshotCandidateArray;
619 void InitParams(ppfMatchmakingAdminSnapshotCandidateArrayHandle InHandle);
622 UFUNCTION(BlueprintPure, Category =
"Pico Platform|Matchmaking|Matchmaking AdminSnapshot Candidate Array")
625 UFUNCTION(BlueprintPure, Category = "Pico Platform|Matchmaking|Matchmaking AdminSnapshot Candidate Array")
626 int32 GetTotalSize();
629 UFUNCTION(BlueprintPure, Category = "Pico Platform|Matchmaking|Matchmaking AdminSnapshot Candidate Array")
632 UFUNCTION(BlueprintPure, Category = "Pico Platform|Matchmaking|Matchmaking AdminSnapshot Candidate Array")
633 FString GetDebugString();
645 double TheirCurrentThreshold;
648 void InitParams(ppfMatchmakingAdminSnapshotCandidateHandle InHandle);
651 UFUNCTION(BlueprintPure, Category =
"Pico Platform|Matchmaking|Matchmaking Admin Snapshot Candidate")
655 UFUNCTION(BlueprintPure, Category = "Pico Platform|Matchmaking|Matchmaking Admin Snapshot Candidate")
656 float GetMyTotalScore();
659 UFUNCTION(BlueprintPure, Category = "Pico Platform|Matchmaking|Matchmaking Admin Snapshot Candidate")
660 float GetTheirCurrentThreshold();
662 UFUNCTION(BlueprintPure, Category = "Pico Platform|Matchmaking|Matchmaking Admin Snapshot Candidate")
663 FString GetDebugString();
PicoMatchmakingInterface class.
Definition: Pico_Matchmaking.h:63
bool Cancel(FMatchmakingCancel InDelegate)
Cancels a matchmaking request. Call this function to cancel an enqueue request before a match is made...
bool GetAdminSnapshot(FMatchmakingGetAdminSnapshot InDelegate)
Debugs the state of the current matchmaking pool queue.
bool Browse2(const FString &Pool, FPicoMatchmakingOptions MatchmakingOptions, FMatchmakingBrowse2 InDelegate)
Gets rooms by matchmakinging pool name. The user can join the room with RoomService....
bool Browse2CustomPage(const FString &Pool, FPicoMatchmakingOptions MatchmakingOptions, int PageIndex, int PageSize, FMatchmakingBrowse2CustomPage InDelegate)
Gets rooms by matchmakinging pool name and specify the page number and the number of entries to retur...
bool CreateAndEnqueueRoom2(const FString &Pool, FPicoMatchmakingOptions MatchmakingOptions, FMatchmakingCreateAndEnqueueRoom2 InDelegate)
Creates a matchmaking room, then enqueues and joins it.
bool ReportResultsInsecure(const FString &RoomID, const TMap< FString, int > &Data, FMatchmakingReportResultsInsecure InDelegate)
Reports the result of a skill-rating match.
bool StartMatch(const FString &RoomId, FMatchmakingStartMatch InDelegate)
Reports that a skill-rating match has started. You can use this method after joining the room.
bool Enqueue2(const FString &pool, FPicoMatchmakingOptions MatchmakingOptions, FMatchmakingEnqueue2 InDelegate)
Enqueues for an available matchmaking room to join. When the server finds a match,...
bool GetStats(const FString &Pool, uint32 MaxLevel, EMatchmakingStatApproach Approach=EMatchmakingStatApproach::Trailing, FMatchmakingGetStats InDelegate=FMatchmakingGetStats())
Gets the matchmaking statistics for the current user.
OnlinePicoMatchmaking Blueprint Function class.
Definition: Pico_Matchmaking.h:258
UPico_DataStore class.
Definition: Pico_DataStore.h:18
UPico_MatchmakingAdminSnapshotCandidate class.
Definition: Pico_Matchmaking.h:639
UPico_MatchmakingAdminSnapshotCandidateList class.
Definition: Pico_Matchmaking.h:611
UPico_MatchmakingAdminSnapshot class.
Definition: Pico_Matchmaking.h:585
UPico_MatchmakingBrowseResult class.
Definition: Pico_Matchmaking.h:427
UPico_MatchmakingEnqueueResultAndRoom class.
Definition: Pico_Matchmaking.h:512
UPico_MatchmakingEnqueueResult class.
Definition: Pico_Matchmaking.h:539
UPico_MatchmakingRoom class.
Definition: Pico_Matchmaking.h:482
UPico_MatchmakingRoomList class.
Definition: Pico_Matchmaking.h:453
UPico_MatchmakingStats class.
Definition: Pico_Matchmaking.h:383
UPico_Room class.
Definition: Pico_Room.h:639
UPico_UserArray class.
Definition: Pico_User.h:608
UPico_User class.
Definition: Pico_User.h:515
EMatchmakingStatApproach
Matchmaking stat approach.
Definition: OnlineSubsystemPicoNames.h:806
Matchmaking options.
Definition: OnlineSubsystemPicoNames.h:790