Intel 05-1832-002 IP Phone User Manual


 
412 Voice API for Windows Operating Systems Library Reference — November 2003
dx_setuio( ) — install user-defined I/O functions
dx_setuio( )
install user-defined I/O functions
!
!!
! Description
The dx_setuio( ) function installs user-defined read( ), write( ), and lseek( ) functions in your
application. These functions are then used by play and record functions, such as dx_play( ) and
dx_rec( ), to read and/or write to nonstandard storage media.
The application provides the addresses of user-defined read( ), write( ) and lseek( ) functions by
initializing the DX_UIO structure. See DX_UIO, on page 519 for more information on this
structure.
You can override the standard I/O functions on a file-by-file basis by setting the IO_UIO flag in the
io_type field of the DX_IOTT structure. You must OR the IO_UIO flag with the IO_DEV flag for
this feature to function properly. See DX_IOTT, on page 509 for more information.
!
!!
! Cautions
In order for the application to work properly, the user-provided functions must conform to
standard I/O function semantics.
A user-defined function must be provided for all three I/O functions. NULL is not permitted.
On DM3 boards, user-defined I/O functions installed by dx_setuio( ) are called in a different
thread than the main application thread. If data is being shared among these threads, the
application must carefully protect access to this data using appropriate synchronization
mechanisms (such as mutex) to ensure data integrity.
!
!!
! Errors
None.
Name: int dx_setuio(uioblk)
Inputs: uioblk
DX_UIO data structure
Returns: 0 if success
-1 if failure
Includes: srllib.h
dxxxlib.h
Category: I/O
Mode: synchronous
Platform: DM3, Springware
Parameter Description
uioblk specifies the DX_UIO structure, a user-defined I/O structure