/*
 * $Header: lib.h, 11, 29.09.2009 15:23:10, Esther Bergter$
 *
 */

/*********
 * BOOLS *
 *********/

#ifdef __CINT__

typedef int BOOL;

#define TRUE  1
#define FALSE 0

#endif

/***************
 * EXECEPTIONS *
 ***************/

class HangupException
{
public:
	HangupException() {};
};

/***********
 * GLOBALS *
 ***********/

// see scr.h for definition
extern CONNECTIONDATA ConnectionData;
extern EXTENSIONDATA  ExtensionData;
extern BOOL           bFax;
extern BOOL           bVideo;
extern BOOL           bSMS;

// the default timeout for getting the next input from the user
const long dwDefaultTimeoutMS = 10000;

// this you can use for building announcements
extern char szMsg[];

/******************************************
 * International (Language) Configuration *
 ******************************************/

int  GetLanguageCount();

int  GetLanguage();
void InitLanguages();
void SetLanguage(int nLang);

/*************
 * FUNCTIONS *
 *************/

// checks if character is numeric (0..9)
BOOL isnum(char c);

// return a event (for definitions see scr.h)
char GetEvent(long dwTimeoutMS = dwDefaultTimeoutMS, int bHangupDetect = 1);

// get a number, terminated with '#'
BOOL GetNumber(char *pszNumber, int maxlen, long dwTimeoutMS = dwDefaultTimeoutMS);

// common PlayGreeting(): mapper for PlayVoiceGreeting() and PlayVideoGreeting()
DRVERR PlayGreeting();

// common PlayGoodBye(): mapper for PlayVoiceGoodBye() and PlayVideoGoodBye()
DRVERR PlayGoodBye();

// geeting, goodbye tests
BOOL HasGreeting();
BOOL HasGoodBye();

BOOL CanFax();
BOOL CanVoice();
BOOL CanSMS();

void FatalExit(char *msg, DRVERR dwErr);