Files
UnrealEngineUWP/Engine/Source/Runtime/Online/BackgroundHTTP/Public/BackgroundHttpNotificationObject.h
ryan durand 0f0464a30e Updating copyright for Engine Runtime.
#rnx
#rb none


#ROBOMERGE-OWNER: ryan.durand
#ROBOMERGE-AUTHOR: ryan.durand
#ROBOMERGE-SOURCE: CL 10869210 via CL 10869511 via CL 10869900
#ROBOMERGE-BOT: (v613-10869866)

[CL 10870549 by ryan durand in Main branch]
2019-12-26 14:45:42 -05:00

44 lines
1.5 KiB
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "CoreMinimal.h"
#include "Delegates/Delegate.h"
class BACKGROUNDHTTP_API FBackgroundHttpNotificationObject
: public TSharedFromThis<FBackgroundHttpNotificationObject, ESPMode::ThreadSafe>
{
public:
FBackgroundHttpNotificationObject(FText InNotificationTitle, FText InNotificationBody, FText InNotificationAction, const FString& InNotificationActivationString, bool InNotifyOnlyOnFullSuccess);
FBackgroundHttpNotificationObject(FText InNotificationTitle, FText InNotificationBody, FText InNotificationAction, const FString& InNotificationActivationString, bool InNotifyOnlyOnFullSuccess, bool bOnlySendNotificationInBackground);
~FBackgroundHttpNotificationObject();
void NotifyOfDownloadResult(bool bWasSuccess);
private:
void OnApp_EnteringBackground();
void OnApp_EnteringForeground();
private:
FText NotificationTitle;
FText NotificationAction;
FText NotificationBody;
FString NotificationActivationString;
bool bOnlySendNotificationInBackground;
bool bNotifyOnlyOnFullSuccess;
volatile bool bIsInBackground;
volatile int32 NumFailedDownloads;
class ILocalNotificationService* PlatformNotificationService;
FDelegateHandle OnApp_EnteringForegroundHandle;
FDelegateHandle OnApp_EnteringBackgroundHandle;
//No default constructor
FBackgroundHttpNotificationObject() {}
};
typedef TSharedPtr<FBackgroundHttpNotificationObject, ESPMode::ThreadSafe> FBackgroundHttpNotificationObjectPtr;