wut  v1.7.0
Wii U Toolchain
IBlackListAccessorDetails.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <nn/result.h>
4 #include <nn/sl/sl_cpp.h>
5 #include <wut.h>
6 
7 #ifdef __cplusplus
8 
9 namespace nn::sl {
10  class DataCreator;
11  class QuickStartApplicationSelector;
12  namespace details {
13  class IBlackListAccessorBase;
15 
16  typedef nn::Result (*IBlackListAccessor_GetFn)(IBlackListAccessorInternal *, TitleInfo *outTitleInfos, int *outTitleInfosSize, int maxTitleInfos);
17 
19  IBlackListAccessorBase *instance; // normally this is padding
20  uint32_t info;
21  WUT_PADDING_BYTES(4);
22  uint32_t destructor;
23  WUT_PADDING_BYTES(4);
25  };
26  WUT_CHECK_SIZE(IBlackListAccessorInternalVTable, 0x18);
27  WUT_CHECK_OFFSET(IBlackListAccessorInternalVTable, 0x00, instance);
28  WUT_CHECK_OFFSET(IBlackListAccessorInternalVTable, 0x14, GetFn);
29 
30  typedef struct WUT_PACKED IBlackListAccessorInternal {
33  WUT_CHECK_SIZE(IBlackListAccessorInternal, 0x04);
34  WUT_CHECK_OFFSET(IBlackListAccessorInternal, 0x00, vtable);
35 
37  friend class nn::sl::DataCreator;
39 
40  public:
42  virtual ~IBlackListAccessorBase() = default;
43 
44  virtual nn::Result Get(nn::sl::TitleInfo *outTitleInfos, int *outTitleInfosSize, int maxTitleInfos) const = 0;
45 
46  private:
47  virtual details::IBlackListAccessorInternal *GetInternal() = 0;
48  };
49 
51  public:
53  }
54  nn::Result Get(nn::sl::TitleInfo *outTitleInfos, int *outTitleInfosSize, int maxTitleInfos) const override {
55  if (!mInstancePtr) {
57  }
58  return mInstancePtr->vtable->GetFn(mInstancePtr, outTitleInfos, outTitleInfosSize, maxTitleInfos);
59  }
60 
61  private:
62  nn::sl::details::IBlackListAccessorInternal *GetInternal() override {
63  return mInstancePtr;
64  }
65 
67  };
68  } // namespace details
69 
70 } // namespace nn::sl
71 
72 #endif
Result value type used by nn libraries.
Definition: result.h:68
@ LEVEL_FATAL
Definition: result.h:73
@ RESULT_MODULE_NN_SL
Definition: result.h:114
BlackListAccessorFromPtr(details::IBlackListAccessorInternal *ptr)
nn::Result Get(nn::sl::TitleInfo *outTitleInfos, int *outTitleInfosSize, int maxTitleInfos) const override
virtual nn::Result Get(nn::sl::TitleInfo *outTitleInfos, int *outTitleInfosSize, int maxTitleInfos) const =0
nn::Result(* IBlackListAccessor_GetFn)(IBlackListAccessorInternal *, TitleInfo *outTitleInfos, int *outTitleInfosSize, int maxTitleInfos)
struct nn::sl::details::IBlackListAccessorInternal IBlackListAccessorInternal