// AudioReceiverDlg.h : header file
//

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

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

using namespace wclCommon;
using namespace wclAudio;

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

// Dialog Data
	enum { IDD = IDD_AUDIORECEIVER_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:
	CListBox lbLog;
	CListCtrl lvDevices;

	CwclBluetoothAudioWatcher* AudioWatcher;
	CwclBluetoothAudioReceiver* AudioReceiver;

	void AudioWatcherDeviceAdded(void* Sender, const tstring& Id,
		const tstring& Name);
	void AudioWatcherDeviceRemoved(void* Sender, const tstring& Id);
	void AudioWatcherStarted(void* Sender);
	void AudioWatcherStopped(void* Sender);

	void AudioReceiverClosed(void* Sender);
    void AudioReceiverListen(void* Sender);
    void AudioReceiverConnected(void* Sender);
    void AudioReceiverDisconnected(void* Sender);

public:
	afx_msg void OnBnClickedButtonClear();
	afx_msg void OnBnClickedButtonStart();
	afx_msg void OnBnClickedButtonStop();
	afx_msg void OnDestroy();
	afx_msg void OnBnClickedButtonOpen();
	afx_msg void OnBnClickedButtonClose();
	afx_msg void OnBnClickedButtonConnect();
};
