wut  v1.7.0
Wii U Toolchain
ILaunchedTitleListAccessoDetails.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 KillerNotificationSelector;
11  class TitleListCache;
12  namespace details {
13  class ILaunchedTitleListAccessorBase;
15 
16  typedef nn::Result (*ILaunchedTitleListAccessor_GetByAccountFn)(ILaunchedTitleListAccessorInternal *, nn::sl::TitleInfo *outTitleInfos, int *outTitleInfoSize, int inTitleInfosSize, int userId);
17 
19  ILaunchedTitleListAccessorBase *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(ILaunchedTitleListAccessorInternalVTable, 0x18);
27  WUT_CHECK_OFFSET(ILaunchedTitleListAccessorInternalVTable, 0x14, GetByAccountFn);
28 
29  typedef struct WUT_PACKED ILaunchedTitleListAccessorInternal {
32  WUT_CHECK_SIZE(ILaunchedTitleListAccessorInternal, 0x04);
33  WUT_CHECK_OFFSET(ILaunchedTitleListAccessorInternal, 0x00, vtable);
34 
37  friend class nn::sl::TitleListCache;
38 
39  public:
41  virtual ~ILaunchedTitleListAccessorBase() = default;
42 
43  virtual nn::Result GetByAccount(nn::sl::TitleInfo *outTitleInfos, int *outTitleInfoSize, int inTitleInfosSize, int userId) const = 0;
44 
45  private:
46  virtual details::ILaunchedTitleListAccessorInternal *GetInternal() = 0;
47  };
48 
50  public:
52  }
53 
54  nn::Result GetByAccount(nn::sl::TitleInfo *outTitleInfos, int *outTitleInfoNum, int maxNumTitleInfos, int userId) const override {
55  if (!mInstancePtr) {
57  }
58  return mInstancePtr->vtable->GetByAccountFn(mInstancePtr, outTitleInfos, outTitleInfoNum, maxNumTitleInfos, userId);
59  }
60 
62  return mInstancePtr;
63  }
64 
65  private:
67  };
68 
69 
70  } // namespace details
71 
72 } // namespace nn::sl
73 
74 #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 GetByAccount(nn::sl::TitleInfo *outTitleInfos, int *outTitleInfoSize, int inTitleInfosSize, int userId) const =0
LaunchedTitleListAccessorFromPtr(details::ILaunchedTitleListAccessorInternal *ptr)
nn::Result GetByAccount(nn::sl::TitleInfo *outTitleInfos, int *outTitleInfoNum, int maxNumTitleInfos, int userId) const override
details::ILaunchedTitleListAccessorInternal * GetInternal() override
nn::Result(* ILaunchedTitleListAccessor_GetByAccountFn)(ILaunchedTitleListAccessorInternal *, nn::sl::TitleInfo *outTitleInfos, int *outTitleInfoSize, int inTitleInfosSize, int userId)
struct nn::sl::details::ILaunchedTitleListAccessorInternal ILaunchedTitleListAccessorInternal