/*****************************************************************************\
 *
 *  Filename:           Private.h
 *
 *  Description:        Internal header file for the WinCE driver.
 *
 *
 *  Original author:    Arnaud Glatron - Barbara Trzebowski
 *
 *  Copyright (c) Winnov L.P., 1997
 *  All Rights Reserved.
 *
\*****************************************************************************/


typedef enum HARDWARE_INTERFACE_TYPE
{
    INTERFACE_MEDIAPLUG_PCMCIA,   //Mediaplug is the interface
	INTERFACE_EPSON_MEDIAPLUG,		// Epson Video Controller + Mediaplug
} HARDWARE_INTERFACE_TYPE;

typedef enum HARDWARE_TYPE
{
    HARDWARE_IS_VIDEUMCAM,   //Videum Cam
} HARDWARE_TYPE;


// The client context structure.
typedef struct _CLIENT_CONTEXT 
{
	CARD_SOCKET_HANDLE hSocket;              // from active key
	CARD_CLIENT_HANDLE hCardClient;  // from Registration Callback
	LPVOID pbPhysAddress;			// Physical Address of MP
	BOOL bPhysAddrFound;			// True if the registry was correctly read
	TCHAR lptzSavedContext[256];			// In case we need to redetect the H/W later on
	CRITICAL_SECTION ioCritSect;  // ensures only one ioctl per context
	volatile WORD *pMemWindow;   //Pointer to the Mapped Memory window for device.
	DWORD memWindowSize;		// size in bytes
	BOOL bCardPresent;	//if False, the card is not present.
	BOOL bInitialized;   // If True, the camera is ready to perform.
	BOOL bResetCamera;	// if True, the camera needs to be reset
	UINT memGranularity;  //store the memory granularity returned by the MapMemory card service
	HARDWARE_INTERFACE_TYPE IntType;
	HARDWARE_TYPE HwType;
	WORD CMD_Offset;
	WORD LCMD_Offset;
	WORD DATA_Offset;
	WORD DW_DATA_Offset;
} CLIENT_CONTEXT, *PCLIENT_CONTEXT;

// The Open Context Structure. For now it points to the Client Context...
typedef struct _OPEN_CONTEXT
{
	PCLIENT_CONTEXT pClientContext; //pointer to the associated client context	
} OPEN_CONTEXT, *POPEN_CONTEXT;


