PICO Unreal Platform SDK
Pico_Notification.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 "UObject/NoExportTypes.h"
20#include "PPF_Platform.h"
21#include "Pico_Notification.generated.h"
22//
23
24DECLARE_LOG_CATEGORY_EXTERN(PicoNotification, Log, All);
25
28
29
33// DECLARE_MULTICAST_DELEGATE_FourParams(FRoomUpdateNotify, bool, /*bIsError*/ int, /*ErrorCode*/ const FString&, /*ErrorMessage*/ UPico_Room* /*Room*/);
34//
35// FRoom_GetNextRoomArrayPage
36
37DECLARE_DYNAMIC_DELEGATE_FourParams(FNotificationRoomInviteNotifications, bool, bIsError, int, ErrorCode, const FString&, ErrorMessage, UPico_RoomInviteNotificationArray*, RoomInviteNotificationArray);
38DECLARE_DYNAMIC_DELEGATE_ThreeParams(FNotificationMarkAsRead, bool, bIsError, int, ErrorCode, const FString&, ErrorMessage);
39
51class ONLINESUBSYSTEMPICO_API FPicoNotificationInterface
52{
53private:
54 FOnlineSubsystemPico& PicoSubsystem;
55
56public:
57 FPicoNotificationInterface(FOnlineSubsystemPico& InSubsystem);
59
60 FNotificationRoomInviteNotifications RoomInviteNotificationsDelegate;
61 FNotificationMarkAsRead MarkAsReadDelegate;
62
74 bool GetRoomInviteNotifications(int PageIdx, int PageSize, FNotificationRoomInviteNotifications OnRoomInviteNotificationsCallback);
75
76
87 bool MarkAsRead(const FString& NotificationID, FNotificationMarkAsRead OnMarkAsReadCallback);
88private:
89};
90
106UCLASS()
107class ONLINESUBSYSTEMPICO_API UOnlinePicoNotificationFunction : public UBlueprintFunctionLibrary
108{
109 GENERATED_BODY()
110
111
112public:
113
120 UFUNCTION(BlueprintCallable, meta = (WorldContext = "WorldContextObject"), Category = "OnlinePico|Notification")
121 static void GetRoomInviteNotifications(UObject* WorldContextObject, int PageIdx, int PageSize, FNotificationRoomInviteNotifications OnRoomInviteNotificationsCallback);
122
123
129 UFUNCTION(BlueprintCallable, meta = (WorldContext = "WorldContextObject"), Category = "OnlinePico|Notification")
130 static void MarkAsRead(UObject* WorldContextObject, const FString& NotificationID, FNotificationMarkAsRead OnMarkAsReadCallback);
131};
132
137UCLASS(BlueprintType)
138class ONLINESUBSYSTEMPICO_API UPico_RoomInviteNotification : public UObject
139{
140 GENERATED_BODY()
141
142private:
143
144 ppfID ID = 0;
145
146 ppfID RoomID = 0;
147
148 FString SenderID = FString();
149
150 unsigned long long SentTime;
151
152public:
153 void InitParams(ppfRoomInviteNotificationHandle InRoomInviteNotificationHandle);
154
156 UFUNCTION(BlueprintPure, Category = "Pico Platform|Notification|Room Invite Notification")
157 FString GetID();
158
160 UFUNCTION(BlueprintPure, Category = "Pico Platform|Notification|Room Invite Notification")
161 FString GetRoomID();
162
164 UFUNCTION(BlueprintPure, Category = "Pico Platform|Notification|Room Invite Notification")
165 FString GetSenderID();
166
168 UFUNCTION(BlueprintPure, Category = "Pico Platform|Notification|Room Invite Notification")
169 FString GetSentTime();
170
172 UFUNCTION(BlueprintPure, Category = "Pico Platform|Notification|Room Invite Notification")
173 FDateTime GetSentDateTime();
174
175 UFUNCTION(BlueprintPure, Category = "Pico Platform|Notification|Room Invite Notification")
176 FString GetDebugString();
177};
178
180UCLASS(BlueprintType)
181class ONLINESUBSYSTEMPICO_API UPico_RoomInviteNotificationArray : public UObject
182{
183 GENERATED_BODY()
184private:
185 UPROPERTY()
186 TArray<UPico_RoomInviteNotification*> RoomInviteNotificationArray;
187 FString NextPageParam = FString();
188 int32 Size = 0;
189 int32 TotalSize = 0;
190 bool bHasNextPage;
191public:
192 void InitParams(ppfRoomInviteNotificationArrayHandle InRoomInviteNotificationArrayHandle);
193
195 UFUNCTION(BlueprintPure, Category = "Pico Platform|Notification|Room Invite Notification Array")
196 UPico_RoomInviteNotification* GetElement(int32 Index);
197
198 UFUNCTION(BlueprintPure, Category = "Pico Platform|Notification|Room Invite Notification Array")
199 FString GetNextPageParam();
200
202 UFUNCTION(BlueprintPure, Category = "Pico Platform|Notification|Room Invite Notification Array")
203 int32 GetSize();
204
205 UFUNCTION(BlueprintPure, Category = "Pico Platform|Notification|Room Invite Notification Array")
206 int32 GetTotalSize();
207
209 UFUNCTION(BlueprintPure, Category = "Pico Platform|Notification|Room Invite Notification Array")
210 bool HasNextPage();
211
212 UFUNCTION(BlueprintPure, Category = "Pico Platform|Notification|Room Invite Notification Array")
213 FString GetDebugString();
214};
FPicoNotificationInterface class.
Definition: Pico_Notification.h:52
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...
OnlinePicoNotification Blueprint Function class.
Definition: Pico_Notification.h:108
UPico_RoomInviteNotificationArray class.
Definition: Pico_Notification.h:182
UPico_RoomInviteNotification class.
Definition: Pico_Notification.h:139