#if !defined(__alffcertdlg_h) // Sentry, use file only if it's not already included.
#define __alffcertdlg_h
/*  Project Biblio-Tec

	 SUBSYSTEM:    TECSecurity.dll Library
	 FILE:         alffcertdlg.h
	 AUTHOR:       Alcindo Ferreira Filho

	 OVERVIEW:
	 Source file for definition of ALFFCertificateDlg.
	 The dialog that shows up the X509 Certificate.

    COPYRIGHT:    © 2003,2005
                  Alcindo Ferreira Filho
                  <alcindo@inttec.com.br>

    LICENSE:      Biblio-Tec license (BiblTec.txt)
*/


#include <owl\edit.h>       // OWL TEdit Definitions
#include <owl\listbox.h>    // OWL TListBox Definitions
#include <owl\combobox.h>   // OWL TComboBox Definitions
#include <owl\treewind.h>   // OWL TTreeWind Definitions
#include <owl\button.h>     // OWL TButton Definitions
#include <owl/colmnhdr.h>   // OWL TColumnHeader Definitions

#include "tecsecall.h"

#include "alffhelp.h"        // ALFFHelp Class (wrapper for HTMLHelp)

#include <classlib\date.h>

#include <owl/notetab.h>   // TNoteTab definition

//{{ALFFDialog = ALFFCertificateDlg}}
class _TECSECCLASS ALFFCertificateDlg : public ALFFDialog
{
 public:
  ALFFCertificateDlg(TWindow* parent,
  							ALFFUseSecurity* pSec,
                     ALFFDate::DateFormat fmt,
  							const char* title = NULL,
  							ALFFSSLComm* sslComm = NULL,
                     ALFFX509Certificate*  cert = NULL,
                     TPoint dlgTopLeft = NULL,
                     TResId idDlg=IDD_ALFFNETCERTIFICATE);
  ~ALFFCertificateDlg();
  char far* GetClassName() {return "ALFFCertificateDlg";}

 protected:
	 void 		SetupWindow();
	 void       CmOk();
	 void       CmHelp();
	 LRESULT    EvCommand(uint controlId, HWND , uint notifyCode);

    /* Extensions Presentation Controls */
    int*       tabCertDetail;
    int        numDetails;
    int*       tabCertDetailExtPos;

	 TWindow*   				certDlgParent;
    ALFFUseSecurity*       pSecurity;
	 ALFFMsgs*  				pMsgs;
	 TNoteTab*  				certTabCntrl;
    ALFFSSLComm*       		sslLineComm;
    ALFFX509Certificate* 	server_cert;
    ALFFUtil*            	pUtil;
    ALFFHelp*              helpFile;
    ALFFDate::DateFormat   dateFormat;
    
    // Dialog Controls
    TEdit*       infoBas;
    TListBox*    certDetail;
    TEdit*       certDetExt;
    TFont*		  certDetExtFont;
    HFONT        hFontExt;
    TFont*       certDetFont;
    HFONT        hFont;
    TTreeWindow* certTreePath;
    TTreeNode*   certTreeRootNode;
    TEdit*       certStatus;
    TButton*     certShow;

    // Event handlers
    //
    void      TabSelChange(TNotify far&);
    void      EvCertTreePath(TTwNotify& nmHdr);
  DECLARE_RESPONSE_TABLE(ALFFCertificateDlg);
};
#endif
