feat: added windows.xbox.storage.connectedstorage.idl

This commit is contained in:
CT5
2026-02-08 16:39:17 +11:00
parent a08d6dbf66
commit 0bd49b15bb
19 changed files with 497 additions and 15 deletions

View File

@@ -2,11 +2,11 @@
namespace Windows.Xbox.Services
{
[interface_name("IXboxLiveConfiguration", fdeeeb27-66b0-465b-9dfb-99c62a62f7bc)]
[static_name("IXboxLiveConfigurationStatics", af86e2e0-b12d-4c6a-9c5a-d7aa65101e90)]
[static_name("IXboxLiveConfigurationStatics", af86e2e0-b12d-4c6a-9c5a-d7aa65101e90)]
runtimeclass XboxLiveConfiguration
{
String TitleId { get; };
String PrimaryServiceConfigId { get; };
String SandboxId { get; };
};
};
static String TitleId { get; };
static String PrimaryServiceConfigId { get; };
static String SandboxId { get; };
}
}

View File

@@ -0,0 +1,102 @@
import "Windows.Xbox.System.idl";
namespace Windows.Xbox.Storage
{
struct BlobInfo
{
String Name;
UInt32 Size;
};
struct ContainerInfo
{
String Name;
UInt32 TotalSize;
};
struct ContainerInfo2
{
String Name;
UInt64 TotalSize;
String DisplayName;
Windows.Foundation.DateTime LastModifiedTime;
Boolean NeedsSync;
};
[interface_name("IBlobInfoQueryResult", 5598379c-82de-4952-aa30-49ae329c5885)]
runtimeclass BlobInfoQueryResult
{
Windows.Foundation.IAsyncOperation<Windows.Foundation.Collections.IVectorView<BlobInfo> > GetBlobInfoAsync(UInt32 unk, UInt32 unka);
[default_overload] Windows.Foundation.IAsyncOperation<Windows.Foundation.Collections.IVectorView<BlobInfo> > GetBlobInfoAsync();
Windows.Foundation.IAsyncOperation<UInt32> GetItemCountAsync();
}
[interface_name("IContainerInfoQueryResult", 4f937563-bae3-4062-a67f-cbea61a2edc3)]
runtimeclass ContainerInfoQueryResult
{
Windows.Foundation.IAsyncOperation<Windows.Foundation.Collections.IVectorView<ContainerInfo> > GetContainerInfoAsync(UInt32 unk, UInt32 unka);
Windows.Foundation.IAsyncOperation<Windows.Foundation.Collections.IVectorView<ContainerInfo> > GetContainerInfoAsync();
Windows.Foundation.IAsyncOperation<UInt32> GetItemCountAsync();
}
[interface_name("IContainerInfo2QueryResult", f8a8cdfe-1d10-42a5-b01e-41718e183ca9)]
runtimeclass ContainerInfo2QueryResult
{
Windows.Foundation.IAsyncOperation<Windows.Foundation.Collections.IVectorView<ContainerInfo2> > GetContainerInfo2Async(UInt32 unk, UInt32 unka);
Windows.Foundation.IAsyncOperation<Windows.Foundation.Collections.IVectorView<ContainerInfo2> > GetContainerInfo2Async();
}
runtimeclass ConnectedStorageContainer
{
[interface_name("IConnectedStorageContainer", 885c65fe-e884-4cff-ba58-fb82cc32b552)]
{
String Name { get; };
ConnectedStorageSpace OwningSpace { get; };
Windows.Foundation.IAsyncAction SubmitUpdatesAsync(Windows.Foundation.Collections.IMapView<String, Windows.Storage.Streams.IBuffer> unk, Windows.Foundation.Collections.IIterable<String> unka);
Windows.Foundation.IAsyncAction ReadAsync(Windows.Foundation.Collections.IMapView<String, Windows.Storage.Streams.IBuffer> unk);
Windows.Foundation.IAsyncOperation<Windows.Foundation.Collections.IMapView<String, Windows.Storage.Streams.IBuffer> > GetAsync(Windows.Foundation.Collections.IIterable<String> unk);
Windows.Foundation.IAsyncAction SubmitPropertySetUpdatesAsync(Windows.Foundation.Collections.IPropertySet unk, Windows.Foundation.Collections.IIterable<String> unka);
}
[interface_name("IConnectedStorageContainer2", af964b72-ec65-46de-935c-845ad0194f0d)]
{
Windows.Foundation.IAsyncAction SubmitUpdatesAsync(Windows.Foundation.Collections.IMapView<String, Windows.Storage.Streams.IBuffer> unk, Windows.Foundation.Collections.IIterable<String> unka, String unkaa);
Windows.Foundation.IAsyncAction SubmitPropertySetUpdatesAsync(Windows.Foundation.Collections.IPropertySet unk, Windows.Foundation.Collections.IIterable<String> unka, String unkaa);
BlobInfoQueryResult CreateBlobInfoQuery(String unk);
}
}
runtimeclass ConnectedStorageSpace
{
ConnectedStorageSpace();
[static_name("IConnectedStorageSpaceStatics", 07020414-b3e9-47c8-a36f-f24e2dc65573)]
{
static Windows.Foundation.IAsyncOperation<ConnectedStorageSpace> GetForUserAsync(Windows.Xbox.System.User unk);
[default_overload] static Windows.Foundation.IAsyncOperation<ConnectedStorageSpace> GetForUserAsync(Windows.Xbox.System.User unk, String unka);
static Windows.Foundation.IAsyncOperation<ConnectedStorageSpace> GetForMachineAsync();
[default_overload] static Windows.Foundation.IAsyncOperation<ConnectedStorageSpace> GetForMachineAsync(String unk);
}
[static_name("IConnectedStorageSpaceStatics2", df3fe390-13fa-4814-91c1-fb92f90f641d)]
{
static Windows.Foundation.IAsyncOperation<ConnectedStorageSpace> GetSyncOnDemandForUserAsync(Windows.Xbox.System.User unk);
[default_overload] static Windows.Foundation.IAsyncOperation<ConnectedStorageSpace> GetSyncOnDemandForUserAsync(Windows.Xbox.System.User unk, String unka);
}
[interface_name("IConnectedStorageSpace", b48eea29-8323-41bc-bbad-2c26e27bda22)]
{
Windows.Xbox.System.User User { get; };
String ServiceConfigurationId { get; };
Boolean IsReadOnly { get; };
ConnectedStorageContainer CreateContainer(String unk);
Windows.Foundation.IAsyncAction DeleteContainerAsync(String unk);
ContainerInfoQueryResult CreateContainerInfoQuery(String unk);
Windows.Foundation.IAsyncOperation<Int32> GetRemainingBytesInQuotaAsync();
}
[interface_name("IConnectedStorageSpace2", bc5b91a7-2afc-46fd-81d4-74b8188d748a)]
{
Windows.Foundation.IAsyncOperation<Int64> GetRemainingBytesInQuota64Async();
}
}
}

View File

@@ -35,5 +35,7 @@ namespace wd::common::interfaces::storage
virtual bool remove() = 0;
virtual bool move(std::filesystem::path path) = 0;
virtual bool copy(std::filesystem::path path) = 0;
virtual bool dirExists(std::string) = 0;
virtual bool fileExists(std::string) = 0;
};
} // namespace wd::common::interfaces::storage

View File

@@ -23,10 +23,10 @@ namespace wd::common
Config config;
Logging log;
std::shared_ptr<interfaces::storage::Directory> rootDir;
private:
bool _inited = false;
std::shared_ptr<interfaces::storage::Directory> rootDir;
std::shared_ptr<interfaces::storage::Directory> WinDurangoRoot;
};
} // namespace wd::common

View File

@@ -4,7 +4,7 @@ project(WinDurango.D3D11X VERSION 1.0.0)
set(VERSION_SUFFIX "-dev.1") # used for non-stable versions, otherwise blank
set(CMAKE_CXX_STANDARD 20)
find_package(directxtex CONFIG REQUIRED)
find_package(directxtex CONFIG REQUIRED HINTS "${CMAKE_SOURCE_DIR}/../../vcpkg_installed/vcpkg/pkgs/directxtex_x64-windows/share/directxtex")
set(FILES
src/d3d11.x.cpp

View File

@@ -33,6 +33,8 @@ namespace wd::impl::winrt::interfaces::storage
virtual bool remove() override;
virtual bool move(std::filesystem::path path) override;
virtual bool copy(std::filesystem::path path) override;
virtual bool dirExists(std::string) override;
virtual bool fileExists(std::string) override;
private:
std::filesystem::path path;

View File

@@ -232,4 +232,40 @@ bool wd::impl::winrt::interfaces::storage::WinRTDirectory::copy(std::filesystem:
return false;
}
return false;
}
bool wd::impl::winrt::interfaces::storage::WinRTDirectory::dirExists(std::string name)
{
if (dir == nullptr)
{
return false;
}
try
{
auto item = dir.GetItemAsync(to_hstring(name)).get();
return item && item.IsOfType(StorageItemTypes::Folder);
}
catch (const hresult_error &ex)
{
return false;
}
return false;
}
bool wd::impl::winrt::interfaces::storage::WinRTDirectory::fileExists(std::string name)
{
if (dir == nullptr)
{
return false;
}
try
{
auto item = dir.GetItemAsync(to_hstring(name)).get();
return item && item.IsOfType(StorageItemTypes::File);
}
catch (const hresult_error &ex)
{
return false;
}
return false;
}

View File

@@ -64,6 +64,10 @@ set(FILES
"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/Windows/Xbox/Storage/Windows.Xbox.Storage.ConnectedStorage.cpp"
"src/Windows/Xbox/Storage/Windows.Xbox.Storage.ConnectedStorageContainer.cpp"
"src/Windows/Xbox/Storage/Windows.Xbox.Storage.ConnectedStorageSpace.cpp"
"src/Windows/Xbox/Storage/Windows.Xbox.Storage.ContainerInfoQueryResult.cpp"
"src/WinDurangoWinRT.cpp"
)
@@ -85,6 +89,7 @@ target_include_directories(WinDurango.WinRT PUBLIC
"${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}/include/WinDurango.WinRT/Windows/Xbox/Storage"
"${CMAKE_CURRENT_SOURCE_DIR}/Generated Files"
"${CMAKE_SOURCE_DIR}/projects/WinDurango.Common/include"
)

View File

@@ -0,0 +1,19 @@
#pragma once
#include <winrt/Windows.Foundation.Collections.h>
#include "WinDurangoWinRT.h"
namespace wd::WinRT
{
class ConnectedStorage
{
public:
ConnectedStorage(uint32_t id); // User Storage
ConnectedStorage(); // Machine Storage
winrt::Windows::Foundation::IAsyncAction DeleteContainer(winrt::hstring containerName);
private:
uint32_t userId;
std::shared_ptr<wd::common::interfaces::storage::Directory> dir;
};
}

View File

@@ -0,0 +1,35 @@
#pragma once
#include "Windows.Xbox.Storage.BlobInfoQueryResult.g.h"
#include "Windows.Xbox.Storage.ConnectedStorageContainer.g.h"
#include "Windows.Xbox.Storage.ConnectedStorage.h"
namespace winrt::Windows::Xbox::Storage::implementation
{
struct BlobInfoQueryResult : BlobInfoQueryResultT<BlobInfoQueryResult>
{
BlobInfoQueryResult() = default;
winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::Foundation::Collections::IVectorView<winrt::Windows::Xbox::Storage::BlobInfo>> GetBlobInfoAsync(uint32_t unk, uint32_t unka);
winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::Foundation::Collections::IVectorView<winrt::Windows::Xbox::Storage::BlobInfo>> GetBlobInfoAsync();
winrt::Windows::Foundation::IAsyncOperation<uint32_t> GetItemCountAsync();
};
struct ConnectedStorageContainer : ConnectedStorageContainerT<ConnectedStorageContainer>
{
ConnectedStorageContainer() = default;
ConnectedStorageContainer(hstring name, wd::WinRT::ConnectedStorage storage) : name(name), storage(storage) {}
hstring Name();
winrt::Windows::Xbox::Storage::ConnectedStorageSpace OwningSpace();
winrt::Windows::Foundation::IAsyncAction SubmitUpdatesAsync(winrt::Windows::Foundation::Collections::IMapView<hstring, winrt::Windows::Storage::Streams::IBuffer> unk, winrt::Windows::Foundation::Collections::IIterable<hstring> unka);
winrt::Windows::Foundation::IAsyncAction ReadAsync(winrt::Windows::Foundation::Collections::IMapView<hstring, winrt::Windows::Storage::Streams::IBuffer> unk);
winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::Foundation::Collections::IMapView<hstring, winrt::Windows::Storage::Streams::IBuffer>> GetAsync(winrt::Windows::Foundation::Collections::IIterable<hstring> unk);
winrt::Windows::Foundation::IAsyncAction SubmitPropertySetUpdatesAsync(winrt::Windows::Foundation::Collections::IPropertySet unk, winrt::Windows::Foundation::Collections::IIterable<hstring> unka);
winrt::Windows::Foundation::IAsyncAction SubmitUpdatesAsync(winrt::Windows::Foundation::Collections::IMapView<hstring, winrt::Windows::Storage::Streams::IBuffer> unk, winrt::Windows::Foundation::Collections::IIterable<hstring> unka, hstring unkaa);
winrt::Windows::Foundation::IAsyncAction SubmitPropertySetUpdatesAsync(winrt::Windows::Foundation::Collections::IPropertySet unk, winrt::Windows::Foundation::Collections::IIterable<hstring> unka, hstring unkaa);
winrt::Windows::Xbox::Storage::BlobInfoQueryResult CreateBlobInfoQuery(hstring const& unk);
private:
hstring name;
wd::WinRT::ConnectedStorage storage;
};
}

View File

@@ -0,0 +1,40 @@
#pragma once
#include <winrt/Windows.Foundation.Collections.h>
#include "Windows.Xbox.Storage.ConnectedStorageSpace.g.h"
#include "Windows.Xbox.Storage.ConnectedStorage.h"
#include "Windows.Xbox.Storage.ConnectedStorageContainer.h"
namespace winrt::Windows::Xbox::Storage::implementation
{
struct ConnectedStorageSpace : ConnectedStorageSpaceT<ConnectedStorageSpace>
{
ConnectedStorageSpace() = default;
ConnectedStorageSpace(wd::WinRT::ConnectedStorage storage) : storage(storage) {}
ConnectedStorageSpace(wd::WinRT::ConnectedStorage storage, uint32_t id) : storage(storage), id(id) {}
static winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::Xbox::Storage::ConnectedStorageSpace> GetForUserAsync(winrt::Windows::Xbox::System::User unk);
static winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::Xbox::Storage::ConnectedStorageSpace> GetForUserAsync(winrt::Windows::Xbox::System::User unk, hstring unka);
static winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::Xbox::Storage::ConnectedStorageSpace> GetForMachineAsync();
static winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::Xbox::Storage::ConnectedStorageSpace> GetForMachineAsync(hstring unk);
static winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::Xbox::Storage::ConnectedStorageSpace> GetSyncOnDemandForUserAsync(winrt::Windows::Xbox::System::User unk);
static winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::Xbox::Storage::ConnectedStorageSpace> GetSyncOnDemandForUserAsync(winrt::Windows::Xbox::System::User unk, hstring unka);
winrt::Windows::Xbox::System::User User();
hstring ServiceConfigurationId();
bool IsReadOnly();
winrt::Windows::Xbox::Storage::ConnectedStorageContainer CreateContainer(hstring const& containerName);
winrt::Windows::Foundation::IAsyncAction DeleteContainerAsync(hstring containerName);
winrt::Windows::Xbox::Storage::ContainerInfoQueryResult CreateContainerInfoQuery(hstring const& unk);
winrt::Windows::Foundation::IAsyncOperation<int32_t> GetRemainingBytesInQuotaAsync();
winrt::Windows::Foundation::IAsyncOperation<int64_t> GetRemainingBytesInQuota64Async();
private:
wd::WinRT::ConnectedStorage storage;
uint32_t id = 0;
inline static winrt::Windows::Foundation::Collections::IMap<hstring, winrt::Windows::Xbox::Storage::ConnectedStorageContainer> containers{};
};
}
namespace winrt::Windows::Xbox::Storage::factory_implementation
{
struct ConnectedStorageSpace : ConnectedStorageSpaceT<ConnectedStorageSpace, implementation::ConnectedStorageSpace>
{
};
}

View File

@@ -0,0 +1,23 @@
#pragma once
#include "Windows.Xbox.Storage.ContainerInfoQueryResult.g.h"
#include "Windows.Xbox.Storage.ContainerInfo2QueryResult.g.h"
namespace winrt::Windows::Xbox::Storage::implementation
{
struct ContainerInfoQueryResult : ContainerInfoQueryResultT<ContainerInfoQueryResult>
{
ContainerInfoQueryResult() = default;
winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::Foundation::Collections::IVectorView<winrt::Windows::Xbox::Storage::ContainerInfo>> GetContainerInfoAsync(uint32_t unk, uint32_t unka);
winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::Foundation::Collections::IVectorView<winrt::Windows::Xbox::Storage::ContainerInfo>> GetContainerInfoAsync();
winrt::Windows::Foundation::IAsyncOperation<uint32_t> GetItemCountAsync();
};
struct ContainerInfo2QueryResult : ContainerInfo2QueryResultT<ContainerInfo2QueryResult>
{
ContainerInfo2QueryResult() = default;
winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::Foundation::Collections::IVectorView<winrt::Windows::Xbox::Storage::ContainerInfo2>> GetContainerInfo2Async(uint32_t unk, uint32_t unka);
winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::Foundation::Collections::IVectorView<winrt::Windows::Xbox::Storage::ContainerInfo2>> GetContainerInfo2Async();
};
}

View File

@@ -3,6 +3,7 @@
#include "Windows.Xbox.System.UserAddedEventArgs.g.h"
#include "Windows.Xbox.System.UserRemovedEventArgs.g.h"
#include "Windows.Xbox.System.UserDisplayInfo.h"
#include "Windows.Xbox.System.h"
namespace winrt::Windows::Xbox::System::implementation
{

View File

@@ -179,7 +179,7 @@ namespace winrt::Windows::Xbox::Input::implementation
winrt::Windows::Xbox::System::User Gamepad::User()
{
p_wd->log.Log("WinDurango::WinRT::Windows::Xbox::Input", "Creating Getting User");
p_wd->log.Log("WinDurango::WinRT::Windows::Xbox::Input", "Getting User");
return winrt::Windows::Xbox::System::User::Users().GetAt(id);
}

View File

@@ -0,0 +1,37 @@
#include "Windows.Xbox.Storage.ConnectedStorage.h"
namespace wd::WinRT
{
ConnectedStorage::ConnectedStorage(uint32_t id) : userId(id)
{
std::shared_ptr<wd::common::interfaces::storage::Directory> usersDir = p_wd->rootDir->CreateFolder("Users");
dir = usersDir->CreateFolder("User_" + std::to_string(id));
}
ConnectedStorage::ConnectedStorage()
{
dir = p_wd->rootDir->CreateFolder("Machine");
}
winrt::Windows::Foundation::IAsyncAction ConnectedStorage::DeleteContainer(winrt::hstring containerName)
{
bool exists = dir->dirExists(winrt::to_string(containerName));
if (exists)
{
try
{
dir->CreateFolder(std::filesystem::path(containerName.c_str()))->remove();
p_wd->log.Log("WinDurango::WinRT::Windows::Xbox::Storage", "Deleted Container");
}
catch (winrt::hresult_error const& ex)
{
p_wd->log.Log("WinDurango::WinRT::Windows::Xbox::Storage", "Failed to Deleted Container - {}: {}", winrt::to_string(containerName).c_str(), winrt::to_string(ex.message()).c_str());
throw;
}
} else {
p_wd->log.Log("WinDurango::WinRT::Windows::Xbox::Storage", "Failed to delete non-existent container");
}
co_return;
}
}

View File

@@ -0,0 +1,65 @@
#include "Windows.Xbox.Storage.ConnectedStorageContainer.h"
#include "WinDurangoWinRT.h"
namespace winrt::Windows::Xbox::Storage::implementation
{
winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::Foundation::Collections::IVectorView<winrt::Windows::Xbox::Storage::BlobInfo>> BlobInfoQueryResult::GetBlobInfoAsync(uint32_t unk, uint32_t unka)
{
p_wd->log.Warn("WinDurango::WinRT::Windows::Xbox::Storage", "Unimplemented: GetBlobInfoAsync");
throw hresult_not_implemented();
}
winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::Foundation::Collections::IVectorView<winrt::Windows::Xbox::Storage::BlobInfo>> BlobInfoQueryResult::GetBlobInfoAsync()
{
p_wd->log.Warn("WinDurango::WinRT::Windows::Xbox::Storage", "Unimplemented: GetBlobInfoAsync");
throw hresult_not_implemented();
}
winrt::Windows::Foundation::IAsyncOperation<uint32_t> BlobInfoQueryResult::GetItemCountAsync()
{
p_wd->log.Warn("WinDurango::WinRT::Windows::Xbox::Storage", "Unimplemented: GetItemCountAsync");
throw hresult_not_implemented();
}
hstring ConnectedStorageContainer::Name()
{
return name;
}
winrt::Windows::Xbox::Storage::ConnectedStorageSpace ConnectedStorageContainer::OwningSpace()
{
p_wd->log.Warn("WinDurango::WinRT::Windows::Xbox::Storage", "Unimplemented: OwningSpace");
throw hresult_not_implemented();
}
winrt::Windows::Foundation::IAsyncAction ConnectedStorageContainer::SubmitUpdatesAsync(winrt::Windows::Foundation::Collections::IMapView<hstring, winrt::Windows::Storage::Streams::IBuffer> unk, winrt::Windows::Foundation::Collections::IIterable<hstring> unka)
{
p_wd->log.Warn("WinDurango::WinRT::Windows::Xbox::Storage", "Unimplemented: SubmitUpdatesAsync");
throw hresult_not_implemented();
}
winrt::Windows::Foundation::IAsyncAction ConnectedStorageContainer::ReadAsync(winrt::Windows::Foundation::Collections::IMapView<hstring, winrt::Windows::Storage::Streams::IBuffer> unk)
{
p_wd->log.Warn("WinDurango::WinRT::Windows::Xbox::Storage", "Unimplemented: ReadAsync");
throw hresult_not_implemented();
}
winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::Foundation::Collections::IMapView<hstring, winrt::Windows::Storage::Streams::IBuffer>> ConnectedStorageContainer::GetAsync(winrt::Windows::Foundation::Collections::IIterable<hstring> unk)
{
p_wd->log.Warn("WinDurango::WinRT::Windows::Xbox::Storage", "Unimplemented: GetAsync");
throw hresult_not_implemented();
}
winrt::Windows::Foundation::IAsyncAction ConnectedStorageContainer::SubmitPropertySetUpdatesAsync(winrt::Windows::Foundation::Collections::IPropertySet unk, winrt::Windows::Foundation::Collections::IIterable<hstring> unka)
{
p_wd->log.Warn("WinDurango::WinRT::Windows::Xbox::Storage", "Unimplemented: SubmitPropertySetUpdatesAsync");
throw hresult_not_implemented();
}
winrt::Windows::Foundation::IAsyncAction ConnectedStorageContainer::SubmitUpdatesAsync(winrt::Windows::Foundation::Collections::IMapView<hstring, winrt::Windows::Storage::Streams::IBuffer> unk, winrt::Windows::Foundation::Collections::IIterable<hstring> unka, hstring unkaa)
{
p_wd->log.Warn("WinDurango::WinRT::Windows::Xbox::Storage", "Unimplemented: SubmitUpdatesAsync");
throw hresult_not_implemented();
}
winrt::Windows::Foundation::IAsyncAction ConnectedStorageContainer::SubmitPropertySetUpdatesAsync(winrt::Windows::Foundation::Collections::IPropertySet unk, winrt::Windows::Foundation::Collections::IIterable<hstring> unka, hstring unkaa)
{
p_wd->log.Warn("WinDurango::WinRT::Windows::Xbox::Storage", "Unimplemented: SubmitPropertySetUpdatesAsync");
throw hresult_not_implemented();
}
winrt::Windows::Xbox::Storage::BlobInfoQueryResult ConnectedStorageContainer::CreateBlobInfoQuery(hstring const& unk)
{
p_wd->log.Warn("WinDurango::WinRT::Windows::Xbox::Storage", "Unimplemented: CreateBlobInfoQuery");
throw hresult_not_implemented();
}
}

View File

@@ -0,0 +1,79 @@
#include "Windows.Xbox.Storage.ConnectedStorageSpace.h"
namespace winrt::Windows::Xbox::Storage::implementation
{
winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::Xbox::Storage::ConnectedStorageSpace> ConnectedStorageSpace::GetForUserAsync(winrt::Windows::Xbox::System::User user)
{
co_return (winrt::Windows::Xbox::Storage::ConnectedStorageSpace)winrt::make<winrt::Windows::Xbox::Storage::implementation::ConnectedStorageSpace>(wd::WinRT::ConnectedStorage(user.Id()), user.Id());
}
winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::Xbox::Storage::ConnectedStorageSpace> ConnectedStorageSpace::GetForUserAsync(winrt::Windows::Xbox::System::User user, hstring unka)
{
co_return (winrt::Windows::Xbox::Storage::ConnectedStorageSpace)winrt::make<winrt::Windows::Xbox::Storage::implementation::ConnectedStorageSpace>(wd::WinRT::ConnectedStorage(user.Id()), user.Id());
}
winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::Xbox::Storage::ConnectedStorageSpace> ConnectedStorageSpace::GetForMachineAsync()
{
co_return (winrt::Windows::Xbox::Storage::ConnectedStorageSpace)winrt::make<winrt::Windows::Xbox::Storage::implementation::ConnectedStorageSpace>(wd::WinRT::ConnectedStorage());
}
winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::Xbox::Storage::ConnectedStorageSpace> ConnectedStorageSpace::GetForMachineAsync(hstring unk)
{
co_return (winrt::Windows::Xbox::Storage::ConnectedStorageSpace)winrt::make<winrt::Windows::Xbox::Storage::implementation::ConnectedStorageSpace>(wd::WinRT::ConnectedStorage());
}
winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::Xbox::Storage::ConnectedStorageSpace> ConnectedStorageSpace::GetSyncOnDemandForUserAsync(winrt::Windows::Xbox::System::User user)
{
co_return (winrt::Windows::Xbox::Storage::ConnectedStorageSpace)winrt::make<winrt::Windows::Xbox::Storage::implementation::ConnectedStorageSpace>(wd::WinRT::ConnectedStorage(user.Id()), user.Id());
}
winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::Xbox::Storage::ConnectedStorageSpace> ConnectedStorageSpace::GetSyncOnDemandForUserAsync(winrt::Windows::Xbox::System::User user, hstring unka)
{
co_return (winrt::Windows::Xbox::Storage::ConnectedStorageSpace)winrt::make<winrt::Windows::Xbox::Storage::implementation::ConnectedStorageSpace>(wd::WinRT::ConnectedStorage(user.Id()), user.Id());
}
winrt::Windows::Xbox::System::User ConnectedStorageSpace::User()
{
return winrt::Windows::Xbox::System::User::Users().GetAt(id);
}
hstring ConnectedStorageSpace::ServiceConfigurationId()
{
p_wd->log.Warn("WinDurango::WinRT::Windows::Xbox::Storage", "Unimplemented: ServiceConfigurationId");
throw hresult_not_implemented();
}
bool ConnectedStorageSpace::IsReadOnly()
{
return false;
}
winrt::Windows::Xbox::Storage::ConnectedStorageContainer ConnectedStorageSpace::CreateContainer(hstring const& containerName)
{
if (!containers)
{
containers = winrt::single_threaded_map<hstring, winrt::Windows::Xbox::Storage::ConnectedStorageContainer>();
}
if (!containers.HasKey(containerName))
{
winrt::Windows::Xbox::Storage::ConnectedStorageContainer container = winrt::make<ConnectedStorageContainer>(containerName, storage);
containers.Insert(containerName, container);
return container;
}
return containers.Lookup(containerName);
}
winrt::Windows::Foundation::IAsyncAction ConnectedStorageSpace::DeleteContainerAsync(hstring containerName)
{
co_await storage.DeleteContainer(containerName);
containers.Remove(containerName);
}
winrt::Windows::Xbox::Storage::ContainerInfoQueryResult ConnectedStorageSpace::CreateContainerInfoQuery(hstring const& unk)
{
p_wd->log.Warn("WinDurango::WinRT::Windows::Xbox::Storage", "Unimplemented: CreateContainerInfoQuery");
throw hresult_not_implemented();
}
winrt::Windows::Foundation::IAsyncOperation<int32_t> ConnectedStorageSpace::GetRemainingBytesInQuotaAsync()
{
p_wd->log.Warn("WinDurango::WinRT::Windows::Xbox::Storage", "Unimplemented: GetRemainingBytesInQuotaAsync");
throw hresult_not_implemented();
}
winrt::Windows::Foundation::IAsyncOperation<int64_t> ConnectedStorageSpace::GetRemainingBytesInQuota64Async()
{
p_wd->log.Warn("WinDurango::WinRT::Windows::Xbox::Storage", "Unimplemented: GetRemainingBytesInQuota64Async");
throw hresult_not_implemented();
}
}

View File

@@ -0,0 +1,31 @@
#include "Windows.Xbox.Storage.ContainerInfoQueryResult.h"
#include "WinDurangoWinRT.h"
namespace winrt::Windows::Xbox::Storage::implementation
{
winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::Foundation::Collections::IVectorView<winrt::Windows::Xbox::Storage::ContainerInfo>> ContainerInfoQueryResult::GetContainerInfoAsync(uint32_t unk, uint32_t unka)
{
p_wd->log.Warn("WinDurango::WinRT::Windows::Xbox::Storage", "Unimplemented: GetContainerInfoAsync(UInt32, UInt32)");
throw hresult_not_implemented();
}
winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::Foundation::Collections::IVectorView<winrt::Windows::Xbox::Storage::ContainerInfo>> ContainerInfoQueryResult::GetContainerInfoAsync()
{
p_wd->log.Warn("WinDurango::WinRT::Windows::Xbox::Storage", "Unimplemented: GetContainerInfoAsync");
throw hresult_not_implemented();
}
winrt::Windows::Foundation::IAsyncOperation<uint32_t> ContainerInfoQueryResult::GetItemCountAsync()
{
p_wd->log.Warn("WinDurango::WinRT::Windows::Xbox::Storage", "Unimplemented: GetItemCountAsync");
throw hresult_not_implemented();
}
winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::Foundation::Collections::IVectorView<winrt::Windows::Xbox::Storage::ContainerInfo2>> ContainerInfo2QueryResult::GetContainerInfo2Async(uint32_t unk, uint32_t unka)
{
p_wd->log.Warn("WinDurango::WinRT::Windows::Xbox::Storage", "Unimplemented: GetContainerInfo2Async(UInt32, UInt32)");
throw hresult_not_implemented();
}
winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::Foundation::Collections::IVectorView<winrt::Windows::Xbox::Storage::ContainerInfo2>> ContainerInfo2QueryResult::GetContainerInfo2Async()
{
p_wd->log.Warn("WinDurango::WinRT::Windows::Xbox::Storage", "Unimplemented: GetContainerInfo2Async");
throw hresult_not_implemented();
}
}

View File

@@ -83,14 +83,19 @@ namespace winrt::Windows::Xbox::System::implementation
winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::Xbox::System::GetTokenAndSignatureResult> User::GetTokenAndSignatureForAllUsersAsync(hstring method, hstring url, hstring headers, winrt::Windows::Foundation::Collections::IVector<uint8_t> body)
{
p_wd->log.Warn("WinDurango::WinRT::Windows::Xbox::System", "Unimplemented: GetTokenAndSignatureForAllUsersAsync(hstring, hstring, hstring, array<uint8_t>)");
throw hresult_not_implemented();
std::string s;
for (auto b : body)
{
s += std::to_string(+b) + " ";
}
p_wd->log.Warn("WinDurango::WinRT::Windows::Xbox::System", "Unimplemented: GetTokenAndSignatureForAllUsersAsync({}, {}, {}, array<uint8_t>{})", to_string(method), to_string(url), to_string(headers), s);
co_return winrt::make<winrt::Windows::Xbox::System::implementation::GetTokenAndSignatureResult>();
}
winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::Xbox::System::GetTokenAndSignatureResult> User::GetTokenAndSignatureForAllUsersAsync(hstring method, hstring url, hstring headers, hstring body)
{
p_wd->log.Warn("WinDurango::WinRT::Windows::Xbox::System", "Unimplemented: GetTokenAndSignatureForAllUsersAsync(hstring, hstring, hstring, hstring)");
throw hresult_not_implemented();
p_wd->log.Warn("WinDurango::WinRT::Windows::Xbox::System", "Unimplemented: GetTokenAndSignatureForAllUsersAsync({}, {}, {}, {})", to_string(method), to_string(url), to_string(headers), to_string(body));
co_return winrt::make<winrt::Windows::Xbox::System::implementation::GetTokenAndSignatureResult>();
}
winrt::event_token User::AudioDeviceAdded(winrt::Windows::Foundation::EventHandler<winrt::Windows::Xbox::System::AudioDeviceAddedEventArgs> const& handler)
@@ -217,13 +222,13 @@ namespace winrt::Windows::Xbox::System::implementation
hstring User::XboxUserHash()
{
p_wd->log.Warn("WinDurango::WinRT::Windows::Xbox::System", "Unimplemented: XboxUserHash");
return L"";
return winrt::to_hstring(id);
}
hstring User::XboxUserId()
{
p_wd->log.Warn("WinDurango::WinRT::Windows::Xbox::System", "Unimplemented: XboxUserId");
return L"";
return winrt::to_hstring(id);
}
winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::Xbox::System::GetTokenAndSignatureResult> User::GetTokenAndSignatureAsync(hstring method, hstring url, hstring headers)