///////////////////////////////////////////////////////////////////////////////
// Copyright (c) Winnov L.P., 1997.  All rights reserved
// Service.h: CService class definition.
//
// Modified : C++ -> C
///////////////////////////////////////////////////////////////////////////////

#ifndef _SERVICE_INCLUDED
#define _SERVICE_INCLUDED

#include "eeprom.h"
#include "shared.h"
#ifdef WINKERNEL
#include "wnvhad.h"
#else	// !WINKERNEL
#ifdef WIN32
#include "wnvhad.h"
#endif	// WIN32
#endif	// !WINKERNEL

#undef PUBLIC            
#define PUBLIC extern

#define TRANSITION_NORMAL	0
#define TRANSITION_SLOW		1
#define TRANSITION_FAST		2

typedef struct tag_Service {
    UINT	m_nBoard;
    PSHARED	m_pShared;
#ifdef WINKERNEL
    WNVHAD_BOARD_HANDLE	m_hBoardHandle;
#else	// !WINKERNEL
#ifdef WIN32
    HAD_BOARD_HANDLE	m_hBoardHandle;
#endif	// WIN32
#endif	// !WINKERNEL
} SERVICE, *PSERVICE, FAR *LPSERVICE;

    PUBLIC void serviceConstructor (PSERVICE pService, UINT nBoard, PSHARED pShared, PVOID pIrp);
    PUBLIC void serviceDestructor (PSERVICE pService);  
    
    PUBLIC UINT serviceInstanceSize (void);

    PUBLIC UINT serviceReadReg (PSERVICE pService, UINT nReg);
    PUBLIC void serviceWriteReg (PSERVICE pService, UINT nReg, UINT nVal);
    PUBLIC void serviceSetMxcMux (PSERVICE pService, UINT nVal);
    PUBLIC void serviceGetEEPROM (PSERVICE pService, LPEEPROM lpEEPROM);
    PUBLIC void serviceWimpCamSampleRateChangeEnd (PSERVICE pService, UINT wParam);
    PUBLIC UINT serviceWimpCamSampleRateChangeBegin (PSERVICE pService);
    PUBLIC void serviceSampleRateChange (PSERVICE pService, UINT nXtalSel, UINT nActualSampleRate);
    PUBLIC void serviceClearAudioBuffer (PSERVICE pService);
    PUBLIC void serviceDelayStep (PSERVICE pService, BOOL bGoFast);
    PUBLIC UINT serviceGetDefaultSource (PSERVICE pService, UINT nBoardType);
    PUBLIC BOOL serviceIsMic (PSERVICE pService, UINT nSource);
    PUBLIC BOOL serviceIsCamera (PSERVICE pService, UINT nSource);
    PUBLIC BOOL serviceIsTuner (PSERVICE pService, UINT nSource);
    PUBLIC BOOL serviceIsAux (PSERVICE pService, UINT nSource);
    PUBLIC BOOL serviceIsVideoCamera (PSERVICE pService, UINT nVideoSource);
    PUBLIC BOOL serviceIsVideoTuner (PSERVICE pService, UINT nVideoSource);
    PUBLIC void serviceSetPower (PSERVICE pService, BOOL fState);


#endif	// ndef _SERVICE_INCLUDED
