ncm: Add IntegratedContent*Impl
This commit is contained in:
1 parent
668cabd4a2
commit
f7915c2c05
5 files changed
+793
-2
No files matched your search
+1
-1
@@ -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:
|
||||
|
||||
+1
-1
@@ -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