void rss_parser::retrieve_uri(const std::string& uri) { /* * - http:// and https:// URLs are downloaded and parsed regularly * - exec: URLs are executed and their output is parsed * - filter: URLs are downloaded, executed, and their output is parsed * - query: URLs are ignored */ if (is_ttrss) { const char * uri = my_uri.c_str(); const char * pound = strrchr(uri, '#'); if (pound != NULL) { fetch_ttrss(pound+1); } } else if (uri.substr(0,5) == "http:" || uri.substr(0,6) == "https:") { download_http(uri); } else if (uri.substr(0,5) == "exec:") { get_execplugin(uri.substr(5,uri.length()-5)); } else if (uri.substr(0,7) == "filter:") { std::string filter, url; utils::extract_filter(uri, filter, url); download_filterplugin(filter, url); } else if (my_uri.substr(0,6) == "query:") { skip_parsing = true; } else if (my_uri.substr(0,7) == "file://") { parse_file(my_uri.substr(7, my_uri.length()-7)); } else throw utils::strprintf(_("Error: unsupported URL: %s"), my_uri.c_str()); }
void * WTConnection::download(uint64_t *length) { if(strcmp("http", this->protocol) == 0 || strcmp("https", this->protocol) == 0) { return download_http(length); } else { last_error = "Unimplemented upload for selected protocol"; delegate_status(WTHTTP_Error); return NULL; }; }