#pragma once

#include "IBaseCurl.h"

#include "event.h"



class CManageNetWork
{
public:
	CManageNetWork();
	~CManageNetWork();

	void init();

	void Login(LPCSTR username, LPCSTR password);

	void SetUrl(LPCSTR url);

	SStringA GetUsername();
	SStringA GetPassWord();
	
	void DonloadConfg();

private:
	void ThreadFun_login(LPARAM lParam);
	void ThreadFun_Dowlon_Config(LPARAM lParam);
	void LoadFileToData();

	void DataToFile();

private:
	SStringA m_username;
	SStringA m_password;
	IBaseCurl* m_base_curl;
	AsynTaskHandle<LPARAM>	m_Asyntask;
};

