// NetworkListManagerDlg.h : header file
//

#pragma once

#include "afxwin.h"
#include "afxcmn.h"

#include "..\..\..\..\Source\WiFi\wclNlm.h"

using namespace wclWiFi;

// CNetworkListManagerDlg dialog
class CNetworkListManagerDlg : public CDialog
{
// Construction
public:
	CNetworkListManagerDlg(CWnd* pParent = NULL);	// standard constructor

// Dialog Data
	enum { IDD = IDD_NETWORKLISTMANAGER_DIALOG };

	protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support


// Implementation
protected:
	HICON m_hIcon;

	// Generated message map functions
	virtual BOOL OnInitDialog();
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	DECLARE_MESSAGE_MAP()

private:
	CComboBox cbNetworkType;
	CListCtrl lvNetworks;
	CEdit edNewNameOrDescription;
	CComboBox cbCategory;
	CListCtrl lvConnections;
	CListBox lbEvents;

	CwclNetworkListManager FManager;

	void ShowConnections(wclNlmConnections& Connections);

	void AfterOpen(void* Sender);
	void BeforeClose(void* Sender);
	void ConnectivityChanged(void* Sender, const wclNlmConnectivityFlags& Connectivity);
	void NetworkAdded(void* Sender, const GUID& NetworkId);
	void NetworkConnectivityChanged(void* Sender, const GUID& NetworkId, 
		const wclNlmConnectivityFlags& Connectivity);
	void NetworkDeleted(void* Sender, const GUID& NetworkId);
	void NetworkPropertyChanged(void* Sender, const GUID& NetworkId, 
		const wclNlmNetworkPropertyChangeFlags& Change);
	void ConnectionConnectivityChanged(void* Sender, const GUID& ConnectionId, 
		const wclNlmConnectivityFlags& Connectivity);
	void ConnectionPropertyChanged(void* Sender, const GUID& ConnectionId, 
		const wclNlmConnectionProperty Prop);

public:
	afx_msg void OnBnClickedButtonClear();
	afx_msg void OnBnClickedButtonOpen();
	afx_msg void OnBnClickedButtonClose();
	afx_msg void OnBnClickedButtonIsConnected();
	afx_msg void OnBnClickedButtonIsInternet();
	afx_msg void OnBnClickedButtonConnectivity();
	afx_msg void OnBnClickedButtonEnumNetworks();
	afx_msg void OnBnClickedButtonRefresh();
	afx_msg void OnBnClickedButtonSetName();
	afx_msg void OnBnClickedButtonSetDescription();
	afx_msg void OnBnClickedButtonSetCategory();
	afx_msg void OnBnClickedButtonGetMachineConnections();
	afx_msg void OnBnClickedButtonGetNetworkConnections();
	afx_msg void OnDestroy();
	afx_msg void OnBnClickedButtonDelete();
};
