
Description | Example | Errors
Name: |
long ATFX_STATE(dev) | |
Inputs: |
int dev |
fax channel device handle |
Returns: |
current state of fax channel device if successful | |
|
AT_FAILURE if invalid fax channel device handle specified | |
Includes: |
srllib.h | |
|
dxxxlib.h | |
|
faxlib.h | |
Category: |
extended attribute | |
Mode: |
synchronous | |
|
||
The ATFX_STATE( ) function returns the current state of the fax channel device specified in dev.
The function parameter is defined as follows:
|
|
Parameter |
Description |
|
dev |
Specifies the valid fax channel device handle obtained when the fax channel was opened. |
This function returns one of the following values indicating the current state of the channel:
|
CS_IDLE |
fax channel is idle |
CS_SENDFAX |
fax channel is transmitting (fx_sendfax( ) active) |
CS_RECVFAX |
fax channel is receiving (fx_rcvfax( ) or fx_rcvfax2( ) active) |
CS_FAXIO |
fax channel is between pages OR when send or receive functions have returned but the fax session is still active |
#include <windows.h>
#include <srllib.h>
#include <dxxxlib.h>
#include <faxlib.h>
DF_IOTT iott[10];
int dev;
main( )
{
/*
* Open the channel using fx_open( ) and obtain the Dialogic
* FAX device handle in dev.
*/
.
.
.
.
/*
* Check state of the FAX channel.
* If idle, call fx_sendfax( ) in asynchronous mode after setting
* up the DF_IOTT array.
*/
if (ATFX_STATE(dev) == CS_IDLE) {
if (fx_sendfax(dev, iott, EV_ASYNC) == -1) {
printf("Error - %s (error code %d)\n",
ATDV_ERRMSGP(dev),ATDV_LASTERR(dev));
if (ATDV_LASTERR(dev)==EDX_SYSTEM) {
/* Perform system error processing */
}
}
}
.
.
}
This function fails and returns AT_FAILURE if an invalid fax channel device handle is specified in dev.
Click here to contact Dialogic Customer Engineering
Copyright 2002, Intel Corporation