Loading...
Searching...
No Matches
AccelByte::IAccelBytePlatformWrapper Class Referenceabstract

Platform Wrapper Interface to implement specific functionalities of given Native Platform. More...

#include <IAccelBytePlatformWrapper.h>

Public Member Functions

virtual FString GetAppId ()=0
 Retrieve App Id of the game on specific Native Platform.
virtual FString GetPlatformUserId (TMap< FString, FString > const &ExtraAttributes={})=0
 Retrieve User Id that was playing the game on the Native Platform.
virtual void FetchPlatformToken (TDelegate< void(FString const &)> Delegate, TMap< FString, FString > const &ExtraAttributes={})=0
 Fetch Platform Token or Auth Code on specific Native Platform.
virtual void FetchPlatformFriends (const TDelegate< void(const TArray< FPlatformUser > &)> &OnSuccess, const TDelegate< void(const FPlatformHandlerError &)> &OnError)=0
 Retrieve native platform friends.
virtual void GetProductsBySku (const TArray< FString > &Skus, const TDelegate< void(const TArray< FPlatformProductPtr > &)> &OnSuccess, const TDelegate< void(const FPlatformHandlerError &)> &OnError)=0
 Get products from native platform store by SKUs.
virtual void GetPurchasedProducts (const TDelegate< void(const TArray< FPlatformPurchasePtr > &)> &OnSuccess, const TDelegate< void(const FPlatformHandlerError &)> &OnError)=0
 Get all purchased products from native platform store for current user.
virtual void CheckoutProduct (const FString &Sku, const TDelegate< void(const FPlatformPurchasePtr &)> &OnSuccess, const TDelegate< void(const FPlatformHandlerError &)> &OnError)=0
 Launch native platform checkout flow.
virtual void ConsumeProduct (const FString &Sku, const TDelegate< void(const FPlatformConsumeItemResponsePtr &)> &OnSuccess, const TDelegate< void(const FPlatformHandlerError &)> &OnError)=0
 Consume purchased product.

Detailed Description

Platform Wrapper Interface to implement specific functionalities of given Native Platform.

Member Function Documentation

◆ CheckoutProduct()

virtual void AccelByte::IAccelBytePlatformWrapper::CheckoutProduct ( const FString & Sku,
const TDelegate< void(const FPlatformPurchasePtr &)> & OnSuccess,
const TDelegate< void(const FPlatformHandlerError &)> & OnError )
pure virtual

Launch native platform checkout flow.

Parameters
SkuThe Sku of product.
OnSuccessA callback delegate that will be triggered to return purchase details.
OnErrorA callback delegate that will be triggered if the request failed.

◆ ConsumeProduct()

virtual void AccelByte::IAccelBytePlatformWrapper::ConsumeProduct ( const FString & Sku,
const TDelegate< void(const FPlatformConsumeItemResponsePtr &)> & OnSuccess,
const TDelegate< void(const FPlatformHandlerError &)> & OnError )
pure virtual

Consume purchased product.

Parameters
SkuThe Sku of product.
OnSuccessA callback delegate that will be triggered to return true if product consumed successfully.
OnErrorA callback delegate that will be triggered if the request failed.

◆ FetchPlatformFriends()

virtual void AccelByte::IAccelBytePlatformWrapper::FetchPlatformFriends ( const TDelegate< void(const TArray< FPlatformUser > &)> & OnSuccess,
const TDelegate< void(const FPlatformHandlerError &)> & OnError )
pure virtual

Retrieve native platform friends.

Parameters
OnSuccessA callback delegate that will be triggered to return native platform friends.
OnErrorA callback delegate that will be triggered if the request failed.

◆ FetchPlatformToken()

virtual void AccelByte::IAccelBytePlatformWrapper::FetchPlatformToken ( TDelegate< void(FString const &)> Delegate,
TMap< FString, FString > const & ExtraAttributes = {} )
pure virtual

Fetch Platform Token or Auth Code on specific Native Platform.

Parameters
DelegateA callback delegate that will be triggered to return the Platform Token value whether success or not.
ExtraAttributesKey-Value pairs for additional information needed to get the Platform Token e.g. service identity in Steam. (optional)

◆ GetAppId()

virtual FString AccelByte::IAccelBytePlatformWrapper::GetAppId ( )
pure virtual

Retrieve App Id of the game on specific Native Platform.

Returns
AppId of the game.

◆ GetPlatformUserId()

virtual FString AccelByte::IAccelBytePlatformWrapper::GetPlatformUserId ( TMap< FString, FString > const & ExtraAttributes = {})
pure virtual

Retrieve User Id that was playing the game on the Native Platform.

Parameters
ExtraAttributesKey-Value pairs to determine which player info that were trying to retrieve e.g. LocalUserIndex. (optional)
Returns
Specific Platform User Id.

◆ GetProductsBySku()

virtual void AccelByte::IAccelBytePlatformWrapper::GetProductsBySku ( const TArray< FString > & Skus,
const TDelegate< void(const TArray< FPlatformProductPtr > &)> & OnSuccess,
const TDelegate< void(const FPlatformHandlerError &)> & OnError )
pure virtual

Get products from native platform store by SKUs.

Parameters
SkusArray of product SKU.
OnSuccessA callback delegate that will be triggered to return array of products.
OnErrorA callback delegate that will be triggered if the request failed.

◆ GetPurchasedProducts()

virtual void AccelByte::IAccelBytePlatformWrapper::GetPurchasedProducts ( const TDelegate< void(const TArray< FPlatformPurchasePtr > &)> & OnSuccess,
const TDelegate< void(const FPlatformHandlerError &)> & OnError )
pure virtual

Get all purchased products from native platform store for current user.

Parameters
OnSuccessA callback delegate that will be triggered to return array of purchases.
OnErrorA callback delegate that will be triggered if the request failed.