wut  v1.7.0
Wii U Toolchain
ILaunchedTitleListAccessor.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <nn/result.h>
5 #include <wut.h>
6 
7 #ifdef __cplusplus
8 
9 namespace nn::sl {
11 
12  public:
14  InitInternalVtable();
15  }
16 
18  InitInternalVtable();
19  }
20 
22  InitInternalVtable();
23  return *this;
24  }
25 
27  InitInternalVtable();
28  return *this;
29  }
30 
31  ~ILaunchedTitleListAccessor() override = default;
32 
33  private:
34  static nn::Result GetByAccountWrapper(details::ILaunchedTitleListAccessorInternal *instance, nn::sl::TitleInfo *outTitleInfos, int *outTitleInfoSize, int inTitleInfosSize, int userId) {
35  return instance->vtable->instance->GetByAccount(outTitleInfos, outTitleInfoSize, inTitleInfosSize, userId);
36  }
37 
38  details::ILaunchedTitleListAccessorInternal *GetInternal() override {
39  return &mInstance;
40  }
41 
42  void InitInternalVtable() {
43  mVTable = {.instance = this,
44  .GetByAccountFn = &GetByAccountWrapper};
45  mInstance.vtable = &mVTable;
46  }
47 
49  details::ILaunchedTitleListAccessorInternalVTable mVTable{};
50  };
51 
55  };
56 
59 } // namespace nn::sl
60 
61 #endif
Result value type used by nn libraries.
Definition: result.h:68
ILaunchedTitleListAccessor(ILaunchedTitleListAccessor &src)
ILaunchedTitleListAccessor & operator=(const ILaunchedTitleListAccessor &other)
~ILaunchedTitleListAccessor() override=default
ILaunchedTitleListAccessor & operator=(ILaunchedTitleListAccessor &&src) noexcept
virtual nn::Result GetByAccount(nn::sl::TitleInfo *outTitleInfos, int *outTitleInfoSize, int inTitleInfosSize, int userId) const =0
struct nn::sl::details::ILaunchedTitleListAccessorInternal ILaunchedTitleListAccessorInternal
details::ILaunchedTitleListAccessorBase & GetDefaultLaunchedTitleListAccessor(LaunchedTitleListAccessorType type)