Skip to content

Commit

Permalink
https://docs.microsoft.com/en-us/gaming/playfab/release-notes/#240426
Browse files Browse the repository at this point in the history
  • Loading branch information
PlayFab SDK Team authored and PlayFab SDK Team committed Apr 30, 2024
2 parents a93f03c + 8710e8d commit affff07
Show file tree
Hide file tree
Showing 20 changed files with 1,973 additions and 185 deletions.
516 changes: 442 additions & 74 deletions code/include/playfab/PlayFabAdminDataModels.h

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions code/include/playfab/PlayFabCloudScriptApi.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,15 @@ namespace PlayFab
static void ExecuteEntityCloudScript(CloudScriptModels::ExecuteEntityCloudScriptRequest& request, const ProcessApiCallback<CloudScriptModels::ExecuteCloudScriptResult> callback, const ErrorCallback errorCallback = nullptr, void* customData = nullptr);
static void ExecuteFunction(CloudScriptModels::ExecuteFunctionRequest& request, const ProcessApiCallback<CloudScriptModels::ExecuteFunctionResult> callback, const ErrorCallback errorCallback = nullptr, void* customData = nullptr);
static void GetFunction(CloudScriptModels::GetFunctionRequest& request, const ProcessApiCallback<CloudScriptModels::GetFunctionResult> callback, const ErrorCallback errorCallback = nullptr, void* customData = nullptr);
static void ListEventHubFunctions(CloudScriptModels::ListFunctionsRequest& request, const ProcessApiCallback<CloudScriptModels::ListEventHubFunctionsResult> callback, const ErrorCallback errorCallback = nullptr, void* customData = nullptr);
static void ListFunctions(CloudScriptModels::ListFunctionsRequest& request, const ProcessApiCallback<CloudScriptModels::ListFunctionsResult> callback, const ErrorCallback errorCallback = nullptr, void* customData = nullptr);
static void ListHttpFunctions(CloudScriptModels::ListFunctionsRequest& request, const ProcessApiCallback<CloudScriptModels::ListHttpFunctionsResult> callback, const ErrorCallback errorCallback = nullptr, void* customData = nullptr);
static void ListQueuedFunctions(CloudScriptModels::ListFunctionsRequest& request, const ProcessApiCallback<CloudScriptModels::ListQueuedFunctionsResult> callback, const ErrorCallback errorCallback = nullptr, void* customData = nullptr);
static void PostFunctionResultForEntityTriggeredAction(CloudScriptModels::PostFunctionResultForEntityTriggeredActionRequest& request, const ProcessApiCallback<CloudScriptModels::EmptyResult> callback, const ErrorCallback errorCallback = nullptr, void* customData = nullptr);
static void PostFunctionResultForFunctionExecution(CloudScriptModels::PostFunctionResultForFunctionExecutionRequest& request, const ProcessApiCallback<CloudScriptModels::EmptyResult> callback, const ErrorCallback errorCallback = nullptr, void* customData = nullptr);
static void PostFunctionResultForPlayerTriggeredAction(CloudScriptModels::PostFunctionResultForPlayerTriggeredActionRequest& request, const ProcessApiCallback<CloudScriptModels::EmptyResult> callback, const ErrorCallback errorCallback = nullptr, void* customData = nullptr);
static void PostFunctionResultForScheduledTask(CloudScriptModels::PostFunctionResultForScheduledTaskRequest& request, const ProcessApiCallback<CloudScriptModels::EmptyResult> callback, const ErrorCallback errorCallback = nullptr, void* customData = nullptr);
static void RegisterEventHubFunction(CloudScriptModels::RegisterEventHubFunctionRequest& request, const ProcessApiCallback<CloudScriptModels::EmptyResult> callback, const ErrorCallback errorCallback = nullptr, void* customData = nullptr);
static void RegisterHttpFunction(CloudScriptModels::RegisterHttpFunctionRequest& request, const ProcessApiCallback<CloudScriptModels::EmptyResult> callback, const ErrorCallback errorCallback = nullptr, void* customData = nullptr);
static void RegisterQueuedFunction(CloudScriptModels::RegisterQueuedFunctionRequest& request, const ProcessApiCallback<CloudScriptModels::EmptyResult> callback, const ErrorCallback errorCallback = nullptr, void* customData = nullptr);
static void UnregisterFunction(CloudScriptModels::UnregisterFunctionRequest& request, const ProcessApiCallback<CloudScriptModels::EmptyResult> callback, const ErrorCallback errorCallback = nullptr, void* customData = nullptr);
Expand All @@ -51,13 +53,15 @@ namespace PlayFab
static void OnExecuteEntityCloudScriptResult(int httpCode, const std::string& result, const std::shared_ptr<CallRequestContainerBase>& reqContainer);
static void OnExecuteFunctionResult(int httpCode, const std::string& result, const std::shared_ptr<CallRequestContainerBase>& reqContainer);
static void OnGetFunctionResult(int httpCode, const std::string& result, const std::shared_ptr<CallRequestContainerBase>& reqContainer);
static void OnListEventHubFunctionsResult(int httpCode, const std::string& result, const std::shared_ptr<CallRequestContainerBase>& reqContainer);
static void OnListFunctionsResult(int httpCode, const std::string& result, const std::shared_ptr<CallRequestContainerBase>& reqContainer);
static void OnListHttpFunctionsResult(int httpCode, const std::string& result, const std::shared_ptr<CallRequestContainerBase>& reqContainer);
static void OnListQueuedFunctionsResult(int httpCode, const std::string& result, const std::shared_ptr<CallRequestContainerBase>& reqContainer);
static void OnPostFunctionResultForEntityTriggeredActionResult(int httpCode, const std::string& result, const std::shared_ptr<CallRequestContainerBase>& reqContainer);
static void OnPostFunctionResultForFunctionExecutionResult(int httpCode, const std::string& result, const std::shared_ptr<CallRequestContainerBase>& reqContainer);
static void OnPostFunctionResultForPlayerTriggeredActionResult(int httpCode, const std::string& result, const std::shared_ptr<CallRequestContainerBase>& reqContainer);
static void OnPostFunctionResultForScheduledTaskResult(int httpCode, const std::string& result, const std::shared_ptr<CallRequestContainerBase>& reqContainer);
static void OnRegisterEventHubFunctionResult(int httpCode, const std::string& result, const std::shared_ptr<CallRequestContainerBase>& reqContainer);
static void OnRegisterHttpFunctionResult(int httpCode, const std::string& result, const std::shared_ptr<CallRequestContainerBase>& reqContainer);
static void OnRegisterQueuedFunctionResult(int httpCode, const std::string& result, const std::shared_ptr<CallRequestContainerBase>& reqContainer);
static void OnUnregisterFunctionResult(int httpCode, const std::string& result, const std::shared_ptr<CallRequestContainerBase>& reqContainer);
Expand Down
125 changes: 124 additions & 1 deletion code/include/playfab/PlayFabCloudScriptDataModels.h
Original file line number Diff line number Diff line change
Expand Up @@ -3381,7 +3381,8 @@ namespace PlayFab
enum class TriggerType
{
TriggerTypeHTTP,
TriggerTypeQueue
TriggerTypeQueue,
TriggerTypeEventHub
};

inline void ToJsonEnum(const TriggerType input, Json::Value& output)
Expand All @@ -3396,6 +3397,11 @@ namespace PlayFab
output = Json::Value("Queue");
return;
}
if (input == TriggerType::TriggerTypeEventHub)
{
output = Json::Value("EventHub");
return;
}
}
inline void FromJsonEnum(const Json::Value& input, TriggerType& output)
{
Expand All @@ -3414,6 +3420,11 @@ namespace PlayFab
output = TriggerType::TriggerTypeQueue;
return;
}
if (inputStr == "EventHub")
{
output = TriggerType::TriggerTypeEventHub;
return;
}
}

// CloudScript Classes
Expand Down Expand Up @@ -3553,6 +3564,45 @@ namespace PlayFab
}
};

struct EventHubFunctionModel : public PlayFabBaseModel
{
std::string ConnectionString;
std::string EventHubName;
std::string FunctionName;

EventHubFunctionModel() :
PlayFabBaseModel(),
ConnectionString(),
EventHubName(),
FunctionName()
{}

EventHubFunctionModel(const EventHubFunctionModel& src) :
PlayFabBaseModel(),
ConnectionString(src.ConnectionString),
EventHubName(src.EventHubName),
FunctionName(src.FunctionName)
{}

~EventHubFunctionModel() = default;

void FromJson(const Json::Value& input) override
{
FromJsonUtilS(input["ConnectionString"], ConnectionString);
FromJsonUtilS(input["EventHubName"], EventHubName);
FromJsonUtilS(input["FunctionName"], FunctionName);
}

Json::Value ToJson() const override
{
Json::Value output;
Json::Value each_ConnectionString; ToJsonUtilS(ConnectionString, each_ConnectionString); output["ConnectionString"] = each_ConnectionString;
Json::Value each_EventHubName; ToJsonUtilS(EventHubName, each_EventHubName); output["EventHubName"] = each_EventHubName;
Json::Value each_FunctionName; ToJsonUtilS(FunctionName, each_FunctionName); output["FunctionName"] = each_FunctionName;
return output;
}
};

struct ScriptExecutionError : public PlayFabBaseModel
{
std::string Error;
Expand Down Expand Up @@ -4106,6 +4156,35 @@ namespace PlayFab
}
};

struct ListEventHubFunctionsResult : public PlayFabResultCommon
{
std::list<EventHubFunctionModel> Functions;

ListEventHubFunctionsResult() :
PlayFabResultCommon(),
Functions()
{}

ListEventHubFunctionsResult(const ListEventHubFunctionsResult& src) :
PlayFabResultCommon(),
Functions(src.Functions)
{}

~ListEventHubFunctionsResult() = default;

void FromJson(const Json::Value& input) override
{
FromJsonUtilO(input["Functions"], Functions);
}

Json::Value ToJson() const override
{
Json::Value output;
Json::Value each_Functions; ToJsonUtilO(Functions, each_Functions); output["Functions"] = each_Functions;
return output;
}
};

struct ListFunctionsRequest : public PlayFabRequestCommon
{
std::map<std::string, std::string> CustomTags;
Expand Down Expand Up @@ -4932,6 +5011,50 @@ namespace PlayFab
}
};

struct RegisterEventHubFunctionRequest : public PlayFabRequestCommon
{
std::string ConnectionString;
std::map<std::string, std::string> CustomTags;
std::string EventHubName;
std::string FunctionName;

RegisterEventHubFunctionRequest() :
PlayFabRequestCommon(),
ConnectionString(),
CustomTags(),
EventHubName(),
FunctionName()
{}

RegisterEventHubFunctionRequest(const RegisterEventHubFunctionRequest& src) :
PlayFabRequestCommon(),
ConnectionString(src.ConnectionString),
CustomTags(src.CustomTags),
EventHubName(src.EventHubName),
FunctionName(src.FunctionName)
{}

~RegisterEventHubFunctionRequest() = default;

void FromJson(const Json::Value& input) override
{
FromJsonUtilS(input["ConnectionString"], ConnectionString);
FromJsonUtilS(input["CustomTags"], CustomTags);
FromJsonUtilS(input["EventHubName"], EventHubName);
FromJsonUtilS(input["FunctionName"], FunctionName);
}

Json::Value ToJson() const override
{
Json::Value output;
Json::Value each_ConnectionString; ToJsonUtilS(ConnectionString, each_ConnectionString); output["ConnectionString"] = each_ConnectionString;
Json::Value each_CustomTags; ToJsonUtilS(CustomTags, each_CustomTags); output["CustomTags"] = each_CustomTags;
Json::Value each_EventHubName; ToJsonUtilS(EventHubName, each_EventHubName); output["EventHubName"] = each_EventHubName;
Json::Value each_FunctionName; ToJsonUtilS(FunctionName, each_FunctionName); output["FunctionName"] = each_FunctionName;
return output;
}
};

struct RegisterHttpFunctionRequest : public PlayFabRequestCommon
{
std::map<std::string, std::string> CustomTags;
Expand Down
4 changes: 4 additions & 0 deletions code/include/playfab/PlayFabCloudScriptInstanceApi.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,15 @@ namespace PlayFab
void ExecuteEntityCloudScript(CloudScriptModels::ExecuteEntityCloudScriptRequest& request, const ProcessApiCallback<CloudScriptModels::ExecuteCloudScriptResult> callback, const ErrorCallback errorCallback = nullptr, void* customData = nullptr);
void ExecuteFunction(CloudScriptModels::ExecuteFunctionRequest& request, const ProcessApiCallback<CloudScriptModels::ExecuteFunctionResult> callback, const ErrorCallback errorCallback = nullptr, void* customData = nullptr);
void GetFunction(CloudScriptModels::GetFunctionRequest& request, const ProcessApiCallback<CloudScriptModels::GetFunctionResult> callback, const ErrorCallback errorCallback = nullptr, void* customData = nullptr);
void ListEventHubFunctions(CloudScriptModels::ListFunctionsRequest& request, const ProcessApiCallback<CloudScriptModels::ListEventHubFunctionsResult> callback, const ErrorCallback errorCallback = nullptr, void* customData = nullptr);
void ListFunctions(CloudScriptModels::ListFunctionsRequest& request, const ProcessApiCallback<CloudScriptModels::ListFunctionsResult> callback, const ErrorCallback errorCallback = nullptr, void* customData = nullptr);
void ListHttpFunctions(CloudScriptModels::ListFunctionsRequest& request, const ProcessApiCallback<CloudScriptModels::ListHttpFunctionsResult> callback, const ErrorCallback errorCallback = nullptr, void* customData = nullptr);
void ListQueuedFunctions(CloudScriptModels::ListFunctionsRequest& request, const ProcessApiCallback<CloudScriptModels::ListQueuedFunctionsResult> callback, const ErrorCallback errorCallback = nullptr, void* customData = nullptr);
void PostFunctionResultForEntityTriggeredAction(CloudScriptModels::PostFunctionResultForEntityTriggeredActionRequest& request, const ProcessApiCallback<CloudScriptModels::EmptyResult> callback, const ErrorCallback errorCallback = nullptr, void* customData = nullptr);
void PostFunctionResultForFunctionExecution(CloudScriptModels::PostFunctionResultForFunctionExecutionRequest& request, const ProcessApiCallback<CloudScriptModels::EmptyResult> callback, const ErrorCallback errorCallback = nullptr, void* customData = nullptr);
void PostFunctionResultForPlayerTriggeredAction(CloudScriptModels::PostFunctionResultForPlayerTriggeredActionRequest& request, const ProcessApiCallback<CloudScriptModels::EmptyResult> callback, const ErrorCallback errorCallback = nullptr, void* customData = nullptr);
void PostFunctionResultForScheduledTask(CloudScriptModels::PostFunctionResultForScheduledTaskRequest& request, const ProcessApiCallback<CloudScriptModels::EmptyResult> callback, const ErrorCallback errorCallback = nullptr, void* customData = nullptr);
void RegisterEventHubFunction(CloudScriptModels::RegisterEventHubFunctionRequest& request, const ProcessApiCallback<CloudScriptModels::EmptyResult> callback, const ErrorCallback errorCallback = nullptr, void* customData = nullptr);
void RegisterHttpFunction(CloudScriptModels::RegisterHttpFunctionRequest& request, const ProcessApiCallback<CloudScriptModels::EmptyResult> callback, const ErrorCallback errorCallback = nullptr, void* customData = nullptr);
void RegisterQueuedFunction(CloudScriptModels::RegisterQueuedFunctionRequest& request, const ProcessApiCallback<CloudScriptModels::EmptyResult> callback, const ErrorCallback errorCallback = nullptr, void* customData = nullptr);
void UnregisterFunction(CloudScriptModels::UnregisterFunctionRequest& request, const ProcessApiCallback<CloudScriptModels::EmptyResult> callback, const ErrorCallback errorCallback = nullptr, void* customData = nullptr);
Expand All @@ -63,13 +65,15 @@ namespace PlayFab
void OnExecuteEntityCloudScriptResult(int httpCode, const std::string& result, const std::shared_ptr<CallRequestContainerBase>& reqContainer);
void OnExecuteFunctionResult(int httpCode, const std::string& result, const std::shared_ptr<CallRequestContainerBase>& reqContainer);
void OnGetFunctionResult(int httpCode, const std::string& result, const std::shared_ptr<CallRequestContainerBase>& reqContainer);
void OnListEventHubFunctionsResult(int httpCode, const std::string& result, const std::shared_ptr<CallRequestContainerBase>& reqContainer);
void OnListFunctionsResult(int httpCode, const std::string& result, const std::shared_ptr<CallRequestContainerBase>& reqContainer);
void OnListHttpFunctionsResult(int httpCode, const std::string& result, const std::shared_ptr<CallRequestContainerBase>& reqContainer);
void OnListQueuedFunctionsResult(int httpCode, const std::string& result, const std::shared_ptr<CallRequestContainerBase>& reqContainer);
void OnPostFunctionResultForEntityTriggeredActionResult(int httpCode, const std::string& result, const std::shared_ptr<CallRequestContainerBase>& reqContainer);
void OnPostFunctionResultForFunctionExecutionResult(int httpCode, const std::string& result, const std::shared_ptr<CallRequestContainerBase>& reqContainer);
void OnPostFunctionResultForPlayerTriggeredActionResult(int httpCode, const std::string& result, const std::shared_ptr<CallRequestContainerBase>& reqContainer);
void OnPostFunctionResultForScheduledTaskResult(int httpCode, const std::string& result, const std::shared_ptr<CallRequestContainerBase>& reqContainer);
void OnRegisterEventHubFunctionResult(int httpCode, const std::string& result, const std::shared_ptr<CallRequestContainerBase>& reqContainer);
void OnRegisterHttpFunctionResult(int httpCode, const std::string& result, const std::shared_ptr<CallRequestContainerBase>& reqContainer);
void OnRegisterQueuedFunctionResult(int httpCode, const std::string& result, const std::shared_ptr<CallRequestContainerBase>& reqContainer);
void OnUnregisterFunctionResult(int httpCode, const std::string& result, const std::shared_ptr<CallRequestContainerBase>& reqContainer);
Expand Down
Loading

0 comments on commit affff07

Please sign in to comment.