[LYN-7530] Fix matchmaking request type typo and add more matchmaking notifications (#4774)
* [LYN-7530] Fix matchmaking request type typo and add more matchmaking notifications Signed-off-by: onecent1101 <liug@amazon.com>
This commit is contained in:
+4
-63
@@ -5,75 +5,16 @@
|
||||
* SPDX-License-Identifier: Apache-2.0 OR MIT
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <AzCore/EBus/EBus.h>
|
||||
#include <AzCore/RTTI/BehaviorContext.h>
|
||||
#include <AzCore/std/string/string.h>
|
||||
#include <AzFramework/Matchmaking/IMatchmakingRequests.h>
|
||||
#include <AzFramework/Session/ISessionRequests.h>
|
||||
|
||||
namespace AWSGameLift
|
||||
{
|
||||
//! IAWSGameLiftRequests
|
||||
//! GameLift Gem interfaces to configure client manager
|
||||
class IAWSGameLiftRequests
|
||||
{
|
||||
public:
|
||||
AZ_RTTI(IAWSGameLiftRequests, "{494167AD-1185-4AF3-8BF9-C8C37FC9C199}");
|
||||
|
||||
IAWSGameLiftRequests() = default;
|
||||
virtual ~IAWSGameLiftRequests() = default;
|
||||
|
||||
//! ConfigureGameLiftClient
|
||||
//! Configure GameLift client to interact with Amazon GameLift service
|
||||
//! @param region Specifies the AWS region to use
|
||||
//! @return True if client configuration succeeds, false otherwise
|
||||
virtual bool ConfigureGameLiftClient(const AZStd::string& region) = 0;
|
||||
|
||||
//! CreatePlayerId
|
||||
//! Create a new, random ID number for every player in every new game session.
|
||||
//! @param includeBrackets Whether includes brackets in player id
|
||||
//! @param includeDashes Whether includes dashes in player id
|
||||
//! @return The player id to use in game session
|
||||
virtual AZStd::string CreatePlayerId(bool includeBrackets, bool includeDashes) = 0;
|
||||
};
|
||||
|
||||
// IAWSGameLiftRequests EBus wrapper for scripting
|
||||
class AWSGameLiftRequests
|
||||
: public AZ::EBusTraits
|
||||
{
|
||||
public:
|
||||
using MutexType = AZStd::recursive_mutex;
|
||||
static const AZ::EBusHandlerPolicy HandlerPolicy = AZ::EBusHandlerPolicy::Single;
|
||||
static const AZ::EBusAddressPolicy AddressPolicy = AZ::EBusAddressPolicy::Single;
|
||||
};
|
||||
using AWSGameLiftRequestBus = AZ::EBus<IAWSGameLiftRequests, AWSGameLiftRequests>;
|
||||
|
||||
// ISessionAsyncRequests EBus wrapper for scripting
|
||||
class AWSGameLiftSessionAsyncRequests
|
||||
: public AZ::EBusTraits
|
||||
{
|
||||
public:
|
||||
using MutexType = AZStd::recursive_mutex;
|
||||
static const AZ::EBusHandlerPolicy HandlerPolicy = AZ::EBusHandlerPolicy::Single;
|
||||
static const AZ::EBusAddressPolicy AddressPolicy = AZ::EBusAddressPolicy::Single;
|
||||
};
|
||||
using AWSGameLiftSessionAsyncRequestBus = AZ::EBus<AzFramework::ISessionAsyncRequests, AWSGameLiftSessionAsyncRequests>;
|
||||
|
||||
// ISessionRequests EBus wrapper for scripting
|
||||
class AWSGameLiftSessionRequests
|
||||
: public AZ::EBusTraits
|
||||
{
|
||||
public:
|
||||
using MutexType = AZStd::recursive_mutex;
|
||||
static const AZ::EBusHandlerPolicy HandlerPolicy = AZ::EBusHandlerPolicy::Single;
|
||||
static const AZ::EBusAddressPolicy AddressPolicy = AZ::EBusAddressPolicy::Single;
|
||||
};
|
||||
using AWSGameLiftSessionRequestBus = AZ::EBus<AzFramework::ISessionRequests, AWSGameLiftSessionRequests>;
|
||||
|
||||
// IMatchmakingAsyncRequests EBus wrapper for scripting
|
||||
// IMatchmakingAsyncRequests EBus wrapper
|
||||
class AWSGameLiftMatchmakingAsyncRequests
|
||||
: public AZ::EBusTraits
|
||||
{
|
||||
@@ -84,7 +25,7 @@ namespace AWSGameLift
|
||||
};
|
||||
using AWSGameLiftMatchmakingAsyncRequestBus = AZ::EBus<AzFramework::IMatchmakingAsyncRequests, AWSGameLiftMatchmakingAsyncRequests>;
|
||||
|
||||
// IMatchmakingRequests EBus wrapper for scripting
|
||||
// IMatchmakingRequests EBus wrapper
|
||||
class AWSGameLiftMatchmakingRequests
|
||||
: public AZ::EBusTraits
|
||||
{
|
||||
@@ -121,7 +62,7 @@ namespace AWSGameLift
|
||||
virtual void StopPolling() = 0;
|
||||
};
|
||||
|
||||
// IAWSGameLiftMatchmakingEventRequests EBus wrapper for scripting
|
||||
// IAWSGameLiftMatchmakingEventRequests EBus wrapper
|
||||
class AWSGameLiftMatchmakingEventRequests
|
||||
: public AZ::EBusTraits
|
||||
{
|
||||
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* Copyright (c) Contributors to the Open 3D Engine Project.
|
||||
* For complete copyright and license terms please see the LICENSE at the root of this distribution.
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0 OR MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <AzCore/EBus/EBus.h>
|
||||
#include <AzCore/std/string/string.h>
|
||||
|
||||
namespace AWSGameLift
|
||||
{
|
||||
//! IAWSGameLiftRequests
|
||||
//! GameLift Gem interfaces to configure GameLift client and other help functions,
|
||||
//! like creating random GameLift player id
|
||||
class IAWSGameLiftRequests
|
||||
{
|
||||
public:
|
||||
AZ_RTTI(IAWSGameLiftRequests, "{494167AD-1185-4AF3-8BF9-C8C37FC9C199}");
|
||||
|
||||
IAWSGameLiftRequests() = default;
|
||||
virtual ~IAWSGameLiftRequests() = default;
|
||||
|
||||
//! ConfigureGameLiftClient
|
||||
//! Configure GameLift client to interact with Amazon GameLift service
|
||||
//! @param region Specifies the AWS region to use
|
||||
//! @return True if client configuration succeeds, false otherwise
|
||||
virtual bool ConfigureGameLiftClient(const AZStd::string& region) = 0;
|
||||
|
||||
//! CreatePlayerId
|
||||
//! Create a new, random ID number for every player in every new game session.
|
||||
//! @param includeBrackets Whether includes brackets in player id
|
||||
//! @param includeDashes Whether includes dashes in player id
|
||||
//! @return The player id to use in game session
|
||||
virtual AZStd::string CreatePlayerId(bool includeBrackets, bool includeDashes) = 0;
|
||||
};
|
||||
|
||||
// IAWSGameLiftRequests EBus wrapper
|
||||
class AWSGameLiftRequests
|
||||
: public AZ::EBusTraits
|
||||
{
|
||||
public:
|
||||
using MutexType = AZStd::recursive_mutex;
|
||||
static const AZ::EBusHandlerPolicy HandlerPolicy = AZ::EBusHandlerPolicy::Single;
|
||||
static const AZ::EBusAddressPolicy AddressPolicy = AZ::EBusAddressPolicy::Single;
|
||||
};
|
||||
using AWSGameLiftRequestBus = AZ::EBus<IAWSGameLiftRequests, AWSGameLiftRequests>;
|
||||
} // namespace AWSGameLift
|
||||
+38
@@ -0,0 +1,38 @@
|
||||
/*
|
||||
* Copyright (c) Contributors to the Open 3D Engine Project.
|
||||
* For complete copyright and license terms please see the LICENSE at the root of this distribution.
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0 OR MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <AzCore/EBus/EBus.h>
|
||||
#include <AzCore/std/string/string.h>
|
||||
#include <AzFramework/Session/ISessionRequests.h>
|
||||
|
||||
namespace AWSGameLift
|
||||
{
|
||||
// ISessionAsyncRequests EBus wrapper
|
||||
class AWSGameLiftSessionAsyncRequests
|
||||
: public AZ::EBusTraits
|
||||
{
|
||||
public:
|
||||
using MutexType = AZStd::recursive_mutex;
|
||||
static const AZ::EBusHandlerPolicy HandlerPolicy = AZ::EBusHandlerPolicy::Single;
|
||||
static const AZ::EBusAddressPolicy AddressPolicy = AZ::EBusAddressPolicy::Single;
|
||||
};
|
||||
using AWSGameLiftSessionAsyncRequestBus = AZ::EBus<AzFramework::ISessionAsyncRequests, AWSGameLiftSessionAsyncRequests>;
|
||||
|
||||
// ISessionRequests EBus wrapper
|
||||
class AWSGameLiftSessionRequests
|
||||
: public AZ::EBusTraits
|
||||
{
|
||||
public:
|
||||
using MutexType = AZStd::recursive_mutex;
|
||||
static const AZ::EBusHandlerPolicy HandlerPolicy = AZ::EBusHandlerPolicy::Single;
|
||||
static const AZ::EBusAddressPolicy AddressPolicy = AZ::EBusAddressPolicy::Single;
|
||||
};
|
||||
using AWSGameLiftSessionRequestBus = AZ::EBus<AzFramework::ISessionRequests, AWSGameLiftSessionRequests>;
|
||||
} // namespace AWSGameLift
|
||||
Reference in New Issue
Block a user