3#include "mc/_HeaderOutputPredefine.h"
6#include "mc/deps/core/utility/NonOwnerPointer.h"
7#include "mc/platform/threading/Mutex.h"
12struct IEntitlementManager;
14struct StoreCatalogItem;
15struct StoreCatalogRepository;
16struct StoreSearchQuery;
32 using NoItemsFoundCallback = ::std::function<void()>;
34 using ItemsFoundCallback = ::std::function<void(
int)>;
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;
73 CatalogCollection& operator=(CatalogCollection
const&);
74 CatalogCollection(CatalogCollection
const&);
80 virtual ~CatalogCollection();
82 virtual void updateItems(::std::function<
void()> noItemsCallback, ::std::function<
void(
int)> itemsFoundCallback);
84 virtual void setFilterOwnedToBack(
bool const filterOwnedToBack);
86 virtual ::StoreCatalogItem& getItem(
int itemIndex);
88 virtual ::StoreCatalogItem
const& getItem(
int itemIndex)
const;
90 virtual void setItemLimit(uint itemLimit);
92 virtual void setAllItemsFoundCallback(::std::function<
void(
int)> itemsFoundCallback);
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,
107 _addItemsFromQuery(::std::function<
void()> noItemsCallback, ::std::function<
void(
int)> itemsFoundCallback);
109 MCAPI
void _fetchItemImages(::gsl::not_null<::StoreCatalogItem*> item,
bool isFirstOffer);
111 MCAPI
void _filterOwnedToBack(::std::vector<::gsl::not_null<::StoreCatalogItem*>>& items)
const;
113 MCAPI
void _getTotalNumberOfOffers(::std::function<
void(
int)> itemsFoundCallback,
int firstQueryPossibleCount);
115 MCAPI
void _resetQueryContentCount();
117 MCAPI
void _sortItems(::std::vector<::gsl::not_null<::StoreCatalogItem*>>& items,
int index);
119 MCAPI ::StoreSearchQuery& getQuery();
121 MCAPI
void setFilterOutIfTrue(::std::function<
bool(::StoreCatalogItem
const&)> filterFunction);
123 MCAPI
void setQuery(::StoreSearchQuery
const& query);
125 MCAPI
void updateItemsFromQuery(
126 ::std::vector<::std::shared_ptr<::SearchQuery>>
const& queries,
127 ::std::function<
void()> noItemsCallback,
128 ::std::function<
void(
int)> itemsFoundCallback
131 MCAPI
void updateItemsFromQuery(
132 ::StoreSearchQuery
const& query,
133 ::std::function<
void()> noItemsCallback,
134 ::std::function<
void(
int)> itemsFoundCallback
142 ::StoreCatalogRepository& storeCatalogRepo,
143 ::Bedrock::NotNullNonOwnerPtr<::IEntitlementManager> entMgr,
144 ::Bedrock::NotNullNonOwnerPtr<::ContentCatalogService>
const& contentCatalogService,
145 ::std::vector<::std::shared_ptr<::SearchQuery>>
const& queries,
159 MCAPI
void $updateItems(::std::function<
void()> noItemsCallback, ::std::function<
void(
int)> itemsFoundCallback);
161 MCAPI
void $setFilterOwnedToBack(
bool const filterOwnedToBack);
163 MCFOLD ::StoreCatalogItem& $getItem(
int itemIndex);
165 MCFOLD ::StoreCatalogItem
const& $getItem(
int itemIndex)
const;
167 MCFOLD
void $setItemLimit(uint itemLimit);
169 MCAPI
void $setAllItemsFoundCallback(::std::function<
void(
int)> itemsFoundCallback);
Definition CatalogCollection.h:5
static MCAPI void ** $vftable()
Definition CatalogCollection.h:14
Definition CatalogCollection.h:16
Definition ContentCatalogService.h:5
Definition SearchQuery.h:5