// Wan.h: interface for the CWan class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_WAN_H__35551513_1285_11D2_84F8_0040052F0B6E__INCLUDED_)
#define AFX_WAN_H__35551513_1285_11D2_84F8_0040052F0B6E__INCLUDED_

#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000

typedef struct tagWan
{
	int ext_baud;
	int wan_maxframe;
	int wan_interface;
	int wan_baud;
}WAN;

#include "line.h"
#include "WizPageComboBox.h"
#include "WizPageRadioButtons.h"
#include "WizLineSpeed.h"
#include "LineWanConfig.h"
class LINE_EXPORTED_CLASS CLineWan : public CLine
{
	DECLARE_DYNAMIC(CLineWan)
// operations
public:
	enum {WANINTERFACE,WANLINESPEED};
	CLineWan(HKEY const hKeyRoot, CString const strRegPath, CConfigObject const * const pParent);
	virtual ~CLineWan();
	virtual BOOL GetParameters(void);
	virtual BOOL SetParameters(void);
	virtual BOOL RemoveParameters(BOOL fRemoveKey = FALSE);
	virtual BOOL AddWizardPages(CConfigWizSheet * const pSheet);
	virtual BOOL NextWizardPage(int const nState);
    virtual BOOL RemoveWizardPages(CConfigWizSheet * const pSheet);
    virtual BOOL CopyParameters(CConfigObject const * const pFrom);
	virtual BOOL DoProperties(void);
	virtual CString GetInformationText(void);
	void SetAskWhichAbilites(int nVal){m_WanAbilities = nVal;}
	int GetAskWhichAbilities() const {return m_WanAbilities;}
	CPropertyPage* GetPropertyPage();
	BOOL RetrieveParameters();

private:
	BOOL ReadWriteWanParams(BOOL bRead);
	int GetBaudRate() const;
	void SetPageParams(CWanConfig*);
	void GetPageParams(CWanConfig*);
	BOOL AddWizClockingPage();
	BOOL AddWizLineSpeedPage();
//attributes
private:
	WAN m_WAN;	
	int m_WanAbilities;
	CWizLineSpeed* m_pwpLineSpeed;
	CWizPageComboBox* m_pwpElecInterface;
	CWizPageRadioButtons* m_pwpClocking;
	CWanConfig* m_pwpWanConfig;
    CConfigWizSheet * m_pwsSheet;

	enum
	{
		WP_INTERFACE,
		WP_CLOCKING,
		WP_LINESPEED,
	};

	BOOL m_bExternal;
};

#endif // !defined(AFX_WAN_H__35551513_1285_11D2_84F8_0040052F0B6E__INCLUDED_)
