Newer
Older
Import / research / ui / TweakableProperties / toolkit / include / Url.h
@John John on 29 Dec 2020 614 bytes bulk import from macbookpro checkouts
#ifndef URL_H
#define URL_H


#include "Utils.h"


#include "Namespace.h"
BEGIN_NAMESPACE


enum Protocol
{
	P_HTTP,
	P_HTTPS,
	P_FTP,
	P_POP3,
	P_IMAP
};


class Url
{
public:
	Url();
	Url(const String& a_url);
	~Url();

	Protocol protocol() const;
	String hostName() const;
	String userName() const;
	String password() const;
	int port() const;
	String path() const;

private:
	void crackUrl();
	String m_urlStr;
	String m_hostName;
	String m_userName;
	String m_password;
	String m_path;
	int m_port;
	Protocol m_protocol;
};


END_NAMESPACE


#endif // URL_H