Exemple #1
0
// appends a string to an URL, making it another URL
// subdirs '.' and ".." can be recognized and interpreted
// This function parses the URL at the same time
// returns 0 on error, or the new URL
char *Util::append(const char* URL, const char *string, bool interpretDirs)
{
	// first have a correct URL
	parse(URL, interpretDirs);
	// Correct URL reconstruction in the return variable
	newstrcpy(appendValue,	buildURL(user(),password(),workgroup(),host(),share(),path(),ip()));
	// append the string
	newstrappend(appendValue, "/", string);
	// reparse for a correct URL and interpreting the directories
	parse(appendValue, interpretDirs);
	// Final reconstruction
	newstrcpy(appendValue,	buildURL(user(),password(),workgroup(),host(),share(),path(),ip()));
	return appendValue;
}
Exemple #2
0
QString CollectMETAR::getMetarDataFromServer(QString station)
{
    if(!buildURL(station))
    {
        qDebug() << "Error bad station";
        return "";
    }


    //1. get data
    //2. only save the line that mentions the station name!


    return "";
}