5#include "CoreMinimal.h"
6#include "UObject/NoExportTypes.h"
7#include "PPF_Platform.h"
8#include "OnlineSubsystemPicoNames.h"
9#include "OnlineSubsystemPico.h"
10#include "Kismet/BlueprintFunctionLibrary.h"
11#include "Pico_AssetFile.generated.h"
18DECLARE_LOG_CATEGORY_EXTERN(PicoAssetFile, Log, All);
20DECLARE_DYNAMIC_DELEGATE_ThreeParams(FAssetFileDeleteResult,
bool, bIsError,
const FString&, ErrorMessage,
UPico_AssetFileDeleteResult*, DeleteResult);
21DECLARE_DYNAMIC_DELEGATE_ThreeParams(FAssetFileDownloadResult,
bool, bIsError,
const FString&, ErrorMessage,
UPico_AssetFileDownloadResult*, DownloadResult);
22DECLARE_DYNAMIC_DELEGATE_ThreeParams(FAssetFileDownloadCancelResult,
bool, bIsError,
const FString&, ErrorMessage,
UPico_AssetFileDownloadCancelResult*, DownloadCancelResult);
23DECLARE_DYNAMIC_DELEGATE_ThreeParams(FGetAssetFileStatus,
bool, bIsError,
const FString&, ErrorMessage,
UPico_AssetStatus*, AssetFileStatus);
24DECLARE_DYNAMIC_DELEGATE_ThreeParams(FGetAssetFileList,
bool, bIsError,
const FString&, ErrorMessage,
UPico_AssetDetailsArray*, AssetDetailsArray);
46 FOnlineSubsystemPico& PicoSubsystem;
52 FAssetFileDeleteResult DeleteByIDDelegate;
53 FAssetFileDeleteResult DeleteByNameDelegate;
54 FAssetFileDownloadResult DownloadByIdDelegate;
55 FAssetFileDownloadResult DownloadByNameDelegate;
56 FAssetFileDownloadCancelResult DownloadCancelByIdDelegate;
57 FAssetFileDownloadCancelResult DownloadCancelNameIdDelegate;
58 FGetAssetFileStatus GetAssetFileStatusByIdDelegate;
59 FGetAssetFileStatus GetAssetFileStatusByNameDelegate;
60 FGetAssetFileList GetAssetFileListDelegate;
61 FGetAssetFileList GetNextAssetDetailsArrayPageDelegate;
91 bool DeleteByID(FString AssetFileID, FAssetFileDeleteResult InDeleteByIDDelegate);
106 bool DeleteByName(FString AssetFileName, FAssetFileDeleteResult InDeleteByNameDelegate);
120 bool DownloadById(FString AssetFileID, FAssetFileDownloadResult InDownloadByIDDelegate);
134 bool DownloadByName(FString AssetFileName, FAssetFileDownloadResult InDownloadByNameDelegate);
148 bool DownloadCancelById(FString AssetFileID, FAssetFileDownloadCancelResult InDownloadCancelByIDDelegate);
162 bool DownloadCancelByName(FString AssetFileName, FAssetFileDownloadCancelResult InDownloadCancelByNameDelegate);
219 FDelegateHandle AssetFileDownloadUpdateHandle;
220 void OnAssetFileDownloadUpdate(ppfMessageHandle Message,
bool bIsError);
222 FDelegateHandle AssetFileDeleteForSafetyHandle;
223 void OnAssetFileDeleteForSafety(ppfMessageHandle Message,
bool bIsError);
263 UFUNCTION(BlueprintCallable, meta = (WorldContext =
"WorldContextObject"), Category =
"OnlinePico|AssetFile")
264 static
bool DeleteByID(UObject* WorldContextObject, FString AssetFileID, FAssetFileDeleteResult InDeleteByIDDelegate);
280 UFUNCTION(BlueprintCallable, meta = (WorldContext = "WorldContextObject"), Category = "OnlinePico|AssetFile")
281 static
bool DeleteByName(UObject* WorldContextObject, FString AssetFileName, FAssetFileDeleteResult InDeleteByNameDelegate);
296 UFUNCTION(BlueprintCallable, meta = (WorldContext = "WorldContextObject"), Category = "OnlinePico|AssetFile")
297 static
bool DownloadById(UObject* WorldContextObject, FString AssetFileID, FAssetFileDownloadResult InDownloadByIDDelegate);
312 UFUNCTION(BlueprintCallable, meta = (WorldContext = "WorldContextObject"), Category = "OnlinePico|AssetFile")
313 static
bool DownloadByName(UObject* WorldContextObject, FString AssetFileName, FAssetFileDownloadResult InDownloadByNameDelegate);
328 UFUNCTION(BlueprintCallable, meta = (WorldContext = "WorldContextObject"), Category = "OnlinePico|AssetFile")
329 static
bool DownloadCancelById(UObject* WorldContextObject, FString AssetFileID, FAssetFileDownloadCancelResult InDownloadCancelByIDDelegate);
344 UFUNCTION(BlueprintCallable, meta = (WorldContext = "WorldContextObject"), Category = "OnlinePico|AssetFile")
345 static
bool DownloadCancelByName(UObject* WorldContextObject, FString AssetFileName, FAssetFileDownloadCancelResult InDownloadCancelByNameDelegate);
359 UFUNCTION(BlueprintCallable, meta = (WorldContext = "WorldContextObject"), Category = "OnlinePico|AssetFile")
360 static
bool GetAssetFileList(UObject* WorldContextObject, FGetAssetFileList InGetAssetFileListDelegate);
375 UFUNCTION(BlueprintCallable, meta = (WorldContext = "WorldContextObject"), Category = "OnlinePico|AssetFile")
376 static
bool GetNextAssetDetailsArrayPage(UObject* WorldContextObject,
UPico_AssetDetailsArray* InAssetDetailsArray, FGetAssetFileList InGetNextAssetDetailsArrayPageDelegate);
391 UFUNCTION(BlueprintCallable, meta = (WorldContext = "WorldContextObject"), Category = "OnlinePico|AssetFile")
392 static
bool GetAssetFileStatusById(UObject* WorldContextObject, FString AssetFileID, FGetAssetFileStatus InGetAssetFileStatusByIdDelegate);
407 UFUNCTION(BlueprintCallable, meta = (WorldContext = "WorldContextObject"), Category = "OnlinePico|AssetFile")
408 static
bool GetAssetFileStatusByName(UObject* WorldContextObject, FString AssetFileName, FGetAssetFileStatus InGetAssetFileStatusByNameDelegate);
424 void InitParams(ppfAssetFileDeleteResult* InppfAssetFileDeleteResultHandle);
427 FString AssetId = FString();
428 FString FilePath = FString();
429 bool bIsSuccessed =
false;
430 ppfID ppfAssetId = 0;
435 UFUNCTION(BlueprintPure, Category =
"Pico Platform|AssetFile|Delete Result")
436 FString GetAssetId();
439 UFUNCTION(BlueprintPure, Category = "Pico Platform|AssetFile|Delete Result")
440 FString GetFilePath();
443 UFUNCTION(BlueprintPure, Category = "Pico Platform|AssetFile|Delete Result")
446 ppfID GetppfAssetId();
457 void InitParams(ppfAssetDetails* InppfAssetDetailsHandle);
460 FString AssetId = FString();
461 FString AssetType = FString();
462 FString DownloadStatus = FString();
463 FString FilePath = FString();
464 FString IapStatus = FString();
465 FString Metadata = FString();
466 FString Filename = FString();
468 FString IapSku = FString();
469 FString IapName = FString();
470 FString IapPrice = FString();
471 FString IapCurrency = FString();
472 FString IapDescription = FString();
473 FString IapIconUrl = FString();
474 ppfID ppfAssetId = 0;
478 UFUNCTION(BlueprintPure, Category =
"Pico Platform|AssetFile|Asset Details")
479 FString GetAssetId();
482 UFUNCTION(BlueprintPure, Category = "Pico Platform|AssetFile|Asset Details")
483 FString GetFilePath();
488 UFUNCTION(BlueprintPure, Category = "Pico Platform|AssetFile|Asset Details")
489 FString GetAssetType();
492 UFUNCTION(BlueprintPure, Category = "Pico Platform|AssetFile|Asset Details")
493 FString GetDownloadStatus();
496 UFUNCTION(BlueprintPure, Category = "Pico Platform|AssetFile|Asset Details")
497 FString GetIapStatus();
500 UFUNCTION(BlueprintPure, Category = "Pico Platform|AssetFile|Asset Details")
501 FString GetMetadata();
504 UFUNCTION(BlueprintPure, Category = "Pico Platform|AssetFile|Asset Details")
505 FString GetFilename();
508 UFUNCTION(BlueprintPure, Category = "Pico Platform|AssetFile|Asset Details")
512 UFUNCTION(BlueprintPure, Category = "Pico Platform|AssetFile|Asset Details")
516 UFUNCTION(BlueprintPure, Category = "Pico Platform|AssetFile|Asset Details")
517 FString GetIapName();
520 UFUNCTION(BlueprintPure, Category = "Pico Platform|AssetFile|Asset Details")
521 FString GetIapPrice();
524 UFUNCTION(BlueprintPure, Category = "Pico Platform|AssetFile|Asset Details")
525 FString GetIapCurrency();
528 UFUNCTION(BlueprintPure, Category = "Pico Platform|AssetFile|Asset Details")
529 FString GetIapDescription();
532 UFUNCTION(BlueprintPure, Category = "Pico Platform|AssetFile|Asset Details")
533 FString GetIapIconUrl();
535 ppfID GetppfAssetId();
546 void InitParams(ppfAssetDetailsArray* InppfAssetDetailsArrayHandle);
550 TArray<UPico_AssetDetails*> AssetDetailsArray;
553 bool bHasNextPage =
false;
554 FString NextPageParam = FString();
560 UFUNCTION(BlueprintPure, Category =
"Pico Platform|AssetFile|Asset Details Array")
564 UFUNCTION(BlueprintPure, Category = "Pico Platform|AssetFile|Asset Details Array")
568 UFUNCTION(BlueprintPure, Category = "Pico Platform|AssetFile|Asset Details Array")
569 bool GetHasNextPage();
571 UFUNCTION(BlueprintPure, Category = "Pico Platform|AssetFile|Asset Details Array")
572 FString GetNextPageParam();
583 void InitParams(ppfAssetFileDownloadCancelResult* InppfAssetFileDownloadCancelResultHandle);
586 FString AssetId = FString();
587 FString FilePath = FString();
588 bool bIsSuccessed =
false;
589 ppfID ppfAssetId = 0;
593 UFUNCTION(BlueprintPure, Category =
"Pico Platform|AssetFile|Download Cancel Result")
594 FString GetAssetId();
597 UFUNCTION(BlueprintPure, Category = "Pico Platform|AssetFile|Download Cancel Result")
598 FString GetFilePath();
601 UFUNCTION(BlueprintPure, Category = "Pico Platform|AssetFile|Download Cancel Result")
604 ppfID GetppfAssetId();
615 void InitParams(ppfAssetFileDownloadUpdate* InppfAssetFileDownloadUpdateHandle);
618 FString AssetId = FString();
619 int64 BytesTotal = 0;
620 int64 BytesTransferred = 0;
622 ppfID ppfAssetId = 0;
627 UFUNCTION(BlueprintPure, Category =
"Pico Platform|AssetFile|Download Update")
628 FString GetAssetId();
631 UFUNCTION(BlueprintPure, Category = "Pico Platform|AssetFile|Download Update")
632 int64 GetBytesTotal();
635 UFUNCTION(BlueprintPure, Category = "Pico Platform|AssetFile|Download Update")
636 int64 GetBytesTransferred();
639 UFUNCTION(BlueprintPure, Category = "Pico Platform|AssetFile|Download Update")
642 ppfID GetppfAssetId();
653 void InitParams(ppfAssetFileDownloadResult* InppfAssetFileDownloadResultHandle);
656 FString AssetId = FString();
657 FString FilePath = FString();
658 ppfID ppfAssetId = 0;
663 UFUNCTION(BlueprintPure, Category =
"Pico Platform|AssetFile|Download Result")
664 FString GetAssetId();
667 UFUNCTION(BlueprintPure, Category = "Pico Platform|AssetFile|Download Result")
668 FString GetFilePath();
670 ppfID GetppfAssetId();
681 void InitParams(ppfAssetStatus* InppfAssetStatusHandle);
684 FString AssetId = FString();
685 FString FilePath = FString();
686 FString FileName = FString();
687 FString DownloadStatus = FString();
688 ppfID ppfAssetId = 0;
693 UFUNCTION(BlueprintPure, Category =
"Pico Platform|AssetFile|Asset Status")
694 FString GetAssetId();
697 UFUNCTION(BlueprintPure, Category = "Pico Platform|AssetFile|Asset Status")
698 FString GetFilePath();
701 UFUNCTION(BlueprintPure, Category = "Pico Platform|AssetFile|Asset Status")
702 FString GetFileName();
705 UFUNCTION(BlueprintPure, Category = "Pico Platform|AssetFile|Asset Status")
706 FString GetDownloadStatus();
708 ppfID GetppfAssetId();
719 void InitParams(ppfAssetFileDeleteForSafety* InppfAssetFileDeleteForSafetyHandle);
722 FString AssetId = FString();
723 FString Reason = FString();
724 ppfID ppfAssetId = 0;
729 UFUNCTION(BlueprintPure, Category =
"Pico Platform|AssetFile|Delete For Safety")
730 FString GetAssetId();
733 UFUNCTION(BlueprintPure, Category = "Pico Platform|AssetFile|Delete For Safety")
736 ppfID GetppfAssetId();
PicoAssetFileInterface class.
Definition: Pico_AssetFile.h:43
bool DownloadCancelByName(FString AssetFileName, FAssetFileDownloadCancelResult InDownloadCancelByNameDelegate)
Cancels the download of an asset file by asset file name.
bool DownloadCancelById(FString AssetFileID, FAssetFileDownloadCancelResult InDownloadCancelByIDDelegate)
Cancels the download of an asset file by asset file ID.
FAssetFileDeleteForSafetyNotify AssetFileDeleteForSafetyCallback
Sets the callback to automatically delete a downloaded asset file if it is different from the origina...
Definition: Pico_AssetFile.h:76
bool DownloadById(FString AssetFileID, FAssetFileDownloadResult InDownloadByIDDelegate)
Downloads an asset file by asset file ID.
bool DeleteByName(FString AssetFileName, FAssetFileDeleteResult InDeleteByNameDelegate)
Deletes an installed asset file by asset file name. The corresponding asset file will be removed from...
bool GetAssetFileStatusById(FString AssetFileID, FGetAssetFileStatus InGetAssetFileStatusByIdDelegate)
Gets the download status of an asset file by asset file ID.
bool DeleteByID(FString AssetFileID, FAssetFileDeleteResult InDeleteByIDDelegate)
Deletes an installed asset file by asset file ID. The corresponding asset file will be removed from t...
FAssetFileDownloadUpdateNotify AssetFileDownloadUpdateCallback
Sets the callback to track the download progress of asset file. The Transferred field indicates the n...
Definition: Pico_AssetFile.h:69
bool GetNextAssetDetailsArrayPage(UPico_AssetDetailsArray *InAssetDetailsArray, FGetAssetFileList InGetNextAssetDetailsArrayPageDelegate)
Gets the next page of the asset file list.
bool DownloadByName(FString AssetFileName, FAssetFileDownloadResult InDownloadByNameDelegate)
Downloads an asset file by asset file name.
bool GetAssetFileStatusByName(FString AssetFileName, FGetAssetFileStatus InGetAssetFileStatusByNameDelegate)
Gets the download status of an asset file by asset file name.
bool GetAssetFileList(FGetAssetFileList InGetAssetFileListDelegate)
Gets the asset file list.
OnlinePicoAssetFile Blueprint Function class.
Definition: Pico_AssetFile.h:243
UPico_AssetDetailsArray class.
Definition: Pico_AssetFile.h:541
UPico_AssetDetails class.
Definition: Pico_AssetFile.h:452
UPico_AssetFileDeleteForSafety class.
Definition: Pico_AssetFile.h:714
UPico_AssetFileDeleteResult class.
Definition: Pico_AssetFile.h:419
UPico_AssetFileDownloadCancelResult class.
Definition: Pico_AssetFile.h:578
UPico_AssetFileDownloadResult class.
Definition: Pico_AssetFile.h:648
UPico_AssetFileDownloadUpdate class.
Definition: Pico_AssetFile.h:610
UPico_AssetStatus class.
Definition: Pico_AssetFile.h:676
EAssetFileDownloadCompleteStatus
The status of the file in the file download process.
Definition: OnlineSubsystemPicoNames.h:579