// Get a list of the user-parts of all resource lists. void ResourceListSet::getAllResourceLists(UtlSList& list) { Os::Logger::instance().log(FAC_RLS, PRI_DEBUG, "ResourceListSet::getAllResourceLists this = %p", this); // Serialize access to the ResourceListSet. OsLock lock(mSemaphore); // Iterate through the resource lists. UtlSListIterator resourceListItor(mResourceLists); ResourceList* resourceList; while ((resourceList = dynamic_cast <ResourceList*> (resourceListItor()))) { list.append(new UtlString(*resourceList->getUserPart())); } }
// Search for a resource list with a given name (user-part). ResourceList* ResourceListSet::findResourceList(const char* user) { ResourceList* ret = 0; // Iterate through the resource lists. UtlSListIterator resourceListItor(mResourceLists); ResourceList* resourceList; while (!ret && (resourceList = dynamic_cast <ResourceList*> (resourceListItor()))) { if (resourceList->getUserPart()->compareTo(user) == 0) { ret = resourceList; } } return ret; }