wut v1.8.0
Wii U Toolchain
Loading...
Searching...
No Matches
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
9namespace 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
48 details::ILaunchedTitleListAccessorInternal mInstance{};
49 details::ILaunchedTitleListAccessorInternalVTable mVTable{};
50 };
51
56
59} // namespace nn::sl
60
61#endif
Result value type used by nn libraries.
Definition result.h:68
ILaunchedTitleListAccessor(ILaunchedTitleListAccessor &src)
~ILaunchedTitleListAccessor() override=default
ILaunchedTitleListAccessor & operator=(const ILaunchedTitleListAccessor &other)
ILaunchedTitleListAccessor & operator=(ILaunchedTitleListAccessor &&src) noexcept
virtual nn::Result GetByAccount(nn::sl::TitleInfo *outTitleInfos, int *outTitleInfoSize, int inTitleInfosSize, int userId) const =0
details::ILaunchedTitleListAccessorBase & GetDefaultLaunchedTitleListAccessor()