wut  v1.7.0
Wii U Toolchain
IPreferentialTitleAccessorDetails.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 QuickStartApplicationSelector;
11  namespace details {
12  class IPreferentialTitleAccessorBase;
14 
16 
18  IPreferentialTitleAccessorBase *instance; // Is normally padding
19  uint32_t info;
20  WUT_PADDING_BYTES(4);
21  uint32_t destructor;
22  WUT_PADDING_BYTES(4);
24  };
25  WUT_CHECK_SIZE(IPreferentialTitleAccessorInternalVTable, 0x18);
26  WUT_CHECK_OFFSET(IPreferentialTitleAccessorInternalVTable, 0x00, instance);
27  WUT_CHECK_OFFSET(IPreferentialTitleAccessorInternalVTable, 0x14, GetFn);
28 
29  typedef struct WUT_PACKED IPreferentialTitleAccessorInternal {
32  WUT_CHECK_SIZE(IPreferentialTitleAccessorInternal, 0x04);
33  WUT_CHECK_OFFSET(IPreferentialTitleAccessorInternal, 0x00, vtable);
34 
37 
38  public:
40 
41  virtual ~IPreferentialTitleAccessorBase() = default;
42 
43  virtual nn::Result Get(TitleInfo *outTitleInfo, uint32_t *outTitleInfoNum, int maxNumTitleInfos, uint32_t u1) const = 0;
44 
45  private:
46  virtual details::IPreferentialTitleAccessorInternal *GetInternal() = 0;
47  };
48 
50  public:
52  }
53  nn::Result Get(TitleInfo *outTitleInfo, uint32_t *outTitleInfoNum, int maxNumTitleInfos, uint32_t u1) const override {
54  if (!mInstancePtr) {
56  }
57  return mInstancePtr->vtable->GetFn(mInstancePtr, outTitleInfo, outTitleInfoNum, maxNumTitleInfos, u1);
58  }
59 
60  private:
61  details::IPreferentialTitleAccessorInternal *GetInternal() override {
62  return mInstancePtr;
63  }
64 
66  };
67  } // namespace details
68 } // namespace nn::sl
69 
70 #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
virtual nn::Result Get(TitleInfo *outTitleInfo, uint32_t *outTitleInfoNum, int maxNumTitleInfos, uint32_t u1) const =0
PreferentialTitleAccessorFromPtr(details::IPreferentialTitleAccessorInternal *ptr)
nn::Result Get(TitleInfo *outTitleInfo, uint32_t *outTitleInfoNum, int maxNumTitleInfos, uint32_t u1) const override
nn::Result(* IPreferentialTitleAccessorBase_GetFn)(IPreferentialTitleAccessorInternal *, TitleInfo *, uint32_t *, int, uint32_t)
struct nn::sl::details::IPreferentialTitleAccessorInternal IPreferentialTitleAccessorInternal