PICO Unreal Platform SDK
PicoApplicationInterface.h
1// Copyright® 2015-2023 PICO Technology Co., Ltd. All rights reserved.
2
3#pragma once
4
5#include "CoreMinimal.h"
6#include "OnlineSubsystemPico.h"
7#include "OnlineSubsystemPicoPackage.h"
8#include "OnlineSubsystemPicoNames.h"
9
11
22DECLARE_LOG_CATEGORY_EXTERN(ApplicationInterface, Log, All);
23
24// Request
25DECLARE_DELEGATE_ThreeParams(FOnLaunchOtherAppComplete, const FString& /*String Message*/, bool /*IsSuccessed*/, const FString& /*Error Message*/);
26DECLARE_DELEGATE_ThreeParams(FOnLaunchOtherAppByPresenceComplete, const FString& /*String Message*/, bool /*IsSuccessed*/, const FString& /*Error Message*/);
27DECLARE_DELEGATE_SixParams(FOnGetVersionComplete, int64 /*CurrentCode*/, const FString& /*CurrentName*/, int64 /*LatestCode*/, const FString& /*LatestName*/, bool /*IsSuccessed*/, const FString& /*Error Message*/);
28DECLARE_DELEGATE_ThreeParams(FOnLaunchOtherAppByAppIdComplete, const FString& /*String Message*/, bool /*IsSuccessed*/, const FString& /*Error Message*/);
29DECLARE_DELEGATE_ThreeParams(FOnLaunchStoreComplete, const FString& /*String Message*/, bool /*IsSuccessed*/, const FString& /*Error Message*/);
30
32class ONLINESUBSYSTEMPICO_API FPicoApplicationInterface
33{
34private:
35
36 FOnlineSubsystemPico& PicoSubsystem;
37
38public:
39 FPicoApplicationInterface(FOnlineSubsystemPico& InSubsystem);
41
56 bool LaunchOtherApp(const FString& PackageName, const FString& Message, const FOnLaunchOtherAppComplete& Delegate = FOnLaunchOtherAppComplete());
57 void OnQueryLaunchOtherAppComplete(ppfMessageHandle Message, bool bIsError, const FOnLaunchOtherAppComplete& Delegate);
58
70 bool GetVersion(const FOnGetVersionComplete& Delegate = FOnGetVersionComplete());
71 void OnQueryGetVersionComplete(ppfMessageHandle Message, bool bIsError, const FOnGetVersionComplete& Delegate);
72
93 bool LaunchOtherAppByPresence(const FString& AppID, const FString& PackageName, const FString& Message, const FString& ApiName, const FString& LobbySessionId, const FString& MatchSessionId, const FString& TrackId, const FString& Extra, const FOnLaunchOtherAppByPresenceComplete& Delegate = FOnLaunchOtherAppByPresenceComplete());
94 void OnQueryLaunchOtherAppByPresenceComplete(ppfMessageHandle Message, bool bIsError, const FOnLaunchOtherAppByPresenceComplete& Delegate);
95
110 bool LaunchOtherAppByAppId(const FString& AppId, const FString& Message, const FOnLaunchOtherAppByAppIdComplete& Delegate = FOnLaunchOtherAppByAppIdComplete());
111 void OnQueryLaunchOtherAppByAppIdComplete(ppfMessageHandle Message, bool bIsError, const FOnLaunchOtherAppByAppIdComplete& Delegate);
112
124 bool LaunchStore(const FOnLaunchStoreComplete& Delegate = FOnLaunchStoreComplete());
125 void OnQueryLaunchStoreComplete(ppfMessageHandle Message, bool bIsError, const FOnLaunchStoreComplete& Delegate);
126}; // end of Application // end of Function
Pico Application interface class.
Definition: PicoApplicationInterface.h:33
bool LaunchOtherAppByPresence(const FString &AppID, const FString &PackageName, const FString &Message, const FString &ApiName, const FString &LobbySessionId, const FString &MatchSessionId, const FString &TrackId, const FString &Extra, const FOnLaunchOtherAppByPresenceComplete &Delegate=FOnLaunchOtherAppByPresenceComplete())
Launches a different app in a user's library.
bool LaunchOtherAppByAppId(const FString &AppId, const FString &Message, const FOnLaunchOtherAppByAppIdComplete &Delegate=FOnLaunchOtherAppByAppIdComplete())
Launches a different app in a user's library by app ID.
bool LaunchOtherApp(const FString &PackageName, const FString &Message, const FOnLaunchOtherAppComplete &Delegate=FOnLaunchOtherAppComplete())
Launches a different app in a user's library.
bool LaunchStore(const FOnLaunchStoreComplete &Delegate=FOnLaunchStoreComplete())
Launches the PICO Store and jump to the details page of the current app.
bool GetVersion(const FOnGetVersionComplete &Delegate=FOnGetVersionComplete())
Gets the current app's latest version in the PICO Store.