void FSData::processReleases(const LLSD& releases) { processReleasesLLSD(releases); // save the download to a file const std::string releases_filename = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "releases.xml"); saveLLSD(releases, releases_filename); }
void FSData::processAgents(const LLSD& agents) { processAgentsLLSD(agents); // save the download to a file const std::string agents_filename = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "agents.xml"); saveLLSD(agents, agents_filename); }
void FSData::processClientTags(const LLSD& tags) { if(tags.has("isComplete")) { LegacyClientList = tags; // save the download to a file const std::string tags_filename = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, "client_list_v2.xml"); saveLLSD(tags, tags_filename); } }
void FSData::processResponder(const LLSD& content, const std::string& url, bool save_to_file, const LLDate& last_modified) { if (url == mFSDataURL) { if (!save_to_file) { LLSD data; LL_DEBUGS("fsdata") << "Loading fsdata.xml from " << mFSdataFilename << LL_ENDL; if (loadFromFile(data, mFSdataFilename)) { processData(data); } else { LL_WARNS("fsdata") << "Unable to download or load fsdata.xml" << LL_ENDL; } } else { processData(content); saveLLSD(content , mFSdataFilename, last_modified); } mFSDataDone = true; } else if (url == mAssetsURL) { if (!save_to_file) { LLSD data; LL_DEBUGS("fsdata") << "Loading assets.xml from " << mAssestsFilename << LL_ENDL; if (loadFromFile(data, mAssestsFilename)) { processAssets(data); } else { LL_WARNS("fsdata") << "Unable to download or load assets.xml" << LL_ENDL; } } else { processAssets(content); saveLLSD(content , mAssestsFilename, last_modified); } } else if (url == mAgentsURL) { if (!save_to_file) { LLSD data; LL_DEBUGS("fsdata") << "Loading agents.xml from " << mAgentsFilename << LL_ENDL; if (loadFromFile(data, mAgentsFilename)) { processAgents(data); } else { LL_WARNS("fsdata") << "Unable to download or load agents.xml" << LL_ENDL; } } else { processAgents(content); saveLLSD(content , mAgentsFilename, last_modified); } mAgentsDone = true; addAgents(); } else if (url == LEGACY_CLIENT_LIST_URL) { if (!save_to_file) { updateClientTagsLocal(); } else { processClientTags(content); saveLLSD(content , mClientTagsFilename, last_modified); } } else if (url == mFSdataDefaultsUrl) { if (!save_to_file) { // do nothing as this file is loaded during app startup. } else { saveLLSD(content , mFSdataDefaultsFilename, last_modified); } } }