Dialogic 05-0867-005 Table Top Game User Manual


 
resets the channel to Null state cc_Restart( )
195
!
! !
!
Termination Event
CCEV_RESTART - indicates that the Restart operation has been completed.
The channel is in Null state.
CCEV_RESTARTFAIL - indicates that the function call failed. The
application can use cc_ResultValue( ) after this event is received to verify
the reason for failure.
!
! !
!
Cautions
In asynchronous mode, the application cannot call any call state-related function
prior to CCEV_RESTART.
!
! !
!
Example
#include <windows.h> /* For Windows applications only */
#include <process.h>
#include <stdio.h>
#include <errno.h>
#include srllib.h
#include dtilib.h
#include cclib.h
#define ESC 27 /* ASCII ESC value */
#define SPACE ‘‘ /* ASCII space value */
void WaitCallThread(void *argp);
main()
{
short devhdl; /* device handle for B channel */
.
.
.
/* open the channel 1 device */
if ( cc_Open(&devhdl,dtiB1T1,0)<0)
exit(1); /* or different actions */
/* start a child thread */
if ( _beginthread( WaitCallThread ,0,(void *)&devhdl)<0)
exit(1);
.
.
while(1)
{
int keyin; /* key stroke */
printf(Press <SPACE> to make a call, or press <ESC> to quit\n);
keyin = getch();
if ( keyin == ESC )
break;
else if (keyin == SPACE)
makecall(devhdl); /* make a call */
/* else repeat the loop */
}