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 "Pico_Notification.generated.h"
9//
10
11DECLARE_LOG_CATEGORY_EXTERN(PicoNotification, Log, All);
12
15
16
20// DECLARE_MULTICAST_DELEGATE_FourParams(FRoomUpdateNotify, bool, /*bIsError*/ int, /*ErrorCode*/ const FString&, /*ErrorMessage*/ UPico_Room* /*Room*/);
21//
22// FRoom_GetNextRoomArrayPage
23
24DECLARE_DYNAMIC_DELEGATE_FourParams(FNotificationRoomInviteNotifications, bool, bIsError, int, ErrorCode, const FString&, ErrorMessage, UPico_RoomInviteNotificationArray*, RoomInviteNotificationArray);
25DECLARE_DYNAMIC_DELEGATE_ThreeParams(FNotificationMarkAsRead, bool, bIsError, int, ErrorCode, const FString&, ErrorMessage);
26
38class ONLINESUBSYSTEMPICO_API FPicoNotificationInterface
39{
40private:
41 FOnlineSubsystemPico& PicoSubsystem;
42
43public:
44 FPicoNotificationInterface(FOnlineSubsystemPico& InSubsystem);
46
47 FNotificationRoomInviteNotifications RoomInviteNotificationsDelegate;
48 FNotificationMarkAsRead MarkAsReadDelegate;
49
61 bool GetRoomInviteNotifications(int PageIdx, int PageSize, FNotificationRoomInviteNotifications OnRoomInviteNotificationsCallback);
62
63
74 bool MarkAsRead(const FString& NotificationID, FNotificationMarkAsRead OnMarkAsReadCallback);
75private:
76};
77
93UCLASS()
94class ONLINESUBSYSTEMPICO_API UOnlinePicoNotificationFunction : public UBlueprintFunctionLibrary
95{
96 GENERATED_BODY()
97
98
99public:
100
107 UFUNCTION(BlueprintCallable, meta = (WorldContext = "WorldContextObject"), Category = "OnlinePico|Notification")
108 static void GetRoomInviteNotifications(UObject* WorldContextObject, int PageIdx, int PageSize, FNotificationRoomInviteNotifications OnRoomInviteNotificationsCallback);
109
110
116 UFUNCTION(BlueprintCallable, meta = (WorldContext = "WorldContextObject"), Category = "OnlinePico|Notification")
117 static void MarkAsRead(UObject* WorldContextObject, const FString& NotificationID, FNotificationMarkAsRead OnMarkAsReadCallback);
118};
119
121UCLASS(BlueprintType)
122class ONLINESUBSYSTEMPICO_API UPico_RoomInviteNotification : public UObject
123{
124 GENERATED_BODY()
125
126private:
127
128 ppfID ID = 0;
129
130 ppfID RoomID = 0;
131
132 FString SenderID = FString();
133
134 unsigned long long SentTime;
135
136public:
137 void InitParams(ppfRoomInviteNotificationHandle InRoomInviteNotificationHandle);
138
140 UFUNCTION(BlueprintPure, Category = "Pico Platform|Notification|Room Invite Notification")
141 FString GetID();
142
144 UFUNCTION(BlueprintPure, Category = "Pico Platform|Notification|Room Invite Notification")
145 FString GetRoomID();
146
148 UFUNCTION(BlueprintPure, Category = "Pico Platform|Notification|Room Invite Notification")
149 FString GetSenderID();
150
152 UFUNCTION(BlueprintPure, Category = "Pico Platform|Notification|Room Invite Notification")
153 FString GetSentTime();
154
156 UFUNCTION(BlueprintPure, Category = "Pico Platform|Notification|Room Invite Notification")
157 FDateTime GetSentDateTime();
158
159 UFUNCTION(BlueprintPure, Category = "Pico Platform|Notification|Room Invite Notification")
160 FString GetDebugString();
161};
162
164UCLASS(BlueprintType)
165class ONLINESUBSYSTEMPICO_API UPico_RoomInviteNotificationArray : public UObject
166{
167 GENERATED_BODY()
168private:
169 UPROPERTY()
170 TArray<UPico_RoomInviteNotification*> RoomInviteNotificationArray;
171 int32 Size = 0;
172 int32 TotalSize = 0;
173 bool bHasNextPage;
174public:
175 void InitParams(ppfRoomInviteNotificationArrayHandle InRoomInviteNotificationArrayHandle);
176
178 UFUNCTION(BlueprintPure, Category = "Pico Platform|Notification|Room Invite Notification Array")
179 UPico_RoomInviteNotification* GetElement(int32 Index);
180
181
183 UFUNCTION(BlueprintPure, Category = "Pico Platform|Notification|Room Invite Notification Array")
184 int32 GetSize();
185
186 UFUNCTION(BlueprintPure, Category = "Pico Platform|Notification|Room Invite Notification Array")
187 int32 GetTotalSize();
188
190 UFUNCTION(BlueprintPure, Category = "Pico Platform|Notification|Room Invite Notification Array")
191 bool HasNextPage();
192
193 UFUNCTION(BlueprintPure, Category = "Pico Platform|Notification|Room Invite Notification Array")
194 FString GetDebugString();
195};
FPicoNotificationInterface class.
Definition: Pico_Notification.h:39
OnlinePicoRoom Blueprint Function class.
Definition: Pico_Notification.h:95
UPico_RoomInviteNotificationArray class.
Definition: Pico_Notification.h:166
UPico_RoomInviteNotification class.
Definition: Pico_Notification.h:123
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...