wut  v1.7.0
Wii U Toolchain
KillerNotificationTransferRecordManager.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <nn/result.h>
4 #include <nn/sl/FileStream.h>
6 #include <wut.h>
7 
8 #ifdef __cplusplus
9 
10 namespace nn::sl {
12 
13  public:
15  InitInternalVtable();
16  }
17 
19  InitInternalVtable();
20  }
21 
23  InitInternalVtable();
24  return *this;
25  }
26 
28  InitInternalVtable();
29  return *this;
30  }
31 
33 
34  private:
36  return instance->vtable->instance->Load(*stream->vtable->instance);
37  }
38 
39  static nn::Result LoadInitialWrapper(details::IKillerNotificationTransferRecordManagerInternal *instance) {
40  return instance->vtable->instance->LoadInitial();
41  }
42 
43  static nn::Result StoreWrapper(details::IKillerNotificationTransferRecordManagerInternal *instance, nn::sl::details::IStreamInternal *stream) {
44  return instance->vtable->instance->Store(*stream->vtable->instance);
45  }
46 
47  static uint32_t GetRecordCountWrapper(details::IKillerNotificationTransferRecordManagerInternal *instance) {
48  return instance->vtable->instance->GetRecordCount();
49  }
50 
51  static uint32_t GetRecordsWrapper(details::IKillerNotificationTransferRecordManagerInternal *instance, KillerNotificationTransferRecord *u1, uint32_t u2) {
52  return instance->vtable->instance->GetRecords(u1, u2);
53  }
54 
55  static void RegisterRecordsWrapper(details::IKillerNotificationTransferRecordManagerInternal *instance, const KillerNotificationTransferRecord *u1, uint32_t u2) {
56  return instance->vtable->instance->RegisterRecords(u1, u2);
57  }
58 
59  static nn::Result RegisterRecordsOtherWrapper(details::IKillerNotificationTransferRecordManagerInternal *instance, const uint32_t *u1, uint32_t u2) {
60  return instance->vtable->instance->RegisterRecords(u1, u2);
61  }
62 
63  details::IKillerNotificationTransferRecordManagerInternal *GetInternal() override {
64  return &mInstance;
65  }
66 
67  void InitInternalVtable() {
68  mVTable = {.instance = this,
69  .LoadFn = &LoadWrapper,
70  .LoadInitialFn = &LoadInitialWrapper,
71  .StoreFn = &StoreWrapper,
72  .GetRecordsFn = &GetRecordsWrapper,
73  .RegisterRecordsFn = &RegisterRecordsWrapper,
74  .RegisterRecordsOtherFn = &RegisterRecordsOtherWrapper};
75  mInstance.vtable = &mVTable;
76  }
77 
78  details::IKillerNotificationTransferRecordManagerInternal mInstance{};
80  };
81 
83  public:
86  }
87 
90  }
91 
92  void Finalize() override {
94  }
95 
98  }
99 
100  nn::Result LoadInitial() override {
102  }
103 
106  }
107 
108  uint32_t GetRecordCount() const override {
110  }
111 
112  uint32_t GetRecords(KillerNotificationTransferRecord *u1, uint32_t u2) const override {
114  }
115 
116  void RegisterRecords(const KillerNotificationTransferRecord *u1, uint32_t u2) override {
118  }
119 
120  nn::Result RegisterRecords(const uint32_t *u1, uint32_t u2) override {
121  return mInstance.vtable->RegisterRecordsOtherFn(&mInstance, u1, u2);
122  }
123 
124  private:
126  return &mInstance;
127  }
128  details::IKillerNotificationTransferRecordManagerInternal mInstance = {};
129  };
130 
132  public:
135  }
136 
139  }
140 
142  auto *base = reinterpret_cast<details::IKillerNotificationTransferRecordManagerInternal *>(&mInstance);
143  return mInstance.vtable->LoadFn(base, stream.GetInternal());
144  }
145 
146  nn::Result LoadInitial() override {
147  auto *base = reinterpret_cast<details::IKillerNotificationTransferRecordManagerInternal *>(&mInstance);
148  return mInstance.vtable->LoadInitialFn(base);
149  }
150 
152  auto *base = reinterpret_cast<details::IKillerNotificationTransferRecordManagerInternal *>(&mInstance);
153  return mInstance.vtable->StoreFn(base, stream.GetInternal());
154  }
155 
156  void Finalize() override {
157  auto *base = reinterpret_cast<details::IKillerNotificationTransferRecordManagerInternal *>(&mInstance);
158  return mInstance.vtable->FinalizeFn(base);
159  }
160 
161  uint32_t GetRecordCount() const override {
162  auto *base = (details::IKillerNotificationTransferRecordManagerInternal *) (&mInstance);
163  return mInstance.vtable->GetRecordCountFn(base);
164  }
165 
166  uint32_t GetRecords(KillerNotificationTransferRecord *u1, uint32_t u2) const override {
167  auto *base = (details::IKillerNotificationTransferRecordManagerInternal *) (&mInstance);
168  return mInstance.vtable->GetRecordsFn(base, u1, u2);
169  }
170 
171  void RegisterRecords(const KillerNotificationTransferRecord *u1, uint32_t u2) override {
172  auto *base = reinterpret_cast<details::IKillerNotificationTransferRecordManagerInternal *>(&mInstance);
173  return mInstance.vtable->RegisterRecordsFn(base, u1, u2);
174  }
175 
176  nn::Result RegisterRecords(const uint32_t *u1, uint32_t u2) override {
177  auto *base = reinterpret_cast<details::IKillerNotificationTransferRecordManagerInternal *>(&mInstance);
178  return mInstance.vtable->RegisterRecordsOtherFn(base, u1, u2);
179  }
180 
181  private:
183  };
184 
186 } // namespace nn::sl
187 
188 #endif
Result value type used by nn libraries.
Definition: result.h:68
IKillerNotificationTransferRecordManager & operator=(IKillerNotificationTransferRecordManager &&src) noexcept
IKillerNotificationTransferRecordManager & operator=(const IKillerNotificationTransferRecordManager &other)
IKillerNotificationTransferRecordManager(IKillerNotificationTransferRecordManager &src)
nn::Result Load(nn::sl::details::IStreamBase &stream) override
nn::Result RegisterRecords(const uint32_t *u1, uint32_t u2) override
void RegisterRecords(const KillerNotificationTransferRecord *u1, uint32_t u2) override
uint32_t GetRecords(KillerNotificationTransferRecord *u1, uint32_t u2) const override
nn::Result Store(nn::sl::details::IStreamBase &stream) override
nn::Result Load(nn::sl::details::IStreamBase &stream) override
nn::Result RegisterRecords(const uint32_t *u1, uint32_t u2) override
void RegisterRecords(const KillerNotificationTransferRecord *u1, uint32_t u2) override
uint32_t GetRecords(KillerNotificationTransferRecord *u1, uint32_t u2) const override
nn::Result Store(nn::sl::details::IStreamBase &stream) override
virtual nn::Result Load(nn::sl::details::IStreamBase &stream)=0
void RegisterRecords__Q3_2nn2sl39KillerNotificationTransferRecordManagerFPCQ3_2nn2sl32KillerNotificationTransferRecordUi(IKillerNotificationTransferRecordManagerInternal *, const KillerNotificationTransferRecord *, uint32_t)
IKillerNotificationTransferRecordManagerInternVTable_RegisterRecordsFn RegisterRecordsFn
IKillerNotificationTransferRecordManagerInternVTable_GetRecordCountFn GetRecordCountFn
nn::Result Store__Q3_2nn2sl39KillerNotificationTransferRecordManagerCFRQ3_2nn2sl7IStream(IKillerNotificationTransferRecordManagerInternal *, details::IStreamInternal *)
uint32_t GetRecordCount__Q3_2nn2sl39KillerNotificationTransferRecordManagerCFv(IKillerNotificationTransferRecordManagerInternal *)
IStreamInternalVTable * vtable
IKillerNotificationTransferRecordManagerInternVTable_LoadInitialFn LoadInitialFn
nn::Result LoadInitial__Q3_2nn2sl39KillerNotificationTransferRecordManagerFv(IKillerNotificationTransferRecordManagerInternal *)
uint32_t GetRecords__Q3_2nn2sl39KillerNotificationTransferRecordManagerCFPQ3_2nn2sl32KillerNotificationTransferRecordUi(IKillerNotificationTransferRecordManagerInternal *, KillerNotificationTransferRecord *, uint32_t)
KillerNotificationTransferRecordManagerInternalInternal * __ct__Q3_2nn2sl47KillerNotificationTransferRecordManagerInternalFv(KillerNotificationTransferRecordManagerInternalInternal *)
void Finalize__Q3_2nn2sl39KillerNotificationTransferRecordManagerFv(IKillerNotificationTransferRecordManagerInternal *)
void * __dt__Q3_2nn2sl47KillerNotificationTransferRecordManagerInternalFv(KillerNotificationTransferRecordManagerInternalInternal *, int)
IKillerNotificationTransferRecordManagerInternVTable_RegisterRecordsOtherFn RegisterRecordsOtherFn
void * __dt__Q3_2nn2sl39KillerNotificationTransferRecordManagerFv(IKillerNotificationTransferRecordManagerInternal *, int)
nn::Result Load__Q3_2nn2sl39KillerNotificationTransferRecordManagerFRQ3_2nn2sl7IStream(IKillerNotificationTransferRecordManagerInternal *, details::IStreamInternal *)
struct nn::sl::details::IKillerNotificationTransferRecordManagerInternalVTable IKillerNotificationTransferRecordManagerInternalVTable
IKillerNotificationTransferRecordManagerIntern * __ct__Q3_2nn2sl39KillerNotificationTransferRecordManagerFv(IKillerNotificationTransferRecordManagerInternal *)
details::IKillerNotificationTransferRecordManagerBase & GetDefaultKillerNotificationTransferRecordManager()