Url WindowsEnvFun::GetUserData(cstring org, cstring app) { if(!org && !app) { org = ApplicationData().organization_name.c_str(); app = ApplicationData().application_name.c_str(); } CString out; out = GetUserHome().internUrl; out = ConcatPath(out.c_str(), "AppData"); out = ConcatPath(out.c_str(), "Local"); out = ConcatPath(out.c_str(), org); out = ConcatPath(out.c_str(), app); out = str::replace::str(out, "\\", "/"); return MkUrl(out, RSCA::SystemFile); }
ApplicationData PeersManager::getApplicationInfo(u32 appid) { std::map<u32, ApplicationData>::iterator it = m_applications.find(appid); if(it != m_applications.end()) { return it->second; } // anonymous cacti::RecursiveMutex::ScopedLock sclock(m_applock); for(size_t i=0; i<m_anonymousApps.size(); ++i) { if(m_anonymousApps[i].m_appid == appid) { return m_anonymousApps[i]; } } return ApplicationData(); }