/* Generated by Together */

#ifndef _AG_INTERNETSESSION_H_
#define _AG_INTERNETSESSION_H_

#include <boost/shared_ptr.hpp>
#include "InternetHandle.h"

namespace OnlineActivation
{
class HttpConnection;
/**
 * Internet session.
 * Session is a root object for all Internet classes. 
 */
class InternetSession
{
public:

	/**
	 * Constructs InternetSession object.
	 */
	InternetSession
	(
		const char* szAgent, 
		DWORD dwAccessType, 
		const char* szProxyName, 
		const char* szProxyBypass 
	);

	/**
	 * Creates InternetConnection object. 
	 */
	boost::shared_ptr<HttpConnection> CreateConnection
	(
		const char* szServerName,
		INTERNET_PORT nServerPort
	);

private:
	/**
	 * InternetSession handle. 
	 */
	InternetHandle m_hSession;

	/** @link dependency 
	 * @stereotype instantiate*/
	/*# HttpConnection lnkInternetConnection; */
};

} // namespace OnlineActivation

#endif //_AG_INTERNETSESSION_H_
