wut  v1.7.0
Wii U Toolchain
IInstalledTitleListAccessor.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <nn/result.h>
5 #include <nn/sl/sl_cpp.h>
6 #include <wut.h>
7 
8 #ifdef __cplusplus
9 
10 namespace nn::sl {
12 
13  public:
15  InitInternalVtable();
16  }
17 
18 
20  InitInternalVtable();
21  }
22 
24  InitInternalVtable();
25  return *this;
26  }
27 
29  InitInternalVtable();
30  return *this;
31  }
32 
33  ~IInstalledTitleListAccessor() override = default;
34 
35  private:
36  static nn::Result GetWrapper(details::IInstalledTitleListAccessorInternal *instance, nn::sl::TitleInfo *outInstalledTitleInfos, int *outInstalledTitleInfosSize, int maxInstalledTitleInfos) {
37  return instance->vtable->instance->Get(outInstalledTitleInfos, outInstalledTitleInfosSize, maxInstalledTitleInfos);
38  }
39 
40  details::IInstalledTitleListAccessorInternal *GetInternal() override {
41  return &mInstance;
42  }
43 
44  void InitInternalVtable() {
45  mVTable = {.instance = this,
46  .GetFn = &GetWrapper};
47  mInstance.vtable = &mVTable;
48  }
49 
51  details::IInstalledTitleListAccessorInternalVTable mVTable{};
52  };
53 
55 } // namespace nn::sl
56 
57 #endif
Result value type used by nn libraries.
Definition: result.h:68
IInstalledTitleListAccessor & operator=(const IInstalledTitleListAccessor &other)
~IInstalledTitleListAccessor() override=default
IInstalledTitleListAccessor & operator=(IInstalledTitleListAccessor &&src) noexcept
IInstalledTitleListAccessor(IInstalledTitleListAccessor &src)
virtual nn::Result Get(nn::sl::TitleInfo *outTitleInfos, int *outTitleInfosSize, int maxTitleInfos) const =0
struct nn::sl::details::IInstalledTitleListAccessorInternal IInstalledTitleListAccessorInternal
details::IInstalledTitleListAccessorBase & GetDefaultInstalledTitleListAccessor()