// WiFiDirectDlg.h : header file
//

#pragma once

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

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

using namespace wclWiFi;

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

// Dialog Data
	enum { IDD = IDD_WIFIDIRECT_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 cbDiscoverability;
	CComboBox cbPairingProcedure;
	CButton cbAutonomousGroupOwner;
	CEdit edGroupOwnerIntent;
	CButton cbDisplayPin;
	CButton cbProvidePin;
	CButton cbPushButton;
	CListCtrl lvDevices;
	CListBox lbLog;

	CwclWiFiDirectAdvertiser wclWiFiDirectAdvertiser;
	
	void wclWiFiDirectAdvertiserStarted(void* Sender);
	void wclWiFiDirectAdvertiserStopped(void* Sender);
	void wclWiFiDirectAdvertiserAcceptDevice(void* Sender,
		CwclWiFiDirectDevice* const Device, bool& Accept);
	void wclWiFiDirectAdvertiserDeviceConnected(void* Sender,
		CwclWiFiDirectDevice* const Device, const int Error);
	void wclWiFiDirectAdvertiserDeviceDisconnected(void* Sender,
		CwclWiFiDirectDevice* const Device, const int Reason);
	void wclWiFiDirectAdvertiserPairCompleted(void* Sender,
		CwclWiFiDirectDevice* const Device, const int Result);
	void wclWiFiDirectAdvertiserPairConfirm(void* Sender,
		CwclWiFiDirectDevice* const Device, bool& Confirm);
	void wclWiFiDirectAdvertiserPairDisplayPin(void* Sender,
		CwclWiFiDirectDevice* const Device, const tstring& Pin);
	void wclWiFiDirectAdvertiserPairGetParams(void* Sender,
		CwclWiFiDirectDevice* const Device, short& GroupOwnerIntent,
		wclWiFiDirectConfigurationMethods& ConfigurationMethods,
		wclWiFiDirectPairingProcedure& PairingProcedure);
	void wclWiFiDirectAdvertiserPairProvidePin(void* Sender,
		CwclWiFiDirectDevice* const Device, tstring& Pin);

	int GetItem(const tstring& Id);

public:
	afx_msg void OnDestroy();
	afx_msg void OnBnClickedButton4();
	afx_msg void OnBnClickedButton3();
	afx_msg void OnBnClickedButton1();
	afx_msg void OnBnClickedButton2();
};
