/*****************************************************************************
* Copyright (c) 1990-98 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
*
*****************************************************************************/


// DigiFWrk.h: 
//
//////////////////////////////////////////////////////////////////////

#if !defined(DIGIFWRK_H)
#define DIGIFWRK_H

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


#if defined(FW_EXPORT)
   #define FW_EXPORTED_CLASS     AFX_CLASS_EXPORT
   #define FW_EXPORTED_API       AFX_API_EXPORT
#else
   #define FW_EXPORTED_CLASS     AFX_CLASS_IMPORT
   #define FW_EXPORTED_API       AFX_API_IMPORT
#endif


extern void FW_EXPORTED_API AttachToFrameWork(void);


#if defined (FW_INTERNAL)
extern HINSTANCE g_hInstance;
#endif


// Friendly header files:
//
//////////////////////////////////////////////////////////////////////

#if!defined(NO_REGHELPERS)
#include "RegHelpers.h"
#endif

#if !defined(NO_AFFIRMEXCEPTIONS)
#include "AffirmException.h"
#endif

#if !defined(NO_CONFIGEXCEPTIONS)
#include "ConfigException.h"
#endif

#if !defined(NO_CONFIGWIZS)
#include "ConfigWizSheet.h"
#include "ConfigWizPage.h"
#include "PageComboBox.h"
#include "WizPageComboBox.h"
#include "WizPageRadioButtons.h"
#include "WizPageSpin.h"
#include "PropPageComboBox.h"
#endif

#if !defined(NO_CONFIGOBJS)
#include "ConfigObject.h"
#include "Port.h"
#include "Service.h"
#include "Protocol.h"
#include "Line.h"
#include "Adapter.h"
#include "ComOnlyAdapter.h"
#endif

// typedefs
//
//////////////////////////////////////////////////////////////////////
typedef CTypedPtrArray<CObArray, CConfigObject*> CConfigObjectArray;

// Friendly macros:
//
//////////////////////////////////////////////////////////////////////

// Array macros:
//
#if !defined(ElementCount)
#define ElementCount(a)    (sizeof(a) / sizeof(a[0]))
#endif

#if !defined(ByteCount)
#define ByteCount(a)       sizeof(a)
#endif

#if !defined(CharCount)
#define CharCount(a)       ElementCount(a)
#endif

// Conversion Macros:
//
#if !defined(MS_IN_A_SEC)
#define MS_IN_A_SEC     (1000)
#endif

#if !defined(MS2SEC)
#define MS2SEC(n)       ((n) / MS_IN_A_SEC)
#endif

#if !defined(SEC2MS)
#define SEC2MS(n)       ((n) * MS_IN_A_SEC)
#endif

#if !defined(SEC_IN_A_MIN)
#define SEC_IN_A_MIN    (60)
#endif

#if !defined(SEC2MIN)
#define SEC2MIN(n)      ((n) / SEC_IN_A_MIN)
#endif

#if !defined(MIN2SEC)
#define MIN2SEC(n)      ((n) * SEC_IN_A_MIN)
#endif

#endif // DIGIFWRK_H
