int
dx_playf(chdev, fnamep) /* must put tpt here, and am .still. not clear */
int chdev
char *fnamep
PREINIT:
DV_TPT tptmp[2];
CODE:
/* Will the constants below be worked out of the
headers, which are included above in the XS?
I've seen lots of ways of getting them to Perl,
but perl does not need them */
tpt[0].tp_type = IO_CONT; /* the next entry is next on array */
tpt[0].tp_termno = DX_IDDTIME; /* Interdigit Delay */
tpt[0].tp_length = 2;
tpt[0].tp_flags = TF_IDDTIME;
tpt[1].tp_type = IO_EOT; /* last entry */
tpt[1].tp_termno = DX_MAXDTMF; /* Maximum digits to get from caller */
tpt[1].tp_length = 1;
tpt[1].tp_flags = TF_MAXDTMF;
RETVAL = dx_playf(chdev, fnamep, tptmp, 0);
OUTPUT:
RETVAL
####
typedef struct DV_TPT {
unsigned short tp_type; /* Flags describing this entry */
unsigned short tp_termno; /* Termination Parameter number */
unsigned short tp_length; /* Length of terminator */
unsigned short tp_flags; /* Parameter attribute flag */
unsigned short tp_data; /* Optional additional data */
unsigned short rfu; /* Reserved */
DV_TPT *tp_nextp; /* Pointer to next termination TPT */
}DV_TPT;
####
int
dx_open(chdev, mode)
const char * chdev
int mode
int
dx_close(dev)
int dev
int
dx_sethook(chdev, hookstate, mode)
int chdev
int hookstate
unsigned short mode
####
$chdev = Starla::dx::dx_open("dxxxB1C1",0) or die "Cannot open dxxxB1C1 ($!)\n";
print "Device is $chdev ($!), state is ";
$tmp = Starla::dx::ATDX_STATE($chdev);
print "$tmp ($!)\n";