PICO Unreal Platform SDK
PicoApplicationInterface.h
1/*******************************************************************************
2Copyright © 2015-2022 PICO Technology Co., Ltd.All rights reserved.
3
4NOTICE:All information contained herein is, and remains the property of
5PICO Technology Co., Ltd. The intellectual and technical concepts
6contained herein are proprietary to PICO Technology Co., Ltd. and may be
7covered by patents, patents in process, and are protected by trade secret or
8copyright law. Dissemination of this information or reproduction of this
9material is strictly forbidden unless prior written permission is obtained from
10PICO Technology Co., Ltd.
11*******************************************************************************/
12// This plugin incorporates portions of the Unreal® Engine. Unreal® is a trademark or registered trademark of Epic Games, Inc.In the United States of America and elsewhere.
13// Unreal® Engine, Copyright 1998 – 2022, Epic Games, Inc.All rights reserved.
14
15#pragma once
16
17#include "CoreMinimal.h"
18#include "OnlineSubsystemPico.h"
19#include "OnlineSubsystemPicoPackage.h"
20#include "OnlineSubsystemPicoNames.h"
21
23
34DECLARE_LOG_CATEGORY_EXTERN(ApplicationInterface, Log, All);
35
36// Request
37DECLARE_DELEGATE_ThreeParams(FOnLaunchOtherAppComplete, const FString& /*String Message*/, bool /*IsSuccessed*/, const FString& /*Error Message*/);
38DECLARE_DELEGATE_ThreeParams(FOnLaunchOtherAppByPresenceComplete, const FString& /*String Message*/, bool /*IsSuccessed*/, const FString& /*Error Message*/);
39DECLARE_DELEGATE_SixParams(FOnGetVersionComplete, int64 /*CurrentCode*/, const FString& /*CurrentName*/, int64 /*LatestCode*/, const FString& /*LatestName*/, bool /*IsSuccessed*/, const FString& /*Error Message*/);
40DECLARE_DELEGATE_ThreeParams(FOnLaunchOtherAppByAppIdComplete, const FString& /*String Message*/, bool /*IsSuccessed*/, const FString& /*Error Message*/);
41DECLARE_DELEGATE_ThreeParams(FOnLaunchStoreComplete, const FString& /*String Message*/, bool /*IsSuccessed*/, const FString& /*Error Message*/);
42
44class ONLINESUBSYSTEMPICO_API FPicoApplicationInterface
45{
46private:
47
48 FOnlineSubsystemPico& PicoSubsystem;
49
50public:
51 FPicoApplicationInterface(FOnlineSubsystemPico& InSubsystem);
53
68 bool LaunchOtherApp(const FString& PackageName, const FString& Message, const FOnLaunchOtherAppComplete& Delegate = FOnLaunchOtherAppComplete());
69 void OnQueryLaunchOtherAppComplete(ppfMessageHandle Message, bool bIsError, const FOnLaunchOtherAppComplete& Delegate);
70
82 bool GetVersion(const FOnGetVersionComplete& Delegate = FOnGetVersionComplete());
83 void OnQueryGetVersionComplete(ppfMessageHandle Message, bool bIsError, const FOnGetVersionComplete& Delegate);
84
105 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());
106 void OnQueryLaunchOtherAppByPresenceComplete(ppfMessageHandle Message, bool bIsError, const FOnLaunchOtherAppByPresenceComplete& Delegate);
107
122 bool LaunchOtherAppByAppId(const FString& AppId, const FString& Message, const FOnLaunchOtherAppByAppIdComplete& Delegate = FOnLaunchOtherAppByAppIdComplete());
123 void OnQueryLaunchOtherAppByAppIdComplete(ppfMessageHandle Message, bool bIsError, const FOnLaunchOtherAppByAppIdComplete& Delegate);
124
136 bool LaunchStore(const FOnLaunchStoreComplete& Delegate = FOnLaunchStoreComplete());
137 void OnQueryLaunchStoreComplete(ppfMessageHandle Message, bool bIsError, const FOnLaunchStoreComplete& Delegate);
138}; // end of Application // end of Function
Pico Application interface class.
Definition: PicoApplicationInterface.h:45
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.