#ifndef HTTP_URL_H
#define HTTP_URL_H

	#define HTTP_PROTOCOL     "http"
	#define DEFAULT_HTTP_PORT 80
	#define MAX_DOMAIN_LENGTH 256
	#define MAX_FILE_LENGTH   256

	typedef struct
	{
		char domain[MAX_DOMAIN_LENGTH];
		char file[MAX_FILE_LENGTH];
		int port;
	} HttpUrl;

	/**
	 * build an URL object out of the 
	 * URLs string representation src_url
	 * returns 0 if everything went fine
	 * < 0 otherwise...
	 */
	int buildHttpUrl(HttpUrl *url, char *src_url);

#endif

