PICO Unreal Platform SDK
Pico_Notification.h
1// Copyright® 2015-2023 PICO Technology Co., Ltd. All rights reserved.
2#pragma once
3
4#include "CoreMinimal.h"
5#include "OnlineSubsystemPico.h"
6#include "UObject/NoExportTypes.h"
7#include "PPF_Platform.h"
8#include "Kismet/BlueprintFunctionLibrary.h"
9#include "Pico_Notification.generated.h"
10//
11
12DECLARE_LOG_CATEGORY_EXTERN(PicoNotification, Log, All);
13
16
17
21// DECLARE_MULTICAST_DELEGATE_FourParams(FRoomUpdateNotify, bool, /*bIsError*/ int, /*ErrorCode*/ const FString&, /*ErrorMessage*/ UPico_Room* /*Room*/);
22//
23// FRoom_GetNextRoomArrayPage
24
25DECLARE_DYNAMIC_DELEGATE_FourParams(FNotificationRoomInviteNotifications, bool, bIsError, int, ErrorCode, const FString&, ErrorMessage, UPico_RoomInviteNotificationArray*, RoomInviteNotificationArray);
26DECLARE_DYNAMIC_DELEGATE_ThreeParams(FNotificationMarkAsRead, bool, bIsError, int, ErrorCode, const FString&, ErrorMessage);
27
39class ONLINESUBSYSTEMPICO_API FPicoNotificationInterface
40{
41private:
42 FOnlineSubsystemPico& PicoSubsystem;
43
44public:
45 FPicoNotificationInterface(FOnlineSubsystemPico& InSubsystem);
47
48 FNotificationRoomInviteNotifications RoomInviteNotificationsDelegate;
49 FNotificationMarkAsRead MarkAsReadDelegate;
50
62 bool GetRoomInviteNotifications(int PageIdx, int PageSize, FNotificationRoomInviteNotifications OnRoomInviteNotificationsCallback);
63
64
75 bool MarkAsRead(const FString& NotificationID, FNotificationMarkAsRead OnMarkAsReadCallback);
76private:
77};
78
94UCLASS()
95class ONLINESUBSYSTEMPICO_API UOnlinePicoNotificationFunction : public UBlueprintFunctionLibrary
96{
97 GENERATED_BODY()
98
99
100public:
101
108 UFUNCTION(BlueprintCallable, meta = (WorldContext = "WorldContextObject"), Category = "OnlinePico|Notification")
109 static void GetRoomInviteNotifications(UObject* WorldContextObject, int PageIdx, int PageSize, FNotificationRoomInviteNotifications OnRoomInviteNotificationsCallback);
110
111
117 UFUNCTION(BlueprintCallable, meta = (WorldContext = "WorldContextObject"), Category = "OnlinePico|Notification")
118 static void MarkAsRead(UObject* WorldContextObject, const FString& NotificationID, FNotificationMarkAsRead OnMarkAsReadCallback);
119};
120
122UCLASS(BlueprintType)
123class ONLINESUBSYSTEMPICO_API UPico_RoomInviteNotification : public UObject
124{
125 GENERATED_BODY()
126
127private:
128
129 ppfID ID = 0;
130
131 ppfID RoomID = 0;
132
133 FString SenderID = FString();
134
135 unsigned long long SentTime;
136
137public:
138 void InitParams(ppfRoomInviteNotificationHandle InRoomInviteNotificationHandle);
139
141 UFUNCTION(BlueprintPure, Category = "Pico Platform|Notification|Room Invite Notification")
142 FString GetID();
143
145 UFUNCTION(BlueprintPure, Category = "Pico Platform|Notification|Room Invite Notification")
146 FString GetRoomID();
147
149 UFUNCTION(BlueprintPure, Category = "Pico Platform|Notification|Room Invite Notification")
150 FString GetSenderID();
151
153 UFUNCTION(BlueprintPure, Category = "Pico Platform|Notification|Room Invite Notification")
154 FString GetSentTime();
155
157 UFUNCTION(BlueprintPure, Category = "Pico Platform|Notification|Room Invite Notification")
158 FDateTime GetSentDateTime();
159
160 UFUNCTION(BlueprintPure, Category = "Pico Platform|Notification|Room Invite Notification")
161 FString GetDebugString();
162};
163
165UCLASS(BlueprintType)
166class ONLINESUBSYSTEMPICO_API UPico_RoomInviteNotificationArray : public UObject
167{
168 GENERATED_BODY()
169private:
170 UPROPERTY()
171 TArray<UPico_RoomInviteNotification*> RoomInviteNotificationArray;
172 int32 Size = 0;
173 int32 TotalSize = 0;
174 bool bHasNextPage;
175public:
176 void InitParams(ppfRoomInviteNotificationArrayHandle InRoomInviteNotificationArrayHandle);
177
179 UFUNCTION(BlueprintPure, Category = "Pico Platform|Notification|Room Invite Notification Array")
180 UPico_RoomInviteNotification* GetElement(int32 Index);
181
182
184 UFUNCTION(BlueprintPure, Category = "Pico Platform|Notification|Room Invite Notification Array")
185 int32 GetSize();
186
187 UFUNCTION(BlueprintPure, Category = "Pico Platform|Notification|Room Invite Notification Array")
188 int32 GetTotalSize();
189
191 UFUNCTION(BlueprintPure, Category = "Pico Platform|Notification|Room Invite Notification Array")
192 bool HasNextPage();
193
194 UFUNCTION(BlueprintPure, Category = "Pico Platform|Notification|Room Invite Notification Array")
195 FString GetDebugString();
196};
FPicoNotificationInterface class.
Definition: Pico_Notification.h:40
OnlinePicoRoom Blueprint Function class.
Definition: Pico_Notification.h:96
UPico_RoomInviteNotificationArray class.
Definition: Pico_Notification.h:167
UPico_RoomInviteNotification class.
Definition: Pico_Notification.h:124
bool MarkAsRead(const FString &NotificationID, FNotificationMarkAsRead OnMarkAsReadCallback)
Marks a notification as read.
bool GetRoomInviteNotifications(int PageIdx, int PageSize, FNotificationRoomInviteNotifications OnRoomInviteNotificationsCallback)
Gets a list of all pending room invites for your app. For example, notifications that may have been s...