ncm: Add IntegratedContent*Impl
This commit is contained in:
@@ -27,7 +27,7 @@ namespace ams::ncm {
|
||||
using ListType = ncm::IntegratedList<ncm::IContentMetaDatabase, 2>;
|
||||
using DataType = ListType::ListData;
|
||||
private:
|
||||
os::SdkMutex m_mutex;
|
||||
os::SdkRecursiveMutex m_mutex;
|
||||
ListType m_list;
|
||||
bool m_disabled;
|
||||
public:
|
||||
|
||||
@@ -27,7 +27,7 @@ namespace ams::ncm {
|
||||
using ListType = ncm::IntegratedList<ncm::IContentStorage, 2>;
|
||||
using DataType = ListType::ListData;
|
||||
private:
|
||||
os::SdkMutex m_mutex;
|
||||
os::SdkRecursiveMutex m_mutex;
|
||||
ListType m_list;
|
||||
bool m_disabled;
|
||||
public:
|
||||
|
||||
@@ -77,6 +77,15 @@ namespace ams::ncm {
|
||||
|
||||
R_RETURN(result);
|
||||
}
|
||||
|
||||
Result ForAll(auto callback) {
|
||||
for (size_t i = 0; i < m_count; ++i) {
|
||||
R_TRY(callback(this->Get(i)));
|
||||
}
|
||||
R_SUCCEED();
|
||||
}
|
||||
|
||||
size_t GetCount() const { return m_count; }
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user