mirror of
https://codeberg.org/WinDurango/WinDurango.git
synced 2026-04-18 02:23:34 -04:00
feat: added WIndows.Xbox.Multiplayer.idl
This commit is contained in:
@@ -23,7 +23,7 @@ namespace Windows.Xbox.ApplicationModel
|
||||
}
|
||||
}
|
||||
|
||||
[static_name("IHelp", 98999999-8888-7777-6666-555555555555)]
|
||||
[static_name("IHelpStatics", 3691495d-4bea-4c05-8791-7f51a9b2bf6b)]
|
||||
runtimeclass Help
|
||||
{
|
||||
static Windows.Foundation.IAsyncAction Show(Windows.Xbox.System.User usr);
|
||||
@@ -89,7 +89,7 @@ namespace Windows.Xbox.ApplicationModel
|
||||
[uuid(d1f1adca-92a4-4a88-b205-c54ac6152f43)]
|
||||
delegate HRESULT ProductPurchasedEventHandler(ProductPurchasedEventArgs unk);
|
||||
|
||||
[static_name("IProductStatics", 98888888-7888-7777-6666-555555555555)]
|
||||
[static_name("IProductStatics", 76efb705-bdd4-4f6a-8d89-a9511d40afe7)]
|
||||
runtimeclass Product
|
||||
{
|
||||
static Windows.Foundation.IAsyncAction ShowPurchaseAsync(Windows.Xbox.System.User unk, String unka);
|
||||
|
||||
51
idl/Windows.Xbox.Multiplayer.idl
Normal file
51
idl/Windows.Xbox.Multiplayer.idl
Normal file
@@ -0,0 +1,51 @@
|
||||
namespace Windows.Xbox.Multiplayer
|
||||
{
|
||||
// From @Zombie
|
||||
enum SuppressGameSessionReadyToastMode
|
||||
{
|
||||
WhenTitleIsInFocus,
|
||||
Always,
|
||||
};
|
||||
|
||||
// From @Zombie
|
||||
static runtimeclass PartyConfig
|
||||
{
|
||||
[static_name("IPartyConfigStatics_SuppressGameSessionReadyToast", 2FCEC780-2E70-437A-AE46-72298AE2BAC2)]
|
||||
{
|
||||
static Boolean SuppressGameSessionReadyToast { get; set; };
|
||||
}
|
||||
|
||||
[static_name("ISuppressGameSessionReadyToast2", 6938FC66-ED0C-4B86-A240-009DA675A0EC)]
|
||||
{
|
||||
static SuppressGameSessionReadyToastMode SuppressGameSessionReadyToastMode { get; set; };
|
||||
}
|
||||
}
|
||||
|
||||
[interface_name("IMultiplayerSessionReference", 77023BD9-8452-4FE0-886B-4229DD69972B)]
|
||||
runtimeclass MultiplayerSessionReference
|
||||
{
|
||||
MultiplayerSessionReference();
|
||||
String SessionName { get; };
|
||||
String ServiceConfigurationId { get; };
|
||||
String SessionTemplateName { get; };
|
||||
}
|
||||
|
||||
[interface_name("IMultiplayerSessionReferenceFactory", 9CF4368E-8E57-437D-BE98-BE6B5CDC5422)]
|
||||
runtimeclass MultiplayerSessionReferenceFactory
|
||||
{
|
||||
MultiplayerSessionReference CreateMultiplayerSessionReference(String unk, String unka, String unkb);
|
||||
}
|
||||
|
||||
[interface_name("IPartyChatMember", 34D5D8B2-7D7D-4598-8A91-8158B31FF3F3)]
|
||||
runtimeclass PartyChatMember
|
||||
{
|
||||
String XboxUserId { get; };
|
||||
UInt8 IsLocal { get; };
|
||||
}
|
||||
|
||||
[interface_name("IPartyChatView", 72AB8ECF-1A34-459B-973A-8C183714642B)]
|
||||
runtimeclass PartyChatView
|
||||
{
|
||||
Windows.Foundation.Collections.IVectorView<PartyChatMember> Members { get; };
|
||||
}
|
||||
}
|
||||
@@ -153,8 +153,6 @@ inline HRESULT WINAPI EraRoGetActivationFactory(HSTRING classId, REFIID iid, voi
|
||||
{
|
||||
const wchar_t *rawString = WindowsGetStringRawBuffer(classId, nullptr);
|
||||
|
||||
MessageBoxW(nullptr, rawString, L"EraRoGetActivationFactory", MB_OK | MB_ICONERROR);
|
||||
|
||||
std::wstring rsws(rawString);
|
||||
std::string rss(rsws.begin(), rsws.end());
|
||||
|
||||
@@ -271,8 +269,14 @@ HRESULT WINAPI GetActivationFactoryRedirect(PCWSTR str, REFIID riid, void **ppFa
|
||||
|
||||
hr = EraRoGetActivationFactory(className, riid, ppFactory);
|
||||
|
||||
|
||||
const wchar_t *rawString = WindowsGetStringRawBuffer(className, nullptr);
|
||||
|
||||
if (FAILED(hr))
|
||||
{
|
||||
MessageBoxW(nullptr, rawString, L"EraRoGetActivationFactory", MB_OK | MB_ICONERROR);
|
||||
DebugBreak();
|
||||
}
|
||||
|
||||
WindowsDeleteString(className);
|
||||
return hr;
|
||||
|
||||
@@ -60,6 +60,8 @@ set(FILES
|
||||
"src/Windows/Xbox/ApplicationModel/Store/Windows.Xbox.ApplicationModel.Store.Product.cpp"
|
||||
"src/Windows/Xbox/ApplicationModel/Store/Windows.Xbox.ApplicationModel.Store.ProductPurchasedEventArgs.cpp"
|
||||
"src/Windows/Xbox/ApplicationModel/Windows.Xbox.ApplicationModel.Help.cpp"
|
||||
"src/Windows/Xbox/Multiplayer/Windows.Xbox.Multiplayer.MultiplayerSessionReference.cpp"
|
||||
"src/Windows/Xbox/Multiplayer/Windows.Xbox.Multiplayer.PartyConfig.cpp"
|
||||
"src/WinDurangoWinRT.cpp"
|
||||
)
|
||||
|
||||
@@ -80,6 +82,7 @@ target_include_directories(WinDurango.WinRT PUBLIC
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/include/WinDurango.WinRT/Windows/Xbox/ApplicationModel"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/include/WinDurango.WinRT/Windows/Xbox/ApplicationModel/Core"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/include/WinDurango.WinRT/Windows/Xbox/ApplicationModel/Store"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/include/WinDurango.WinRT/Windows/Xbox/Multiplayer"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/Generated Files"
|
||||
"${CMAKE_SOURCE_DIR}/projects/WinDurango.Common/include"
|
||||
)
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
#pragma once
|
||||
#include "Windows.Xbox.Multiplayer.MultiplayerSessionReferenceFactory.g.h"
|
||||
#include "Windows.Xbox.Multiplayer.MultiplayerSessionReference.g.h"
|
||||
|
||||
namespace winrt::Windows::Xbox::Multiplayer::implementation
|
||||
{
|
||||
struct MultiplayerSessionReferenceFactory : MultiplayerSessionReferenceFactoryT<MultiplayerSessionReferenceFactory>
|
||||
{
|
||||
MultiplayerSessionReferenceFactory() = default;
|
||||
|
||||
winrt::Windows::Xbox::Multiplayer::MultiplayerSessionReference CreateMultiplayerSessionReference(hstring const& unk, hstring const& unka, hstring const& unkb);
|
||||
};
|
||||
|
||||
struct MultiplayerSessionReference : MultiplayerSessionReferenceT<MultiplayerSessionReference>
|
||||
{
|
||||
MultiplayerSessionReference() = default;
|
||||
|
||||
hstring SessionName();
|
||||
hstring ServiceConfigurationId();
|
||||
hstring SessionTemplateName();
|
||||
};
|
||||
}
|
||||
namespace winrt::Windows::Xbox::Multiplayer::factory_implementation
|
||||
{
|
||||
struct MultiplayerSessionReference : MultiplayerSessionReferenceT<MultiplayerSessionReference, implementation::MultiplayerSessionReference>
|
||||
{
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
#pragma once
|
||||
#include "Windows.Xbox.Multiplayer.PartyChatMember.g.h"
|
||||
#include "Windows.Xbox.Multiplayer.PartyChatView.g.h"
|
||||
#include "Windows.Xbox.Multiplayer.PartyConfig.g.h"
|
||||
|
||||
namespace winrt::Windows::Xbox::Multiplayer::implementation
|
||||
{
|
||||
struct PartyChatMember : PartyChatMemberT<PartyChatMember>
|
||||
{
|
||||
PartyChatMember() = default;
|
||||
PartyChatMember(hstring userId, uint8_t isLocal) : userId(userId), isLocal(isLocal) {}
|
||||
|
||||
hstring XboxUserId();
|
||||
uint8_t IsLocal();
|
||||
private:
|
||||
hstring userId;
|
||||
uint8_t isLocal;
|
||||
};
|
||||
|
||||
struct PartyChatView : PartyChatViewT<PartyChatView>
|
||||
{
|
||||
PartyChatView() = default;
|
||||
|
||||
winrt::Windows::Foundation::Collections::IVectorView<winrt::Windows::Xbox::Multiplayer::PartyChatMember> Members();
|
||||
};
|
||||
|
||||
struct PartyConfig
|
||||
{
|
||||
PartyConfig() = default;
|
||||
|
||||
static bool SuppressGameSessionReadyToast();
|
||||
static void SuppressGameSessionReadyToast(bool value);
|
||||
static winrt::Windows::Xbox::Multiplayer::SuppressGameSessionReadyToastMode SuppressGameSessionReadyToastMode();
|
||||
static void SuppressGameSessionReadyToastMode(winrt::Windows::Xbox::Multiplayer::SuppressGameSessionReadyToastMode const& value);
|
||||
};
|
||||
}
|
||||
namespace winrt::Windows::Xbox::Multiplayer::factory_implementation
|
||||
{
|
||||
struct PartyConfig : PartyConfigT<PartyConfig, implementation::PartyConfig>
|
||||
{
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
#include "Windows.Xbox.Multiplayer.MultiplayerSessionReference.h"
|
||||
#include "WinDurangoWinRT.h"
|
||||
|
||||
namespace winrt::Windows::Xbox::Multiplayer::implementation
|
||||
{
|
||||
winrt::Windows::Xbox::Multiplayer::MultiplayerSessionReference MultiplayerSessionReferenceFactory::CreateMultiplayerSessionReference(hstring const& unk, hstring const& unka, hstring const& unkb)
|
||||
{
|
||||
p_wd->log.Warn("WinDurango::WinRT::Windows::Xbox::Multiplayer", "Unimplemented: CreateMultiplayerSessionReference");
|
||||
throw hresult_not_implemented();
|
||||
}
|
||||
hstring MultiplayerSessionReference::SessionName()
|
||||
{
|
||||
p_wd->log.Warn("WinDurango::WinRT::Windows::Xbox::Multiplayer", "Unimplemented: SessionName");
|
||||
throw hresult_not_implemented();
|
||||
}
|
||||
hstring MultiplayerSessionReference::ServiceConfigurationId()
|
||||
{
|
||||
p_wd->log.Warn("WinDurango::WinRT::Windows::Xbox::Multiplayer", "Unimplemented: ServiceConfigurationId");
|
||||
throw hresult_not_implemented();
|
||||
}
|
||||
hstring MultiplayerSessionReference::SessionTemplateName()
|
||||
{
|
||||
p_wd->log.Warn("WinDurango::WinRT::Windows::Xbox::Multiplayer", "Unimplemented: SessionTemplateName");
|
||||
throw hresult_not_implemented();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
#include "Windows.Xbox.Multiplayer.PartyConfig.h"
|
||||
#include "WinDurangoWinRT.h"
|
||||
|
||||
namespace winrt::Windows::Xbox::Multiplayer::implementation
|
||||
{
|
||||
hstring PartyChatMember::XboxUserId()
|
||||
{
|
||||
return userId;
|
||||
}
|
||||
uint8_t PartyChatMember::IsLocal()
|
||||
{
|
||||
return isLocal;
|
||||
}
|
||||
winrt::Windows::Foundation::Collections::IVectorView<winrt::Windows::Xbox::Multiplayer::PartyChatMember> PartyChatView::Members()
|
||||
{
|
||||
p_wd->log.Warn("WinDurango::WinRT::Windows::Xbox::Multiplayer", "Unimplemented: Members");
|
||||
throw hresult_not_implemented();
|
||||
}
|
||||
bool PartyConfig::SuppressGameSessionReadyToast()
|
||||
{
|
||||
p_wd->log.Warn("WinDurango::WinRT::Windows::Xbox::Multiplayer", "Unimplemented: SuppressGameSessionReadyToast");
|
||||
throw hresult_not_implemented();
|
||||
}
|
||||
void PartyConfig::SuppressGameSessionReadyToast(bool value)
|
||||
{
|
||||
p_wd->log.Warn("WinDurango::WinRT::Windows::Xbox::Multiplayer", "Unimplemented: SuppressGameSessionReadyToast(bool)");
|
||||
if (value) {
|
||||
p_wd->log.Warn("WinDurango::WinRT::Windows::Xbox::Multiplayer", "Suppressing Game Session Ready Toast");
|
||||
} else {
|
||||
p_wd->log.Warn("WinDurango::WinRT::Windows::Xbox::Multiplayer", "Enabling Game Session Ready Toast");
|
||||
}
|
||||
}
|
||||
winrt::Windows::Xbox::Multiplayer::SuppressGameSessionReadyToastMode PartyConfig::SuppressGameSessionReadyToastMode()
|
||||
{
|
||||
p_wd->log.Warn("WinDurango::WinRT::Windows::Xbox::Multiplayer", "Unimplemented: SuppressGameSessionReadyToastMode");
|
||||
throw hresult_not_implemented();
|
||||
}
|
||||
void PartyConfig::SuppressGameSessionReadyToastMode(winrt::Windows::Xbox::Multiplayer::SuppressGameSessionReadyToastMode const& value)
|
||||
{
|
||||
p_wd->log.Warn("WinDurango::WinRT::Windows::Xbox::Multiplayer", "Unimplemented: SuppressGameSessionReadyToastMode(SuppressGameSessionReadyToastMode)");
|
||||
if (value == winrt::Windows::Xbox::Multiplayer::SuppressGameSessionReadyToastMode::Always) {
|
||||
p_wd->log.Warn("WinDurango::WinRT::Windows::Xbox::Multiplayer", "Setting Game Session Ready Toast Mode = Always");
|
||||
} else {
|
||||
p_wd->log.Warn("WinDurango::WinRT::Windows::Xbox::Multiplayer", "Setting Game Session Ready Toast Mode = WhenTitleIsInFocus");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user