wut v1.8.0
Wii U Toolchain
Loading...
Searching...
No Matches
IUpdatePackageAccessor.h
Go to the documentation of this file.
1#pragma once
2
3#include <nn/result.h>
5#include <wut.h>
6
7#ifdef __cplusplus
8
9namespace nn::sl {
11
12 public:
14 InitInternalVtable();
15 }
16
18 InitInternalVtable();
19 }
20
22 InitInternalVtable();
23 return *this;
24 }
25
27 InitInternalVtable();
28 return *this;
29 }
30
31 ~IUpdatePackageAccessor() override = default;
32
33 private:
34 static bool PackageExistsWrapper(details::IUpdatePackageAccessorInternal *instance) {
35 return instance->vtable->instance->PackageExists();
36 }
37 static bool IsUpdatePackageDownloadedWrapper(details::IUpdatePackageAccessorInternal *instance) {
38 return instance->vtable->instance->IsUpdatePackageDownloaded();
39 }
40
41 details::IUpdatePackageAccessorInternal *GetInternal() override {
42 return &mInstance;
43 }
44
45 void InitInternalVtable() {
46 mVTable = {.instance = this,
47 .PackageExistsFn = PackageExistsWrapper,
48 .IsUpdatePackageDownloadedFn = IsUpdatePackageDownloadedWrapper};
49 mInstance.vtable = &mVTable;
50 }
51
52 details::IUpdatePackageAccessorInternal mInstance{};
53 details::IUpdatePackageAccessorInternalVTable mVTable{};
54 };
55
57} // namespace nn::sl
58
59#endif
IUpdatePackageAccessor(IUpdatePackageAccessor &src)
IUpdatePackageAccessor & operator=(IUpdatePackageAccessor &&src) noexcept
~IUpdatePackageAccessor() override=default
IUpdatePackageAccessor & operator=(const IUpdatePackageAccessor &other)
virtual bool IsUpdatePackageDownloaded() const =0
details::IUpdatePackageAccessorBase & GetDefaultUpdatePackageAccessor()