wut  v1.7.0
Wii U Toolchain
QuickStartApplicationSelector.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <nn/result.h>
9 #include <nn/sl/TitleListCache.h>
10 #include <wut.h>
11 
12 #ifdef __cplusplus
13 
14 namespace nn::sl {
15  namespace details {
16  typedef struct WUT_PACKED QuickStartApplicationSelectorInternal {
23  void *vtable;
25  WUT_CHECK_SIZE(QuickStartApplicationSelectorInternal, 0x1C);
26  WUT_CHECK_OFFSET(QuickStartApplicationSelectorInternal, 0x00, preferentialTitleAccessor);
27  WUT_CHECK_OFFSET(QuickStartApplicationSelectorInternal, 0x04, defaultTitleAccessor);
28  WUT_CHECK_OFFSET(QuickStartApplicationSelectorInternal, 0x08, whiteListAccessor);
29  WUT_CHECK_OFFSET(QuickStartApplicationSelectorInternal, 0x0C, titleListCache);
30  WUT_CHECK_OFFSET(QuickStartApplicationSelectorInternal, 0x10, settingsAccessor);
31  WUT_CHECK_OFFSET(QuickStartApplicationSelectorInternal, 0x14, blackListAccessor);
32  WUT_CHECK_OFFSET(QuickStartApplicationSelectorInternal, 0x18, vtable);
33 
44  } // namespace details
45 
47  public:
48  QuickStartApplicationSelector() : mPreferentialTitleAccessorFromPtr(nullptr),
49  mDefaultTitleAccessorFromPtr(nullptr),
50  mWhiteListAccessorFromPtr(nullptr),
51  mTitleListCacheFromPtr(nullptr),
52  mSettingAccessorFromPtr(nullptr),
53  mBlackListAccessorFromPtr(nullptr) {
54  if (__ct__Q3_2nn2sl29QuickStartApplicationSelectorFv(&mInstance) != nullptr) {
55  mPreferentialTitleAccessorFromPtr = details::PreferentialTitleAccessorFromPtr(mInstance.preferentialTitleAccessor);
56  mDefaultTitleAccessorFromPtr = details::DefaultTitleAccessorFromPtr(mInstance.defaultTitleAccessor);
57  mWhiteListAccessorFromPtr = details::WhiteListAccessorFromPtr(mInstance.whiteListAccessor);
58  mTitleListCacheFromPtr = TitleListCacheFromPtr(mInstance.titleListCache);
59  mSettingAccessorFromPtr = details::SettingAccessorFromPtr(mInstance.settingsAccessor);
60  mBlackListAccessorFromPtr = details::BlackListAccessorFromPtr(mInstance.blackListAccessor);
61  }
62  }
63 
65 
67  return mPreferentialTitleAccessorFromPtr;
68  }
69 
71  return mDefaultTitleAccessorFromPtr;
72  }
73 
75  return mWhiteListAccessorFromPtr;
76  }
77 
79  return mTitleListCacheFromPtr;
80  }
81 
83  return mSettingAccessorFromPtr;
84  }
85 
87  return mBlackListAccessorFromPtr;
88  }
89 
90  nn::Result Select(nn::sl::TitleInfo *titleInfos, int num) {
92  }
93 
94  void Initialize(details::IPreferentialTitleAccessorBase &preferentialTitleAccessor,
95  details::IDefaultTitleAccessorBase &defaultTitleAccessor,
96  details::IWhiteListAccessorBase &whiteListAccessor,
97  details::ITitleListCacheBase &titleListCache,
98  details::ISettingAccessorBase &settingAccessor,
99  details::IBlackListAccessorBase &blackListAccessor) {
101  &mInstance,
102  preferentialTitleAccessor.GetInternal(),
103  defaultTitleAccessor.GetInternal(),
104  whiteListAccessor.GetInternal(),
105  titleListCache.GetInternal(),
106  settingAccessor.GetInternal(),
107  blackListAccessor.GetInternal());
108  mPreferentialTitleAccessorFromPtr = details::PreferentialTitleAccessorFromPtr(preferentialTitleAccessor.GetInternal());
109  mDefaultTitleAccessorFromPtr = details::DefaultTitleAccessorFromPtr(defaultTitleAccessor.GetInternal());
110  mWhiteListAccessorFromPtr = details::WhiteListAccessorFromPtr(whiteListAccessor.GetInternal());
111  mTitleListCacheFromPtr = TitleListCacheFromPtr(titleListCache.GetInternal());
112  mSettingAccessorFromPtr = details::SettingAccessorFromPtr(settingAccessor.GetInternal());
113  mBlackListAccessorFromPtr = details::BlackListAccessorFromPtr(blackListAccessor.GetInternal());
114  }
115 
116  private:
118  details::PreferentialTitleAccessorFromPtr mPreferentialTitleAccessorFromPtr;
119  details::DefaultTitleAccessorFromPtr mDefaultTitleAccessorFromPtr;
120  details::WhiteListAccessorFromPtr mWhiteListAccessorFromPtr;
121  TitleListCacheFromPtr mTitleListCacheFromPtr;
122  details::SettingAccessorFromPtr mSettingAccessorFromPtr;
123  details::BlackListAccessorFromPtr mBlackListAccessorFromPtr;
124  };
125 } // namespace nn::sl
126 
127 #endif
Result value type used by nn libraries.
Definition: result.h:68
details::ISettingAccessorBase & GetSettingAccessor()
nn::Result Select(nn::sl::TitleInfo *titleInfos, int num)
details::IBlackListAccessorBase & GetBlackListAccessor()
details::IDefaultTitleAccessorBase & GetDefaultTitleAccessor()
void Initialize(details::IPreferentialTitleAccessorBase &preferentialTitleAccessor, details::IDefaultTitleAccessorBase &defaultTitleAccessor, details::IWhiteListAccessorBase &whiteListAccessor, details::ITitleListCacheBase &titleListCache, details::ISettingAccessorBase &settingAccessor, details::IBlackListAccessorBase &blackListAccessor)
details::ITitleListCacheBase & GetTitleListCache()
details::IPreferentialTitleAccessorBase & GetPreferentialTitleAccessor()
details::IWhiteListAccessorBase & GetWhiteListAccessor()
QuickStartApplicationSelectorInternal * __ct__Q3_2nn2sl29QuickStartApplicationSelectorFv(QuickStartApplicationSelectorInternal *)
struct nn::sl::details::QuickStartApplicationSelectorInternal QuickStartApplicationSelectorInternal
void Initialize__Q3_2nn2sl29QuickStartApplicationSelectorFRQ3_2nn2sl26IPreferentialTitleAccessorRQ3_2nn2sl21IDefaultTitleAccessorRQ3_2nn2sl18IWhiteListAccessorRQ3_2nn2sl14TitleListCacheRQ3_2nn2sl16ISettingAccessorRQ3_2nn2sl18IBlackListAccessor(QuickStartApplicationSelectorInternal *, IPreferentialTitleAccessorInternal *, IDefaultTitleAccessorInternal *, IWhiteListAccessorInternal *, ITitleListCacheInternal *, ISettingAccessorInternal *, details::IBlackListAccessorInternal *)
nn::Result Select__Q3_2nn2sl29QuickStartApplicationSelectorFPQ3_2nn2sl9TitleInfoi(QuickStartApplicationSelectorInternal *, nn::sl::TitleInfo *, int)