uint8 UMcf::loadFromFile(const wchar_t* file) { gcString strFile(file); XML::gcXMLDocument doc(strFile.c_str()); if (!doc.IsValid()) return MCF_ERR_INVALIDHANDLE; parseUpdateXml(doc); if (m_pFileList.size() == 0) return MCF_ERR_FAILEDREAD; return MCF_OK; }
//Downloads update info from web void UMcfEx::getUpdateInfo(bool saveXml) { HttpHandle wc(PRIMUPDATE); wc->getWeb(); if (wc->getDataSize() == 0) { ::MessageBox(NULL, "Failed to get update data.\n\nDesura webserver might be down or you are not connected to the internet.", "Desura: ERROR", MB_OK); exit(-1); } XML::gcXMLDocument doc(wc->getData(), wc->getDataSize()); parseUpdateXml(doc); if (m_pFileList.size() == 0) { ::MessageBox(NULL, "Failed to get update files.\n\nEther Desura download server is down or the update xml feed is bad.", "Desura: ERROR", MB_OK); exit(-1); } if (saveXml) doc.SaveFile(UPDATEXML); }