aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.Client/Durango/Network
diff options
context:
space:
mode:
authorvoid_17 <heroerror3@gmail.com>2026-03-02 15:58:20 +0700
committervoid_17 <heroerror3@gmail.com>2026-03-02 15:58:20 +0700
commit7074f35e4ba831e358117842b99ee35b87f85ae5 (patch)
tree7d440d23473196af3056bf2ff4c59d9e740a06f5 /Minecraft.Client/Durango/Network
parentd63f79325f85e014361eb8cf1e41eaebedb1ae71 (diff)
shared_ptr -> std::shared_ptr
This is one of the first commits in a plan to remove all `using namespace std;` lines in the entire codebase as it is considered anti-pattern today.
Diffstat (limited to 'Minecraft.Client/Durango/Network')
-rw-r--r--Minecraft.Client/Durango/Network/ChatIntegrationLayer.cpp152
-rw-r--r--Minecraft.Client/Durango/Network/ChatIntegrationLayer.h60
2 files changed, 106 insertions, 106 deletions
diff --git a/Minecraft.Client/Durango/Network/ChatIntegrationLayer.cpp b/Minecraft.Client/Durango/Network/ChatIntegrationLayer.cpp
index 232b4dd3..a3b3c981 100644
--- a/Minecraft.Client/Durango/Network/ChatIntegrationLayer.cpp
+++ b/Minecraft.Client/Durango/Network/ChatIntegrationLayer.cpp
@@ -12,7 +12,7 @@
using namespace Windows::Foundation;
using namespace Windows::Xbox::System;
-// To integrate the Chat DLL in your game, you can use this ChatIntegrationLayer class with modifications,
+// To integrate the Chat DLL in your game, you can use this ChatIntegrationLayer class with modifications,
// or create your own design your own class using the code in this file a guide.
std::shared_ptr<ChatIntegrationLayer> GetChatIntegrationLayer()
{
@@ -25,12 +25,12 @@ std::shared_ptr<ChatIntegrationLayer> GetChatIntegrationLayer()
return chatIntegrationLayerInstance;
}
-ChatIntegrationLayer::ChatIntegrationLayer()
+ChatIntegrationLayer::ChatIntegrationLayer()
{
ZeroMemory( m_chatVoicePacketsStatistic, sizeof(m_chatVoicePacketsStatistic) );
}
-void ChatIntegrationLayer::InitializeChatManager(
+void ChatIntegrationLayer::InitializeChatManager(
__in bool combineCaptureBuffersIntoSinglePacket,
__in bool useKinectAsCaptureSource,
__in bool applySoundEffectsToCapturedAudio,
@@ -69,9 +69,9 @@ void ChatIntegrationLayer::InitializeChatManager(
m_chatManager->ChatSettings->PerformanceCountersEnabled = true;
#endif
- // Upon enter constrained mode, mute everyone.
+ // Upon enter constrained mode, mute everyone.
// Upon leaving constrained mode, unmute everyone who was previously muted.
- m_tokenResourceAvailabilityChanged = Windows::ApplicationModel::Core::CoreApplication::ResourceAvailabilityChanged +=
+ m_tokenResourceAvailabilityChanged = Windows::ApplicationModel::Core::CoreApplication::ResourceAvailabilityChanged +=
ref new EventHandler< Platform::Object^ >( [weakPtrToThis] (Platform::Object^, Platform::Object^ )
{
// Using a std::weak_ptr instead of 'this' to avoid dangling pointer if caller class is released.
@@ -99,7 +99,7 @@ void ChatIntegrationLayer::InitializeChatManager(
}
});
- m_tokenOnDebugMessage = m_chatManager->OnDebugMessage +=
+ m_tokenOnDebugMessage = m_chatManager->OnDebugMessage +=
ref new Windows::Foundation::EventHandler<Microsoft::Xbox::GameChat::DebugMessageEventArgs^>(
[weakPtrToThis] ( Platform::Object^, Microsoft::Xbox::GameChat::DebugMessageEventArgs^ args )
{
@@ -112,8 +112,8 @@ void ChatIntegrationLayer::InitializeChatManager(
}
});
- m_tokenOnOutgoingChatPacketReady = m_chatManager->OnOutgoingChatPacketReady +=
- ref new Windows::Foundation::EventHandler<Microsoft::Xbox::GameChat::ChatPacketEventArgs^>(
+ m_tokenOnOutgoingChatPacketReady = m_chatManager->OnOutgoingChatPacketReady +=
+ ref new Windows::Foundation::EventHandler<Microsoft::Xbox::GameChat::ChatPacketEventArgs^>(
[weakPtrToThis] ( Platform::Object^, Microsoft::Xbox::GameChat::ChatPacketEventArgs^ args )
{
// Using a std::weak_ptr instead of 'this' to avoid dangling pointer if caller class is released.
@@ -125,16 +125,16 @@ void ChatIntegrationLayer::InitializeChatManager(
}
});
- m_tokenOnCompareUniqueConsoleIdentifiers = m_chatManager->OnCompareUniqueConsoleIdentifiers +=
- ref new Microsoft::Xbox::GameChat::CompareUniqueConsoleIdentifiersHandler(
- [weakPtrToThis] ( Platform::Object^ obj1, Platform::Object^ obj2 )
- {
+ m_tokenOnCompareUniqueConsoleIdentifiers = m_chatManager->OnCompareUniqueConsoleIdentifiers +=
+ ref new Microsoft::Xbox::GameChat::CompareUniqueConsoleIdentifiersHandler(
+ [weakPtrToThis] ( Platform::Object^ obj1, Platform::Object^ obj2 )
+ {
// Using a std::weak_ptr instead of 'this' to avoid dangling pointer if caller class is released.
// Simply unregistering the callback in the destructor isn't enough to prevent a dangling pointer
std::shared_ptr<ChatIntegrationLayer> sharedPtrToThis(weakPtrToThis.lock());
if( sharedPtrToThis != nullptr )
{
- return sharedPtrToThis->CompareUniqueConsoleIdentifiers(obj1, obj2);
+ return sharedPtrToThis->CompareUniqueConsoleIdentifiers(obj1, obj2);
}
else
{
@@ -142,10 +142,10 @@ void ChatIntegrationLayer::InitializeChatManager(
}
});
- m_tokenUserAudioDeviceAdded = WXS::User::AudioDeviceAdded +=
+ m_tokenUserAudioDeviceAdded = WXS::User::AudioDeviceAdded +=
ref new Windows::Foundation::EventHandler<WXS::AudioDeviceAddedEventArgs^>(
- [weakPtrToThis] ( Platform::Object^, WXS::AudioDeviceAddedEventArgs^ value )
- {
+ [weakPtrToThis] ( Platform::Object^, WXS::AudioDeviceAddedEventArgs^ value )
+ {
std::shared_ptr<ChatIntegrationLayer> sharedPtrToThis(weakPtrToThis.lock());
if( sharedPtrToThis != nullptr )
{
@@ -153,10 +153,10 @@ void ChatIntegrationLayer::InitializeChatManager(
}
});
- m_tokenUserAudioDeviceRemoved = WXS::User::AudioDeviceRemoved +=
+ m_tokenUserAudioDeviceRemoved = WXS::User::AudioDeviceRemoved +=
ref new Windows::Foundation::EventHandler<WXS::AudioDeviceRemovedEventArgs^>(
- [weakPtrToThis] ( Platform::Object^, WXS::AudioDeviceRemovedEventArgs^ value )
- {
+ [weakPtrToThis] ( Platform::Object^, WXS::AudioDeviceRemovedEventArgs^ value )
+ {
std::shared_ptr<ChatIntegrationLayer> sharedPtrToThis(weakPtrToThis.lock());
if( sharedPtrToThis != nullptr )
{
@@ -164,10 +164,10 @@ void ChatIntegrationLayer::InitializeChatManager(
}
});
- m_tokenUserAudioDeviceChanged = WXS::User::AudioDeviceChanged +=
+ m_tokenUserAudioDeviceChanged = WXS::User::AudioDeviceChanged +=
ref new Windows::Foundation::EventHandler<WXS::AudioDeviceChangedEventArgs^>(
- [weakPtrToThis] ( Platform::Object^, WXS::AudioDeviceChangedEventArgs^ value )
- {
+ [weakPtrToThis] ( Platform::Object^, WXS::AudioDeviceChangedEventArgs^ value )
+ {
std::shared_ptr<ChatIntegrationLayer> sharedPtrToThis(weakPtrToThis.lock());
if( sharedPtrToThis != nullptr )
{
@@ -175,16 +175,16 @@ void ChatIntegrationLayer::InitializeChatManager(
}
});
- //m_tokenSuspending = Windows::ApplicationModel::Core::CoreApplication::Suspending +=
+ //m_tokenSuspending = Windows::ApplicationModel::Core::CoreApplication::Suspending +=
// ref new EventHandler< Windows::ApplicationModel::SuspendingEventArgs^ >( [weakPtrToThis] (Platform::Object^, Windows::ApplicationModel::SuspendingEventArgs^ args)
//{
- // // Upon Suspending, nothing needs to be done
+ // // Upon Suspending, nothing needs to be done
//});
- //m_tokenResuming = Windows::ApplicationModel::Core::CoreApplication::Resuming +=
+ //m_tokenResuming = Windows::ApplicationModel::Core::CoreApplication::Resuming +=
// ref new EventHandler< Platform::Object^ >( [weakPtrToThis] (Platform::Object^, Windows::ApplicationModel::SuspendingEventArgs^ args)
//{
- // // Upon Resuming, re-initialize the network, and reinitialize the chat session
+ // // Upon Resuming, re-initialize the network, and reinitialize the chat session
//});
}
@@ -215,14 +215,14 @@ void ChatIntegrationLayer::Shutdown()
}
}
-void ChatIntegrationLayer::OnDebugMessageReceived(
- __in Microsoft::Xbox::GameChat::DebugMessageEventArgs^ args
+void ChatIntegrationLayer::OnDebugMessageReceived(
+ __in Microsoft::Xbox::GameChat::DebugMessageEventArgs^ args
)
{
- // To integrate the Chat DLL in your game,
- // change this to false and remove the LogComment calls,
+ // To integrate the Chat DLL in your game,
+ // change this to false and remove the LogComment calls,
// or integrate with your game's own UI/debug message logging system
- bool outputToUI = false;
+ bool outputToUI = false;
if( outputToUI )
{
@@ -237,14 +237,14 @@ void ChatIntegrationLayer::OnDebugMessageReceived(
}
else
{
- // The string appear in the Visual Studio Output window
+ // The string appear in the Visual Studio Output window
#ifndef _CONTENT_PACKAGE
OutputDebugString( args->Message->Data() );
#endif
}
}
-void ChatIntegrationLayer::GameUI_RecordPacketStatistic(
+void ChatIntegrationLayer::GameUI_RecordPacketStatistic(
__in Microsoft::Xbox::GameChat::ChatMessageType messageType,
__in ChatPacketType chatPacketType
)
@@ -261,7 +261,7 @@ void ChatIntegrationLayer::GameUI_RecordPacketStatistic(
}
}
-int ChatIntegrationLayer::GameUI_GetPacketStatistic(
+int ChatIntegrationLayer::GameUI_GetPacketStatistic(
__in Microsoft::Xbox::GameChat::ChatMessageType messageType,
__in ChatPacketType chatPacketType
)
@@ -278,8 +278,8 @@ int ChatIntegrationLayer::GameUI_GetPacketStatistic(
}
}
-void ChatIntegrationLayer::OnOutgoingChatPacketReady(
- __in Microsoft::Xbox::GameChat::ChatPacketEventArgs^ args
+void ChatIntegrationLayer::OnOutgoingChatPacketReady(
+ __in Microsoft::Xbox::GameChat::ChatPacketEventArgs^ args
)
{
byte *bytes;
@@ -298,7 +298,7 @@ void ChatIntegrationLayer::OnOutgoingChatPacketReady(
}
-void ChatIntegrationLayer::OnIncomingChatMessage(
+void ChatIntegrationLayer::OnIncomingChatMessage(
unsigned int sessionAddress,
Platform::Array<byte>^ message
)
@@ -308,8 +308,8 @@ void ChatIntegrationLayer::OnIncomingChatMessage(
// Instead your title should upon receiving a packet, extract the chat message from it, and then call m_chatManager->ProcessIncomingChatMessage as shown below
// You will need to isolate chat messages to be unique from the rest of you game's other message types.
- // uniqueRemoteConsoleIdentifier is a Platform::Object^ and can be cast or unboxed to most types.
- // What exactly you use doesn't matter, but optimally it would be something that uniquely identifies a console on in the session.
+ // uniqueRemoteConsoleIdentifier is a Platform::Object^ and can be cast or unboxed to most types.
+ // What exactly you use doesn't matter, but optimally it would be something that uniquely identifies a console on in the session.
// A Windows::Xbox::Networking::SecureDeviceAssociation^ is perfect to use if you have access to it.
// This is how you would convert from byte array to a IBuffer^
@@ -331,7 +331,7 @@ void ChatIntegrationLayer::OnIncomingChatMessage(
{
Microsoft::Xbox::GameChat::ChatMessageType chatMessageType = m_chatManager->ProcessIncomingChatMessage(chatMessage, uniqueRemoteConsoleIdentifier);
- GameUI_RecordPacketStatistic( chatMessageType, ChatPacketType::IncomingPacket );
+ GameUI_RecordPacketStatistic( chatMessageType, ChatPacketType::IncomingPacket );
}
}
@@ -341,7 +341,7 @@ void ChatIntegrationLayer::AddAllLocallySignedInUsersToChatClient(
__in Windows::Foundation::Collections::IVectorView<Windows::Xbox::System::User^>^ locallySignedInUsers
)
{
- // To integrate the Chat DLL in your game,
+ // To integrate the Chat DLL in your game,
// add all locally signed in users to the chat client
for each( Windows::Xbox::System::User^ user in locallySignedInUsers )
{
@@ -486,10 +486,10 @@ void ChatIntegrationLayer::AddLocalUserToChatChannel(
__in Windows::Xbox::System::IUser^ user
)
{
- // Adds a local user to a specific channel.
+ // Adds a local user to a specific channel.
- // This is helper function waits for the task to cm_chatManageromplete so shouldn't be called from the UI thread
- // Remove the .wait() and return the result of concurrency::create_task() if you want to call it from the UI thread
+ // This is helper function waits for the task to cm_chatManageromplete so shouldn't be called from the UI thread
+ // Remove the .wait() and return the result of concurrency::create_task() if you want to call it from the UI thread
// and chain PPL tasks together
m_pDQRNet->LogComment( L">>>>>>>>>>>>> AddLocalUserToChatChannel" );
@@ -502,7 +502,7 @@ void ChatIntegrationLayer::AddLocalUserToChatChannel(
// Error handling
try
{
- t.get();
+ t.get();
}
catch ( Platform::Exception^ ex )
{
@@ -513,19 +513,19 @@ void ChatIntegrationLayer::AddLocalUserToChatChannel(
}
}
-void ChatIntegrationLayer::RemoveRemoteConsole(
+void ChatIntegrationLayer::RemoveRemoteConsole(
unsigned int address
)
{
- // uniqueConsoleIdentifier is a Platform::Object^ and can be cast or unboxed to most types.
- // What exactly you use doesn't matter, but optimally it would be something that uniquely identifies a console on in the session.
+ // uniqueConsoleIdentifier is a Platform::Object^ and can be cast or unboxed to most types.
+ // What exactly you use doesn't matter, but optimally it would be something that uniquely identifies a console on in the session.
// A Windows::Xbox::Networking::SecureDeviceAssociation^ is perfect to use if you have access to it.
// This is how you would convert from an int to a Platform::Object^
// Platform::Object obj = IntToPlatformObject(5);
- // This is helper function waits for the task to complete so shouldn't be called from the UI thread
- // Remove the .wait() and return the result of concurrency::create_task() if you want to call it from the UI thread
+ // This is helper function waits for the task to complete so shouldn't be called from the UI thread
+ // Remove the .wait() and return the result of concurrency::create_task() if you want to call it from the UI thread
// and chain PPL tasks together
Platform::Object^ uniqueRemoteConsoleIdentifier = (Platform::Object^)address;
@@ -538,7 +538,7 @@ void ChatIntegrationLayer::RemoveRemoteConsole(
// Error handling
try
{
- t.get();
+ t.get();
}
catch ( Platform::Exception^ ex )
{
@@ -549,15 +549,15 @@ void ChatIntegrationLayer::RemoveRemoteConsole(
}
}
-void ChatIntegrationLayer::RemoveUserFromChatChannel(
+void ChatIntegrationLayer::RemoveUserFromChatChannel(
__in uint8 channelIndex,
- __in Windows::Xbox::System::IUser^ user
+ __in Windows::Xbox::System::IUser^ user
)
{
if( m_chatManager != nullptr )
{
- // This is helper function waits for the task to complete so shouldn't be called from the UI thread
- // Remove the .wait() and return the result of concurrency::create_task() if you want to call it from the UI thread
+ // This is helper function waits for the task to complete so shouldn't be called from the UI thread
+ // Remove the .wait() and return the result of concurrency::create_task() if you want to call it from the UI thread
// and chain PPL tasks together
auto asyncOp = m_chatManager->RemoveLocalUserFromChatChannelAsync( channelIndex, user );
@@ -577,13 +577,13 @@ void ChatIntegrationLayer::RemoveUserFromChatChannel(
}
}
-void ChatIntegrationLayer::OnNewSessionAddressAdded(
+void ChatIntegrationLayer::OnNewSessionAddressAdded(
__in unsigned int address
)
{
m_pDQRNet->LogCommentFormat( L">>>>>>>>>>>>> OnNewSessionAddressAdded (%d)",address );
Platform::Object^ uniqueConsoleIdentifier = (Platform::Object^)address;
- /// Call this when a new console connects.
+ /// Call this when a new console connects.
/// This adds this console to the chat layer
if( m_chatManager != nullptr )
{
@@ -611,8 +611,8 @@ bool ChatIntegrationLayer::HasMicFocus()
return false;
}
-Platform::Object^ ChatIntegrationLayer::IntToPlatformObject(
- __in int val
+Platform::Object^ ChatIntegrationLayer::IntToPlatformObject(
+ __in int val
)
{
return (Platform::Object^)val;
@@ -621,23 +621,23 @@ Platform::Object^ ChatIntegrationLayer::IntToPlatformObject(
//return Windows::Foundation::PropertyValue::CreateInt32(val);
}
-int ChatIntegrationLayer::PlatformObjectToInt(
- __in Platform::Object^ uniqueRemoteConsoleIdentifier
+int ChatIntegrationLayer::PlatformObjectToInt(
+ __in Platform::Object^ uniqueRemoteConsoleIdentifier
)
{
- return safe_cast<int>( uniqueRemoteConsoleIdentifier );
+ return safe_cast<int>( uniqueRemoteConsoleIdentifier );
// You can also do the same using a PropertyValue.
//return safe_cast<Windows::Foundation::IPropertyValue^>(uniqueRemoteConsoleIdentifier)->GetInt32();
}
-void ChatIntegrationLayer::HandleChatChannelChanged(
- __in uint8 oldChatChannelIndex,
- __in uint8 newChatChannelIndex,
- __in Microsoft::Xbox::GameChat::ChatUser^ chatUser
+void ChatIntegrationLayer::HandleChatChannelChanged(
+ __in uint8 oldChatChannelIndex,
+ __in uint8 newChatChannelIndex,
+ __in Microsoft::Xbox::GameChat::ChatUser^ chatUser
)
{
- // We remember if the local user was currently muted from all channels. And when we switch channels,
+ // We remember if the local user was currently muted from all channels. And when we switch channels,
// we ensure that the state persists. For remote users, title should implement this themselves
// based on title game design if they want to persist the muting state.
@@ -674,8 +674,8 @@ void ChatIntegrationLayer::HandleChatChannelChanged(
}
}
-void ChatIntegrationLayer::ChangeChatUserMuteState(
- __in Microsoft::Xbox::GameChat::ChatUser^ chatUser
+void ChatIntegrationLayer::ChangeChatUserMuteState(
+ __in Microsoft::Xbox::GameChat::ChatUser^ chatUser
)
{
/// Helper function to swap the mute state of a specific chat user
@@ -692,8 +692,8 @@ void ChatIntegrationLayer::ChangeChatUserMuteState(
}
}
-Microsoft::Xbox::GameChat::ChatUser^ ChatIntegrationLayer::GetChatUserByXboxUserId(
- __in Platform::String^ xboxUserId
+Microsoft::Xbox::GameChat::ChatUser^ ChatIntegrationLayer::GetChatUserByXboxUserId(
+ __in Platform::String^ xboxUserId
)
{
Windows::Foundation::Collections::IVectorView<Microsoft::Xbox::GameChat::ChatUser^>^ chatUsers = GetChatUsers();
@@ -704,14 +704,14 @@ Microsoft::Xbox::GameChat::ChatUser^ ChatIntegrationLayer::GetChatUserByXboxUser
return chatUser;
}
}
-
+
return nullptr;
}
-bool ChatIntegrationLayer::CompareUniqueConsoleIdentifiers(
- __in Platform::Object^ uniqueRemoteConsoleIdentifier1,
- __in Platform::Object^ uniqueRemoteConsoleIdentifier2
+bool ChatIntegrationLayer::CompareUniqueConsoleIdentifiers(
+ __in Platform::Object^ uniqueRemoteConsoleIdentifier1,
+ __in Platform::Object^ uniqueRemoteConsoleIdentifier2
)
{
if (uniqueRemoteConsoleIdentifier1 == nullptr || uniqueRemoteConsoleIdentifier2 == nullptr)
@@ -719,7 +719,7 @@ bool ChatIntegrationLayer::CompareUniqueConsoleIdentifiers(
return false;
}
- // uniqueRemoteConsoleIdentifier is a Platform::Object^ and can be cast or unboxed to most types.
+ // uniqueRemoteConsoleIdentifier is a Platform::Object^ and can be cast or unboxed to most types.
// We're using XRNS addresses, which are unsigned ints
unsigned int address1 = safe_cast<unsigned int>(uniqueRemoteConsoleIdentifier1);
unsigned int address2 = safe_cast<unsigned int>(uniqueRemoteConsoleIdentifier2);
diff --git a/Minecraft.Client/Durango/Network/ChatIntegrationLayer.h b/Minecraft.Client/Durango/Network/ChatIntegrationLayer.h
index 80b4e10a..4470a22b 100644
--- a/Minecraft.Client/Durango/Network/ChatIntegrationLayer.h
+++ b/Minecraft.Client/Durango/Network/ChatIntegrationLayer.h
@@ -16,7 +16,7 @@ enum ChatPacketType
OutgoingPacket = 1
};
-class ChatIntegrationLayer
+class ChatIntegrationLayer
: public std::enable_shared_from_this<ChatIntegrationLayer> // shared_from_this is needed to use a weak ref to 'this' when handling delegate callbacks
{
public:
@@ -26,7 +26,7 @@ public:
/// <summary>
/// Initializes the chat manager
/// </summary>
- void InitializeChatManager(
+ void InitializeChatManager(
__in bool combineCaptureBuffersIntoSinglePacketEnabled,
__in bool useKinectAsCaptureSource,
__in bool applySoundEffectToCapture,
@@ -47,8 +47,8 @@ public:
bool m_canCaptureAudio;
};
- void AddLocalUser( __in Windows::Xbox::System::IUser^ user );
- void RemoveLocalUser( __in Windows::Xbox::System::IUser^ user );
+ void AddLocalUser( __in Windows::Xbox::System::IUser^ user );
+ void RemoveLocalUser( __in Windows::Xbox::System::IUser^ user );
void EvaluateDevicesForUser(__in Windows::Xbox::System::IUser^ user );
vector<AddedUser *> m_addedUsers;
@@ -57,18 +57,18 @@ public:
private:
/// <summary>
/// Adds a local user to a specific channel
- /// This is helper function waits for the task to complete so shouldn't be called from the UI thread
+ /// This is helper function waits for the task to complete so shouldn't be called from the UI thread
/// </summary>
/// <param name="channelIndex">The channel to add the user to</param>
/// <param name="user">The local user to add</param>
- void AddLocalUserToChatChannel(
+ void AddLocalUserToChatChannel(
__in uint8 channelIndex,
__in Windows::Xbox::System::IUser^ user
- );
+ );
/// <summary>
/// Removes a local user from a specific channel
- /// This is helper function waits for the task to complete so shouldn't be called from the UI thread
+ /// This is helper function waits for the task to complete so shouldn't be called from the UI thread
/// </summary>
/// <param name="channelIndex">The channel to remove the user from</param>
/// <param name="user">The local user to remove</param>
@@ -80,10 +80,10 @@ public:
/// <summary>
/// Removes a remote console from chat
- /// This is helper function waits for the task to complete so shouldn't be called from the UI thread
+ /// This is helper function waits for the task to complete so shouldn't be called from the UI thread
/// </summary>
/// <param name="uniqueRemoteConsoleIdentifier">A unique ID for the remote console</param>
- void RemoveRemoteConsole(
+ void RemoveRemoteConsole(
unsigned int address
);
@@ -92,7 +92,7 @@ public:
/// </summary>
/// <param name="chatPacket">A buffer containing the chat message</param>
/// <param name="uniqueRemoteConsoleIdentifier">A unique ID for the remote console</param>
- void OnIncomingChatMessage(
+ void OnIncomingChatMessage(
unsigned int sessionAddress,
Platform::Array<byte>^ message
);
@@ -111,7 +111,7 @@ public:
/// Helper function to swap the mute state of a specific chat user
/// </summary>
void ChangeChatUserMuteState(
- __in Microsoft::Xbox::GameChat::ChatUser^ chatUser
+ __in Microsoft::Xbox::GameChat::ChatUser^ chatUser
);
/// <summary>
@@ -120,20 +120,20 @@ public:
void HandleChatChannelChanged(
__in uint8 oldChatChannelIndex,
__in uint8 newChatChannelIndex,
- __in Microsoft::Xbox::GameChat::ChatUser^ chatUser
+ __in Microsoft::Xbox::GameChat::ChatUser^ chatUser
);
/// <summary>
- /// Call this when a new console connects.
+ /// Call this when a new console connects.
/// This adds this console to the chat layer
/// </summary>
- void OnNewSessionAddressAdded(
- __in unsigned int address
+ void OnNewSessionAddressAdded(
+ __in unsigned int address
);
/// <summary>
/// Adds a list of locally signed in users that have intent to play to the chat session on a specific channel index.
- /// Avoid adding any user who is signed in that doesn't have intent to play otherwise users who are biometrically
+ /// Avoid adding any user who is signed in that doesn't have intent to play otherwise users who are biometrically
/// signed in automatically will be added to the chat session
/// </summary>
/// <param name="channelIndex">The channel to add the users to</param>
@@ -147,8 +147,8 @@ public:
/// Handles when a debug message is received. Send this to the UI and OutputDebugString. Games should integrate with their existing log system.
/// </summary>
/// <param name="args">Contains the debug message to log</param>
- void OnDebugMessageReceived(
- __in Microsoft::Xbox::GameChat::DebugMessageEventArgs^ args
+ void OnDebugMessageReceived(
+ __in Microsoft::Xbox::GameChat::DebugMessageEventArgs^ args
);
/// <summary>
@@ -161,8 +161,8 @@ public:
/// It should send the chat message in order (if that feature is available) if args->SendInOrder is true
/// </summary>
/// <param name="args">Describes the packet to send</param>
- void OnOutgoingChatPacketReady(
- __in Microsoft::Xbox::GameChat::ChatPacketEventArgs^ args
+ void OnOutgoingChatPacketReady(
+ __in Microsoft::Xbox::GameChat::ChatPacketEventArgs^ args
);
/// <summary>
@@ -189,13 +189,13 @@ public:
/// <summary>
/// Helper function to get specific ChatUser by xboxUserId
/// </summary>
- bool ChatIntegrationLayer::CompareUniqueConsoleIdentifiers(
- __in Platform::Object^ uniqueRemoteConsoleIdentifier1,
- __in Platform::Object^ uniqueRemoteConsoleIdentifier2
+ bool ChatIntegrationLayer::CompareUniqueConsoleIdentifiers(
+ __in Platform::Object^ uniqueRemoteConsoleIdentifier1,
+ __in Platform::Object^ uniqueRemoteConsoleIdentifier2
);
/// <summary>
- /// Helper function to return the ChatPerformanceCounters^ from the ChatManager so perf numbers can be shown on the UI
+ /// Helper function to return the ChatPerformanceCounters^ from the ChatManager so perf numbers can be shown on the UI
/// These numbers will only be valid if m_chatManager->ChatSettings->PerformanceCountersEnabled is set to true.
/// </summary>
Microsoft::Xbox::GameChat::ChatPerformanceCounters^ GetChatPerformanceCounters();
@@ -204,13 +204,13 @@ public:
/// Returns a count of the number of chat packets of a specific type that have been either sent or received.
/// It is useful to monitor this number in the UI / logs to debug network issues.
/// </summary>
- int GameUI_GetPacketStatistic(
+ int GameUI_GetPacketStatistic(
__in Microsoft::Xbox::GameChat::ChatMessageType messageType,
__in ChatPacketType chatPacketType
);
-
- void OnControllerPairingChanged(
- __in Windows::Xbox::Input::ControllerPairingChangedEventArgs^ args
+
+ void OnControllerPairingChanged(
+ __in Windows::Xbox::Input::ControllerPairingChangedEventArgs^ args
);
void ToggleRenderTargetVolume();
@@ -233,7 +233,7 @@ private:
// Debug stats for chat packets. Use Debug_GetPacketStatistic() to get the values.
/// It is useful to monitor this number in the UI / logs to debug network issues.
- void GameUI_RecordPacketStatistic(
+ void GameUI_RecordPacketStatistic(
__in Microsoft::Xbox::GameChat::ChatMessageType messageType,
__in ChatPacketType chatPacketType
);