Files
botw/lib/NintendoSDK/include/nn/bcat.h
T
Léo Lam 18c60323a9 Switch to subrepos
git subrepo clone https://github.com/open-ead/sead lib/sead

subrepo:
  subdir:   "lib/sead"
  merged:   "1b66e825d"
upstream:
  origin:   "https://github.com/open-ead/sead"
  branch:   "master"
  commit:   "1b66e825d"
git-subrepo:
  version:  "0.4.3"
  origin:   "https://github.com/ingydotnet/git-subrepo"
  commit:   "2f68596"

git subrepo clone (merge) https://github.com/open-ead/nnheaders lib/NintendoSDK

subrepo:
  subdir:   "lib/NintendoSDK"
  merged:   "9ee21399f"
upstream:
  origin:   "https://github.com/open-ead/nnheaders"
  branch:   "master"
  commit:   "9ee21399f"
git-subrepo:
  version:  "0.4.3"
  origin:   "ssh://git@github.com/ingydotnet/git-subrepo"
  commit:   "2f68596"

git subrepo clone https://github.com/open-ead/agl lib/agl

subrepo:
  subdir:   "lib/agl"
  merged:   "7c063271b"
upstream:
  origin:   "https://github.com/open-ead/agl"
  branch:   "master"
  commit:   "7c063271b"
git-subrepo:
  version:  "0.4.3"
  origin:   "ssh://git@github.com/ingydotnet/git-subrepo"
  commit:   "2f68596"

git subrepo clone https://github.com/open-ead/EventFlow lib/EventFlow

subrepo:
  subdir:   "lib/EventFlow"
  merged:   "c35d21b34"
upstream:
  origin:   "https://github.com/open-ead/EventFlow"
  branch:   "master"
  commit:   "c35d21b34"
git-subrepo:
  version:  "0.4.3"
  origin:   "ssh://git@github.com/ingydotnet/git-subrepo"
  commit:   "2f68596"
2022-03-21 21:31:42 +01:00

112 lines
3.2 KiB
C++

/**
* @file bcat.h
* @brief BCAT service implementation.
*/
#pragma once
#include <nn/os.h>
#include <nn/types.h>
namespace nn {
namespace bcat {
struct DirectoryName {
void isValid();
};
struct FileName {
void isValid();
};
class DeliveryCacheDirectory {
public:
DeliveryCacheDirectory();
~DeliveryCacheDirectory();
Result Open(nn::bcat::DirectoryName const&);
Result GetCount();
Result Close();
};
class DeliveryCacheFile {
public:
DeliveryCacheFile();
~DeliveryCacheFile();
Result Open(nn::bcat::DirectoryName const&, nn::bcat::FileName const&);
Result Read(size_t file1, s64, void*, size_t file2);
Result GetSize();
Result GetDigest();
Result Close();
};
class DeliveryCacheProgress {
public:
DeliveryCacheProgress();
~DeliveryCacheProgress();
Result Detach();
Result Update();
Result GetStatus();
Result GetCurrentDirectoryName();
Result GetCurrentFileName();
Result GetCurrentDownloaded();
Result GetCurrentTotale();
Result GetWholeDownloaded();
Result GetWholeTotal();
Result GetResult();
// void Attach(nn::bcat::detail::ipc::IDeliveryCacheProgressService*);
};
namespace detail {
namespace DeliveryCacheProgressImpl {
Result Clear();
Result NotifyStartConnect();
Result NotifyStartProcessList();
Result SetWholeDownloadSize(s64);
Result SetDownloadProgress(s64, nn::bcat::DirectoryName const&, nn::bcat::FileName const&, s64);
Result NotifyStartDownloadFile(nn::bcat::DirectoryName const&, nn::bcat::FileName const&, s64);
Result UpdateDownloadFileProgress(s64);
Result NotifyStartCommitDirectory(nn::bcat::DirectoryName const&);
Result NotifyDone(nn::Result);
} // namespace DeliveryCacheProgressImpl
class ShimLibraryGlobal {
public:
ShimLibraryGlobal();
~ShimLibraryGlobal();
Result Initialize();
Result GetSession();
Result MountDeliveryCacheStorage();
Result IsDeliveryCacheStorageMounted();
Result UnmountDeliveryCacheStorage();
// void CreateFileService(nn::bcat::detail::ipc::IDeliveryCacheFileService**);
// void CreateDirectoryService(nn::bcat::detail::ipc::IDeliveryCacheDirectoryService**)
Result IncrementDeliveryCacheFileCount();
Result DecrementDeliveryCacheFileCount();
Result IncrementDeliveryCacheDirectoryCount();
Result DecrementDeliveryCacheFileCount();
Result EnumerateDeliveryCacheDirectory(int*, nn::bcat::DirectoryName*, int);
};
namespace ipc {
Result Initialize();
// void CreateBcatService(nn::bcat::detail::ipc::IBcatService**);
Result Finalize();
// void CreateBcatService(nn::bcat::detail::ipc::IBcatService**);
// void CreateDeliveryCacheStorageService(nn::bcat::detail::ipc::IDeliveryCacheStorageService**);
// void CreateDeliveryCacheStorageService(nn::bcat::detail::ipc::IDeliveryCacheStorageService**,
// nn::ApplicationId);
} // namespace ipc
} // namespace detail
Result Initialize();
Result MountDeliveryCacheStorage();
Result UnmountDeliveryCacheStorage();
Result EnumerateDeliveryCacheDirectory(int*, nn::bcat::DirectoryName*, int);
Result RequestSyncDeliveryCache(nn::bcat::DeliveryCacheProgress*);
Result EnumerateDeliveryCacheDirectory(int*, nn::bcat::DirectoryName*, int);
} // namespace bcat
} // namespace nn