/*****************************************************************************
* Copyright (c) 2000 Digi International Inc., All Rights Reserved
* 
* This software contains proprietary and confidential information of Digi
* International Inc.  By accepting transfer of this copy, Recipient agrees
* to retain this software in confidence, to prevent disclosure to others, 
* and to make no use of this software other than that for which it was
* delivered.  This is an unpublished copyrighted work of Digi International
* Inc.  Except as permitted by federal law, 17 USC 117, copying is strictly
* prohibited.
* 
* Restricted Rights Legend
*
* Use, duplication, or disclosure by the Government is subject to
* restrictions set forth in sub-paragraph (c)(1)(ii) of The Rights in
* Technical Data and Computer Software clause at DFARS 252.227-7031 or
* subparagraphs (c)(1) and (2) of the Commercial Computer Software -
* Restricted Rights at 48 CFR 52.227-19, as applicable.
*
* Digi International Inc. 11001 Bren Road East, Minnetonka, MN 55343
*
*****************************************************************************/

// CustomApp.h : main header file for the CUSTOMAPP application
//

#if !defined(AFX_CUSTOMAPP_H__1423DAFC_DEDF_4CB6_910E_3539D112476C__INCLUDED_)
#define AFX_CUSTOMAPP_H__1423DAFC_DEDF_4CB6_910E_3539D112476C__INCLUDED_

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

#ifndef __AFXWIN_H__
	#error include 'stdafx.h' before including this file for PCH
#endif

#include "resource.h"		// main symbols
#include "UpdateInfo.h"
#include "PropPageWelcome.h"
#include "PropPageOldDriver.h"
#include "PropPageDevMgrRunning.h"
#include "PropPageUpdateAdapter.h"
#include "PropPageUpdateDriver.h"
#include "PropPageFinished.h"

/////////////////////////////////////////////////////////////////////////////
// CCustomAppApp:
// See CustomApp.cpp for the implementation of this class
//

class CCustomAppApp : public CWinApp
{
public:
	CCustomAppApp();

   BOOL GetUpdatedAdapter(void) {return m_fUpdatedAdapter;}
   void SetUpdatedAdapter(BOOL f) {m_fUpdatedAdapter = f;}
   BOOL GetUpdatedDriver(void) {return m_fUpdatedDriver;}
   void SetUpdatedDriver(BOOL f) {m_fUpdatedDriver = f;}

   // Abstract these methods in their own class, this will allow us to be
   // flexible in defining the way we determine the list of adapter PCI IDs,
   // driver set and INFs to process.
   DWORD UpdateExistingAdapters(void) {return m_UpdateInfo.UpdateExistingAdapters();}
   BOOL  UpdateDriverVersion(void) {return m_UpdateInfo.UpdateDriverVersion();}

   BOOL  MoveInfFiles(void) {return m_UpdateInfo.MoveInfFiles();}
   DWORD CopyDistributionFiles(CString & DestinationDir) {return m_UpdateInfo.CopyDistributionFiles(DestinationDir);}
   BOOL  DevMgrRunning(void) {return m_UpdateInfo.DevMgrRunning();}
   BOOL  ExistingDriverNewer(void) {return m_UpdateInfo.ExistingDriverNewer();}
   DWORD GetExistingDriverMajor(void) {return m_UpdateInfo.GetExistingDriverMajor();}
   DWORD GetExistingDriverMinor(void) {return m_UpdateInfo.GetExistingDriverMinor();}
   DWORD GetExistingDriverBuildNumber(void) {return m_UpdateInfo.GetExistingDriverBuildNumber();}
   BOOL  InstallPamA(void) {return m_UpdateInfo.InstallPamA();}

private:
   BOOL m_fUpdatedAdapter;
   BOOL m_fUpdatedDriver;
   CUpdateInfo m_UpdateInfo;

public:
   DWORD GetPropPageWelcomeIdent(void) { return CPropPageFinished::IDD; }
   DWORD GetPropPageOldDriverIdent(void) { return CPropPageOldDriver::IDD; }
   DWORD GetPropPageDevMgrRunningIdent(void) { return CPropPageDevMgrRunning::IDD; }
   DWORD GetPropPageUpdateAdapterIdent(void) { return CPropPageUpdateAdapter::IDD; }
   DWORD GetPropPageUpdateDriverIdent(void) { return CPropPageUpdateDriver::IDD; }
   DWORD GetPropPageFinishedIdent(void) { return CPropPageFinished::IDD; }

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CCustomAppApp)
	public:
	virtual BOOL InitInstance();
	//}}AFX_VIRTUAL

// Implementation

	//{{AFX_MSG(CCustomAppApp)
		// NOTE - the ClassWizard will add and remove member functions here.
		//    DO NOT EDIT what you see in these blocks of generated code !
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()

};


/////////////////////////////////////////////////////////////////////////////

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

#endif // !defined(AFX_CUSTOMAPP_H__1423DAFC_DEDF_4CB6_910E_3539D112476C__INCLUDED_)
