wut  v1.7.0
Wii U Toolchain
IBlackListAccessor.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 {
11 
13 
14  public:
16  InitInternalVtable();
17  }
18 
19 
21  InitInternalVtable();
22  }
23 
25  InitInternalVtable();
26  return *this;
27  }
28 
30  InitInternalVtable();
31  return *this;
32  }
33 
34  ~IBlackListAccessor() override = default;
35 
36  private:
37  static nn::Result GetWrapper(details::IBlackListAccessorInternal *instance, nn::sl::TitleInfo *outTitleInfos, int *outTitleInfosSize, int maxTitleInfos) {
38  return instance->vtable->instance->Get(outTitleInfos, outTitleInfosSize, maxTitleInfos);
39  }
40 
41  details::IBlackListAccessorInternal *GetInternal() override {
42  return &mInstance;
43  }
44 
45  void InitInternalVtable() {
46  mVTable = {.instance = this,
47  .GetFn = &GetWrapper};
48  mInstance.vtable = &mVTable;
49  }
50 
52  details::IBlackListAccessorInternalVTable mVTable{};
53  };
54 
56 } // namespace nn::sl
57 
58 #endif
Result value type used by nn libraries.
Definition: result.h:68
IBlackListAccessor & operator=(IBlackListAccessor &&src) noexcept
~IBlackListAccessor() override=default
IBlackListAccessor(IBlackListAccessor &src)
IBlackListAccessor & operator=(const IBlackListAccessor &other)
virtual nn::Result Get(nn::sl::TitleInfo *outTitleInfos, int *outTitleInfosSize, int maxTitleInfos) const =0
struct nn::sl::details::IBlackListAccessorInternal IBlackListAccessorInternal
details::IBlackListAccessorBase & GetDefaultBlackListAccessor()