// UCBioBSP_EnrollDlg.h : header file
//

#if !defined(AFX_UCBIOBSP_ENROLLDLG_H__81EFFCCC_41FA_4A60_82D1_ECA1D9B09E77__INCLUDED_)
#define AFX_UCBIOBSP_ENROLLDLG_H__81EFFCCC_41FA_4A60_82D1_ECA1D9B09E77__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "../../../../Inc/UCBioAPI.h"

/////////////////////////////////////////////////////////////////////////////
// CUCBioBSP_EnrollDlg dialog

class CUCBioBSP_EnrollDlg : public CDialog
{
// Construction
public:
	CString m_strInitDir;
	UCBioAPI_HANDLE				m_hUCBioAPI;
	UCBioAPI_UINT32				m_nNumDevice;
	UCBioAPI_DEVICE_ID*			m_pDeviceID;
	UCBioAPI_DEVICE_INFO_EX*	m_pDeviceInfoEx;
	UCBioAPI_DEVICE_ID			m_nLastOpenedDeviceID;
	UCBioAPI_FIR_HANDLE			m_hEnrolledFIR, m_hCapturedFIR;
	HINSTANCE					m_hWSQ_library;
	UCBioAPI_FIR_HANDLE			m_hAuditData;
	void EnumDeviceList();

	//WSQ Library
	void Unlock_WSQ_Libary();
	typedef int (*SaveBMPToFile)(HBITMAP hBitmap, const char *filename, int filetype);
	typedef int (*SetShowFilePropertiesDialog)(int file_properties_dialog);
	typedef int (*UnlockWSQLibrary)(char* authorization_code);
	typedef char* (*GenerateSerialNumber)();
	typedef void (*WriteWSQ_bitrate)(double bitrate);
	typedef double (*ReadWSQ_bitrate)();
	typedef int (*WSQ_encode_stream)(unsigned char *input_data_stream, const int width, const int height, const double bitrate,
				   const int ppi, char *comment_text, unsigned char **output_data_stream, int *output_stream_length);

	SaveBMPToFile	pSaveBMPToFile;
	SetShowFilePropertiesDialog pSetShowFilePropertiesDialog;
	UnlockWSQLibrary pUnlockWSQLibrary;
	GenerateSerialNumber pGenerateSerialNumber;   
	WriteWSQ_bitrate	pWriteWSQ_bitrate;
	ReadWSQ_bitrate	pReadWSQ_bitrate;
	WSQ_encode_stream pEncodeStream;
	
public:
	CUCBioBSP_EnrollDlg(CWnd* pParent = NULL);	// standard constructor

// Dialog Data
	//{{AFX_DATA(CUCBioBSP_EnrollDlg)
	enum { IDD = IDD_UCBIOBSP_ENROLL_DIALOG };
	CComboBox	m_cbLiveDetectLevel;
	CComboBox	m_cbType;
	CComboBox	m_cbFormat;
	CComboBox	m_comboDeviceList;
	CString	m_strSaveDir;
	CString	m_szPayload;
	CString	m_striLevel;
	CString	m_strrLevel;
	BOOL	m_ckOverwrite;
	CString	m_strBitrate;
	BOOL	m_chkWSQ;
	BOOL	m_chkUCT;
	BOOL	m_chkRAW;
	CString	m_strFormat;
	CString	m_strType;
	//}}AFX_DATA

	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CUCBioBSP_EnrollDlg)
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support
	//}}AFX_VIRTUAL

// Implementation
protected:
	HICON m_hIcon;

	// Generated message map functions
	//{{AFX_MSG(CUCBioBSP_EnrollDlg)
	virtual BOOL OnInitDialog();
	afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	afx_msg void OnBtSearch();
	afx_msg void OnSelchangeCbDeviceList();
	afx_msg void OnBtEnroll();
	afx_msg void OnBtIdentify();
	afx_msg void OnBtApply();
	afx_msg void OnSelchangeCbTermplateformat();
	afx_msg void OnDestroy();
	afx_msg void OnSelchangeCbTermplatetype();
	afx_msg void OnSelchangeCbIlevel();
	afx_msg void OnSelchangeCbRlevel();
	afx_msg void OnSelchangeCbLivedetectlevel();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_UCBIOBSP_ENROLLDLG_H__81EFFCCC_41FA_4A60_82D1_ECA1D9B09E77__INCLUDED_)
