// AudioSwitcherDlg.h : header file
//

#pragma once
#include "afxwin.h"
#include "afxcmn.h"

#include "..\..\..\..\Source\Bluetooth\wclAudio.h"

using namespace wclCommon;
using namespace wclAudio;


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

// Dialog Data
	enum { IDD = IDD_AUDIOSWITCHER_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 cbRole;
	CButton cbActive;
	CButton cbDisabled;
	CButton cbUnplugged;
	CButton cbNotPresent;
	CButton cbUseMac;
	CListCtrl lvDevices;
	CListBox lbLog;

	CwclAudioSwitcher Switcher;

	void EnumDevices();
	void UpdateDevice(int Item, const wclAudioDevice& Device);

	void SwitcherOpened(void* Sender);
	void SwitcherClosed(void* Sender);
	void SwitcherDefaultDeviceChanged(void* Sender, const tstring& Id,
		const wclAudioDeviceDataFlow Flow, const wclAudioDeviceRole Role);
	void SwitcherDeviceAdded(void* Sender, const tstring& Id);
	void SwitcherDeviceRemoved(void* Sender, const tstring& Id);
	void SwitcherStateChanged(void* Sender, const tstring& Id,
		const wclAudioDeviceState State);

public:
	afx_msg void OnDestroy();
	afx_msg void OnBnClickedButtonEnum();
	afx_msg void OnBnClickedButtonDefault();
	afx_msg void OnBnClickedButtonClear();
	afx_msg void OnBnClickedButtonRefresh();
	afx_msg void OnBnClickedButtonConnect();
	afx_msg void OnBnClickedButtonDisconnect();
private:
	CComboBox cbFlow;
public:
	afx_msg void OnBnClickedButtonGetDefault();
};
