LeviLamina
Loading...
Searching...
No Matches
CatalogCollection.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/core/utility/NonOwnerPointer.h"
7#include "mc/platform/threading/Mutex.h"
8
9// auto generated forward declare list
10// clang-format off
12struct IEntitlementManager;
13struct SearchQuery;
14struct StoreCatalogItem;
15struct StoreCatalogRepository;
16struct StoreSearchQuery;
17// clang-format on
18
20public:
21 // CatalogCollection inner types declare
22 // clang-format off
24 struct QueryContentInfo;
25 // clang-format on
26
27 // CatalogCollection inner types define
29
30 struct QueryContentInfo {};
31
32 using NoItemsFoundCallback = ::std::function<void()>;
33
34 using ItemsFoundCallback = ::std::function<void(int)>;
35
36public:
37 // member variables
38 // NOLINTBEGIN
39 ::ll::TypedStorage<8, 8, ::StoreCatalogRepository&> mStoreCatalog;
40 ::ll::TypedStorage<8, 24, ::Bedrock::NotNullNonOwnerPtr<::ContentCatalogService>> mContentCatalogService;
41 ::ll::TypedStorage<8, 24, ::Bedrock::NotNullNonOwnerPtr<::IEntitlementManager>> mEntitlementManager;
42 ::ll::TypedStorage<8, 8, ::StoreCatalogItem&> mInvalidItem;
43 ::ll::TypedStorage<8, 16, ::std::shared_ptr<bool>> mExistenceTracker;
44 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::CatalogCollection::CatalogCollectionListener>>
45 mEntitlementChangeListener;
46 ::ll::TypedStorage<8, 64, ::std::function<void(int)>> mAllItemsFoundCallback;
47 ::ll::TypedStorage<8, 8, int64> mSaleExpirationTime;
48 ::ll::TypedStorage<8, 24, ::std::vector<::gsl::not_null<::StoreCatalogItem*>>> mContents;
49 ::ll::TypedStorage<8, 64, ::std::unordered_set<::std::string>> mContentProductIds;
50 ::ll::TypedStorage<8, 64, ::std::function<bool(::StoreCatalogItem const&)>> mFilterOutIfTrue;
51 ::ll::TypedStorage<4, 4, int> mItemLimit;
52 ::ll::TypedStorage<8, 24, ::std::vector<::std::shared_ptr<::SearchQuery>>> mQueries;
53 ::ll::TypedStorage<8, 24, ::std::vector<::CatalogCollection::QueryContentInfo>> mContentCountPerQuery;
54 ::ll::TypedStorage<1, 1, bool> mFetchingItems;
55 ::ll::TypedStorage<1, 1, bool> mHasUpcomingSale;
56 ::ll::TypedStorage<1, 1, bool> mFilterOwnedToBack;
57 ::ll::TypedStorage<1, 1, bool> mFilterOutInvalidOffers;
58 ::ll::TypedStorage<1, 1, bool> mClientSortEnabled;
59 ::ll::TypedStorage<1, 1, bool> mTotalNumberOffersSent;
60 ::ll::TypedStorage<1, 1, bool> mSent;
61 ::ll::TypedStorage<1, 1, bool> mIsPromoRow;
62 ::ll::TypedStorage<1, 1, bool> mDirty;
63 ::ll::TypedStorage<1, 1, bool> mReady;
64 ::ll::TypedStorage<4, 4, int> mQueryIndex;
65 ::ll::TypedStorage<4, 4, int> mContentFetchLimit;
66 ::ll::TypedStorage<4, 4, int> mVisibleItemsPerPage;
67 ::ll::TypedStorage<4, 4, int> mFirstVisibleItemIndex;
68 ::ll::TypedStorage<8, 80, ::Bedrock::Threading::Mutex> mContentCheck;
69 // NOLINTEND
70
71public:
72 // prevent constructor by default
73 CatalogCollection& operator=(CatalogCollection const&);
74 CatalogCollection(CatalogCollection const&);
75 CatalogCollection();
76
77public:
78 // virtual functions
79 // NOLINTBEGIN
80 virtual ~CatalogCollection();
81
82 virtual void updateItems(::std::function<void()> noItemsCallback, ::std::function<void(int)> itemsFoundCallback);
83
84 virtual void setFilterOwnedToBack(bool const filterOwnedToBack);
85
86 virtual ::StoreCatalogItem& getItem(int itemIndex);
87
88 virtual ::StoreCatalogItem const& getItem(int itemIndex) const;
89
90 virtual void setItemLimit(uint itemLimit);
91
92 virtual void setAllItemsFoundCallback(::std::function<void(int)> itemsFoundCallback);
93 // NOLINTEND
94
95public:
96 // member functions
97 // NOLINTBEGIN
98 MCAPI CatalogCollection(
99 ::StoreCatalogRepository& storeCatalogRepo,
100 ::Bedrock::NotNullNonOwnerPtr<::IEntitlementManager> entMgr,
101 ::Bedrock::NotNullNonOwnerPtr<::ContentCatalogService> const& contentCatalogService,
102 ::std::vector<::std::shared_ptr<::SearchQuery>> const& queries,
103 int maxOffersVisible
104 );
105
106 MCAPI void
107 _addItemsFromQuery(::std::function<void()> noItemsCallback, ::std::function<void(int)> itemsFoundCallback);
108
109 MCAPI void _fetchItemImages(::gsl::not_null<::StoreCatalogItem*> item, bool isFirstOffer);
110
111 MCAPI void _filterOwnedToBack(::std::vector<::gsl::not_null<::StoreCatalogItem*>>& items) const;
112
113 MCAPI void _getTotalNumberOfOffers(::std::function<void(int)> itemsFoundCallback, int firstQueryPossibleCount);
114
115 MCAPI void _resetQueryContentCount();
116
117 MCAPI void _sortItems(::std::vector<::gsl::not_null<::StoreCatalogItem*>>& items, int index);
118
119 MCAPI ::StoreSearchQuery& getQuery();
120
121 MCAPI void setFilterOutIfTrue(::std::function<bool(::StoreCatalogItem const&)> filterFunction);
122
123 MCAPI void setQuery(::StoreSearchQuery const& query);
124
125 MCAPI void updateItemsFromQuery(
126 ::std::vector<::std::shared_ptr<::SearchQuery>> const& queries,
127 ::std::function<void()> noItemsCallback,
128 ::std::function<void(int)> itemsFoundCallback
129 );
130
131 MCAPI void updateItemsFromQuery(
132 ::StoreSearchQuery const& query,
133 ::std::function<void()> noItemsCallback,
134 ::std::function<void(int)> itemsFoundCallback
135 );
136 // NOLINTEND
137
138public:
139 // constructor thunks
140 // NOLINTBEGIN
141 MCAPI void* $ctor(
142 ::StoreCatalogRepository& storeCatalogRepo,
143 ::Bedrock::NotNullNonOwnerPtr<::IEntitlementManager> entMgr,
144 ::Bedrock::NotNullNonOwnerPtr<::ContentCatalogService> const& contentCatalogService,
145 ::std::vector<::std::shared_ptr<::SearchQuery>> const& queries,
146 int maxOffersVisible
147 );
148 // NOLINTEND
149
150public:
151 // destructor thunk
152 // NOLINTBEGIN
153 MCAPI void $dtor();
154 // NOLINTEND
155
156public:
157 // virtual function thunks
158 // NOLINTBEGIN
159 MCAPI void $updateItems(::std::function<void()> noItemsCallback, ::std::function<void(int)> itemsFoundCallback);
160
161 MCAPI void $setFilterOwnedToBack(bool const filterOwnedToBack);
162
163 MCFOLD ::StoreCatalogItem& $getItem(int itemIndex);
164
165 MCFOLD ::StoreCatalogItem const& $getItem(int itemIndex) const;
166
167 MCFOLD void $setItemLimit(uint itemLimit);
168
169 MCAPI void $setAllItemsFoundCallback(::std::function<void(int)> itemsFoundCallback);
170 // NOLINTEND
171
172public:
173 // vftables
174 // NOLINTBEGIN
175 MCNAPI static void** $vftable();
176 // NOLINTEND
177};
Definition CatalogCollection.h:5
static MCAPI void ** $vftable()
Definition CatalogCollection.h:14
Definition CatalogCollection.h:16
Definition ContentCatalogService.h:5
Definition SearchQuery.h:5