#pragma once

#include "CUserInfo.h"

enum PROXY_MODE {

	sys_mode = 0,
	tun_mode,

};


enum ROUT_MODE {

	cn_mode = 0,
	qg_mode,

};

struct SysMode {
	int id;
	PROXY_MODE proxy_mode;
	SStringW  name;
};

struct RouteMode {
	int id;
	ROUT_MODE route_mode;
	SStringW  name;
};
class CApp : public SSingleton<CApp>
{
public:
	CApp();
	~CApp();

	void Init();

	void UnInit();


	bool DataToUserInfo(std::string data);


	CUserInfo* GetUserinfo();

	void SetOut(int out);

	int GetOut();

	void SetSysMode(PROXY_MODE mode);

	PROXY_MODE GetSysMode();

	void SetRouteMode(ROUT_MODE mode);

	ROUT_MODE GetRouteMode();

private:
	int m_is_out;

	CUserInfo*   m_userinfo;
	PROXY_MODE m_proxy_mode;
	ROUT_MODE  m_route_mode;
};

