//---------------------------------------------------------------------------

#ifndef mainH
#define mainH
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include "wclAudio.hpp"
#include <ComCtrls.hpp>
//---------------------------------------------------------------------------
class TfmMain : public TForm
{
__published:	// IDE-managed Components
        TLabel *laRole;
        TListView *lvDevices;
        TButton *btEnum;
        TCheckBox *cbActive;
        TCheckBox *cbDisabled;
        TCheckBox *cbNotPresent;
        TCheckBox *cbUnplugged;
        TComboBox *cbRole;
        TButton *btDefault;
        TButton *btClear;
        TListBox *lbLog;
        TwclAudioSwitcher *wclAudioSwitcher;
        TButton *btRefresh;
        TButton *btConnect;
        TButton *btDisconnect;
        TCheckBox *cbUseMac;
        TLabel *laFlow;
        TComboBox *cbFlow;
        TButton *btGetDefault;
        void __fastcall FormDestroy(TObject *Sender);
        void __fastcall btEnumClick(TObject *Sender);
        void __fastcall btDefaultClick(TObject *Sender);
        void __fastcall wclAudioSwitcherOpened(TObject *Sender);
        void __fastcall wclAudioSwitcherClosed(TObject *Sender);
        void __fastcall btClearClick(TObject *Sender);
        void __fastcall wclAudioSwitcherDefaultDeviceChanged(
          TObject *Sender, const String Id,
          const TwclAudioDeviceDataFlow Flow,
          const TwclAudioDeviceRole Role);
        void __fastcall wclAudioSwitcherDeviceAdded(TObject *Sender,
          const String Id);
        void __fastcall wclAudioSwitcherDeviceRemoved(TObject *Sender,
          const String Id);
        void __fastcall wclAudioSwitcherStateChanged(TObject *Sender,
          const String Id, const TwclAudioDeviceState State);
        void __fastcall btRefreshClick(TObject *Sender);
        void __fastcall btConnectClick(TObject *Sender);
        void __fastcall btDisconnectClick(TObject *Sender);
        void __fastcall FormCreate(TObject *Sender);
        void __fastcall btGetDefaultClick(TObject *Sender);
private:	// User declarations
        void EnumDevices();
        void UpdateDevice(TListItem* Item, const TwclAudioDevice& Device);
public:		// User declarations
        __fastcall TfmMain(TComponent* Owner);
};
//---------------------------------------------------------------------------
extern PACKAGE TfmMain *fmMain;
//---------------------------------------------------------------------------
#endif
