/*===========================================================================
FILE:
   SwiM2MAVAPI.h

DESCRIPTION:

==========================================================================*/

#ifndef SwiM2MAVAPI_H
#define SwiM2MAVAPI_H
/*=========================================================================*/
// Definitions
/*=========================================================================*/
#ifdef GOBIAPI_EXPORTS
#define IMPORTGOBI extern "C" __declspec( dllexport )
#else  //GOBIAPI_EXPORTS
#ifdef __cplusplus
/* C++ callable DLL */
#define IMPORTGOBI extern "C" __declspec( dllimport )
#else
/* C callable DLL */
#define IMPORTGOBI __declspec( dllimport )
#endif
#endif //GOBIAPI_EXPORTS

// Calling convention for API
#define GOBICALLBACK __stdcall
#define GOBICMAPI __stdcall

#ifdef __cplusplus
extern "C" {
#endif


#define MAX_PIFACE_TABLE_SIZE		9

typedef struct
{
    BYTE		PIFACEParamLen;
	BYTE		PIFACEParam[MAX_PIFACE_TABLE_SIZE];
} PIFACETable;

typedef struct
{
    BYTE  			AudioProfile;
    BYTE  			ACDBDevice;
    BYTE  			PIFACEID;
    PIFACETable 	PIFACETbl;
} AudioConfig;

typedef struct
{
    LONG		B0;
    LONG		B1;
    LONG		B2;
    LONG		A1;
    LONG		A2;
} PCMIIRFilter;

typedef struct
{
    BYTE	Profile;
	BYTE	Switch;
	BYTE	Stage;
} PCMIIRSetConfig;

typedef struct
{
    BYTE			Profile;
	BYTE			Stage;
	PCMIIRFilter	Coeff;
} PCMIIRSetCoeff;
#ifdef __cplusplus
};
#endif

/*=========================================================================*/
// Prototypes
/*=========================================================================*/

IMPORTGOBI ULONG GOBICMAPI	SwiM2MAV_AudioGetProfile(
    // req params
    BYTE*		pGenerator,
    // resp params
    BYTE*       pProfile,
    BYTE*       pEarMute,
    BYTE*       pMicMute,
    BYTE*       pOutGenerator,
    BYTE*		pVolume,
    BYTE*       pCwtMute
);

IMPORTGOBI ULONG GOBICMAPI	SwiM2MAV_AudioSetProfile(
    // req params
    BYTE*  		pProfile,
    BYTE*  		pEarMute,
    BYTE*  		pMicMute,
    BYTE*  		pGenerator,
    BYTE*  		pVolume,
    BYTE*       pCwtMute
    // resp params
);

IMPORTGOBI ULONG GOBICMAPI	SwiM2MAV_AudioGetVolume(
    // req params
    BYTE*		pProfile,
    BYTE*  		pGenerator,
    // resp params
    BYTE*  		pVolume
);

IMPORTGOBI ULONG GOBICMAPI	SwiM2MAV_AudioSetVolume(
    // req params
    BYTE*		pProfile,
    BYTE*  		pGenerator,
    BYTE*  		pVolume
    // resp params
);

IMPORTGOBI ULONG GOBICMAPI	SwiM2MAV_AudioSetAVMute(
    // req params
    BYTE*  		pProfile,
    BYTE*  		pEarMute,
    BYTE*  		pMicMute,
    BYTE*  		pcwtMute//waiting tone mute
    // resp params
);

IMPORTGOBI ULONG GOBICMAPI	SwiM2MAV_AudioGetAVMute(
    // req params
    BYTE*  		pProfile,
    BYTE*  		pEarMute,
    BYTE*  		pMicMute,
    BYTE*  		pcwtMute//waiting tone mute
    // resp params
);

IMPORTGOBI ULONG GOBICMAPI	SwiM2MAV_AudioSetAVCFG(
    // req params
    BYTE*  		 pAudioProfile,
    BYTE*  		 pABCDDevice,
    BYTE*  		 pPIFACEID,
    PIFACETable* pPIFACETable
    // resp params
);

IMPORTGOBI ULONG GOBICMAPI	SwiM2MAV_AudioGetAVCFG(
    // req params
    // resp params
	AudioConfig*	pAudioConfig,
	BYTE*			pSize
);

IMPORTGOBI ULONG GOBICMAPI	SwiM2MAV_AudioNVDef(
    // req params
    // resp params
);

IMPORTGOBI ULONG GOBICMAPI	SwiM2MAV_AudioSetLPBK(
    // req params
    BYTE*	pEnable
    // resp params
);

IMPORTGOBI ULONG GOBICMAPI	SwiM2MAV_AudioGetSpeakerGain(
    // req params
    BYTE*		pProfile,
    // resp params
    USHORT*  	pSpkrGain
);

IMPORTGOBI ULONG GOBICMAPI	SwiM2MAV_AudioSetSpeakerGain(
    // req params
    BYTE*  		pProfile,
    USHORT*  	pSpkrGain
    // resp params
);

IMPORTGOBI ULONG GOBICMAPI	SwiM2MAV_AudioGetSTG(
    // req params
    BYTE*		pProfile,
    // resp params
    WORD*  		pGainValue
);


IMPORTGOBI ULONG GOBICMAPI	SwiM2MAV_AudioSetSTG(
    // req params
    BYTE*		pProfile,
    WORD*  		pGainValue
	// resp params
);

IMPORTGOBI ULONG GOBICMAPI	SwiM2MAV_AudioGetTxVolume(
    // req params
    BYTE*		pProfile,
    // resp params
    WORD*  		pTxVolume
);

IMPORTGOBI ULONG GOBICMAPI	SwiM2MAV_AudioSetTxVolume(
    // req params
    BYTE*		pProfile,
    WORD*  		pTxVolume
	// resp params
);

IMPORTGOBI ULONG GOBICMAPI	SwiM2MAV_AudioGetMicGain(
    // req params
    BYTE*		pProfile,
    // resp params
    WORD*  		pMicGain
);

IMPORTGOBI ULONG GOBICMAPI	SwiM2MAV_AudioSetMicGain(
    // req params
    BYTE*		pProfile,
    WORD*  		pMicGain
	// resp params
);

IMPORTGOBI ULONG GOBICMAPI	SwiM2MAV_AudioGetVolDB(
    // req params
    BYTE*		pProfile,
    BYTE*  		pGenerator,
    BYTE*  		pLevel,
    // resp params
	WORD*		pValue
);

IMPORTGOBI ULONG GOBICMAPI	SwiM2MAV_AudioSetVolDB(
    // req params
    BYTE*		pProfile,
    BYTE*  		pGenerator,
    BYTE*  		pLevel,
    WORD*		pValue
	// resp params
);

/*IMPORTGOBI ULONG GOBICMAPI	SwiM2MAV_AudioGetTXPCMIIR(
    // req params
    BYTE*  			pProfile,
	BYTE*			pOpMode,
	// resp params
	BYTE*           pSwitch,
    BYTE*           pStage,
    PCMIIRFilter*   pFilterCoeff
);

IMPORTGOBI ULONG GOBICMAPI	SwiM2MAV_AudioSetTXPCMIIR(
    // req params
    PCMIIRSetConfig*  	pConfig,
	PCMIIRSetCoeff*		pCoeff
	// resp params
);

IMPORTGOBI ULONG GOBICMAPI	SwiM2MAV_AudioGetRXPCMIIR(
    // req params
    BYTE*  			pProfile,
	BYTE*			pOpMode,
	// resp params
	BYTE*           pSwitch,
    BYTE*           pStage,
    PCMIIRFilter*   pFilterCoeff
);

IMPORTGOBI ULONG GOBICMAPI	SwiM2MAV_AudioSetRXPCMIIR(
    // req params
    PCMIIRSetConfig*  	pConfig,
	PCMIIRSetCoeff*		pCoeff
	// resp params
);*/

IMPORTGOBI ULONG GOBICMAPI	SwiM2MAV_AudioGetAVTXG(
    // req params
    BYTE*		pProfile,
    // resp params
    WORD*  		pEncoderGain
);

IMPORTGOBI ULONG GOBICMAPI	SwiM2MAV_AudioSetAVTXG(
    // req params
    BYTE*		pProfile,
    WORD*  		pEncoderGain
	// resp params
);

IMPORTGOBI ULONG GOBICMAPI	SwiM2MAV_AudioGetAVRXG(
    // req params
    BYTE*		pProfile,
    // resp params
    WORD*  		pDecoderGain
);

IMPORTGOBI ULONG GOBICMAPI	SwiM2MAV_AudioSetAVRXG(
    // req params
    BYTE*		pProfile,
    WORD*  		pDecoderGain
	// resp params
);

IMPORTGOBI ULONG GOBICMAPI	SwiM2MAV_AudioGetAVEC(
    // req params
    BYTE*		pProfile,
    // resp params
    BYTE*  		pSwitch
);

IMPORTGOBI ULONG GOBICMAPI	SwiM2MAV_AudioSetAVEC(
    // req params
    BYTE*		pProfile,
    BYTE*  		pSwitch
	// resp params
);

IMPORTGOBI ULONG GOBICMAPI	SwiM2MAV_AudioGetAVNS(
    // req params
    BYTE*		pProfile,
    // resp params
    BYTE*  		pSwitch
);

IMPORTGOBI ULONG GOBICMAPI	SwiM2MAV_AudioSetAVNS(
    // req params
    BYTE*		pProfile,
    BYTE*  		pSwitch
	// resp params
);

IMPORTGOBI ULONG GOBICMAPI	SwiM2MAV_AudioPlayTone(
	// req params
	BYTE*		pGenerator,
	BYTE*		pAudioTone,
	USHORT*		pToneDuration //optional
	// resp params
);
#endif //SwiM2MAVAPI_H