" to \n\t" << url);
// update the URL and kick off a new request
- m_owner->m_url = url;
+ m_owner->setUrl(url);
Downloader* dl = new Downloader(m_owner, url);
m_owner->root()->makeHTTPRequest(dl);
} else {
return m_url;
}
+void Catalog::setUrl(const std::string &url)
+{
+ m_url = url;
+ if (m_status == Delegate::FAIL_NOT_FOUND) {
+ m_status = Delegate::FAIL_UNKNOWN;
+ }
+}
+
std::string Catalog::name() const
{
return getLocalisedString(m_props, "name");
void Catalog::refreshComplete(Delegate::StatusCode aReason)
{
- changeStatus(aReason);
m_refreshRequest.reset();
+ changeStatus(aReason);
}
void Catalog::changeStatus(Delegate::StatusCode newStatus)
std::string url() const;
+ /**
+ * update the URL of a package. Does not trigger a refresh, but resets
+ * error state if the previous URL was not found.
+ */
+ void setUrl(const std::string& url);
+
std::string name() const;
std::string description() const;