Intel 05-1832-002 IP Phone User Manual


 
220 Voice API for Windows Operating Systems Library Reference — November 2003
dx_getcachesize( ) — get size of on-board memory for cached prompts
obtain a descriptive error message. For a list of error codes returned by ATDV_LASTERR( ), see
the Error Codes chapter.
!
!!
! Example
#include <windows.h>
#include <stdio.h>
#include "srllib.h"
#include "dxxxlib.h"
main()
{
int brdhdl; /* board handle */
int cachetotal; /* Total size of the on-board memory for storing cache prompts */
int cacheremaining; /* Remaining size of on-board memory */
.
.
.
/* Open board */
if ((brdhdl = dx_open("brdB1",0)) == -1) {
printf("Cannot open board\n");
/* Perform system error processing */
exit(1);
}
/* Find the total available size of the on-board memory */
if (
dx_getcachesize(brdhdl, &cachetotal, DX_CACHETOTAL
) == -1) {
printf("Error while getting cache size \n");
/* Perform system error processing */
exit(1);
}
.
.
.
/* Download prompts to the on-board memory */
.
.
.
/* Check available size remaining for additional downloads */
if (
dx_getcachesize(brdhdl, &cacheremaining, DX_CACHEREMAINING
) == -1) {
printf("Error while getting cache size \n");
/* Perform system error processing */
exit(1);
}
}
!
!!
! See Also
dx_cacheprompt( )
dx_open( )
dx_playiottdata( )