Main Page   Namespace List   Class Hierarchy   Data Structures   File List   Namespace Members   Data Fields   Globals   Related Pages  

LibDxxMt.cpp

Go to the documentation of this file.
00001 /*
00002  * LibDxxMt.cpp
00003  *
00004  * Copyright 2003, MobileSpear Inc. (www.mobilespear.com). All rights reserved.
00005  * Copyright 2003, David Resnick. All rights reserved.
00006  *
00007  * See the file doc\license.txt for the terms of usage and distribution.
00008  */
00009 
00010 #define __USING_DEF_FILE__
00011 #include <srllib.h>
00012 #include <dxxxlib.h>
00013 
00014 #include <errno.h> // for EINVAL
00015 #include <bogotel/LibBogoTel.h>
00016 
00017 #include <bogotel/BgtErrors.h>
00018 
00019 DllLinkage int __cdecl dx_open( const char *namep, int oflags ) 
00020 { 
00021     int iHandle;
00022     if (bogotel::dx_open(&iHandle, namep) != bogotel::resultSUCCESS) {
00023         errno = EINVAL;
00024         return -1;
00025     } else {
00026         return iHandle;
00027     }
00028 }
00029 
00030 DllLinkage int __cdecl dx_getxmitslot( int chDev, SC_TSINFO *sc_tsinfop) 
00031 { 
00032     long lHandle;
00033     if (bogotel::dx_getxmitslot(chDev, &lHandle) != bogotel::resultSUCCESS) {
00034         return -1;
00035     } else {
00036         sc_tsinfop->sc_tsarrayp[0] = lHandle;
00037         return 0;
00038     }
00039 }
00040 
00041 DllLinkage int __cdecl dx_listen( int chDev, SC_TSINFO *sc_tsinfop ) 
00042 { 
00043     if (bogotel::dx_listen(chDev, sc_tsinfop->sc_tsarrayp[0]) != bogotel::resultSUCCESS) {
00044         return -1;
00045     } else {
00046         return 0;
00047     }
00048 }
00049 
00050 DllLinkage int __cdecl dx_fileopen (const char *szFilename, int iFlags, ...) 
00051 { 
00052     int iHandle;
00053     if (bogotel::dx_fileopen(&iHandle, szFilename, iFlags) != bogotel::resultSUCCESS) {
00054         return -1;
00055     } else {
00056         return iHandle;
00057     }
00058 }
00059 
00060 DllLinkage int __cdecl dx_fileclose (int iHandle)
00061 { 
00062     if (bogotel::dx_fileclose(iHandle) != bogotel::resultSUCCESS) {
00063         return -1;
00064     } else {
00065         return 0;
00066     }
00067 }
00068 
00069 DllLinkage int __cdecl dx_playiottdata(int iVoiceHandle,DX_IOTT *pIott,const DV_TPT *pTpt, const DX_XPB *pXpb,unsigned short usMode)
00070 { 
00071     if (bogotel::dx_playiottdata(iVoiceHandle,pIott,pTpt,pXpb,usMode) != bogotel::resultSUCCESS) {
00072         return -1;
00073     } else {
00074         return 0;
00075     }
00076 }
00077 
00078 DllLinkage int __cdecl dx_stopch(int iVoiceHandle, unsigned short usMode) 
00079 { 
00080     if (bogotel::dx_stopch(iVoiceHandle,usMode) != bogotel::resultSUCCESS) {
00081         return -1;
00082     } else {
00083         return 0;
00084     }
00085 }
00086 
00087 DllLinkage int __cdecl dx_clrdigbuf(int iVoiceHandle) 
00088 { 
00089     if (bogotel::dx_clrdigbuf(iVoiceHandle) != bogotel::resultSUCCESS) {
00090         return -1;
00091     } else {
00092         return 0;
00093     }
00094 }
00095 
00096 DllLinkage int __cdecl dx_getdig(int iVoiceHandle, const DV_TPT *pTpt, DV_DIGIT *pDigit, unsigned short usMode) 
00097 { 
00098     if (bogotel::dx_getdig(iVoiceHandle, pTpt, pDigit, usMode) != bogotel::resultSUCCESS) {
00099         return -1;
00100     } else {
00101         return 0;
00102     }
00103 }
00104 
00105 DllLinkage long __cdecl ATDX_TERMMSK(INT SrlDevice) 
00106 { 
00107     long lMask;
00108     if (bogotel::ATDX_TERMMSK(SrlDevice, &lMask) != bogotel::resultSUCCESS) {
00109         return AT_FAILURE;
00110     } else {
00111         return lMask;
00112     }
00113 }
00114 
00115 DllLinkage int __cdecl dx_dial(int iHandle, const char *pDialStr, const DX_CAP *pCAP, unsigned short usMode)
00116 { 
00117     if (bogotel::dx_dial(iHandle, pDialStr, pCAP, usMode) != bogotel::resultSUCCESS) {
00118         return -1;
00119     } else {
00120         return 0;
00121     }
00122 }
00123 
00124 
00125 DllLinkage int __cdecl dx_clrtpt( DV_TPT *tptp, int size ) { return 0; }
00126 DllLinkage int __cdecl dx_close( int dev ) { return 0; }
00127 DllLinkage int __cdecl dx_reciottdata( int ChDev,DX_IOTT * iottp, const DV_TPT *tptp, DX_XPB * xpbp,unsigned short mode) { return 0; }
00128 
00129 DllLinkage int __cdecl dx_unlisten( int chDev ) { return 0; }
00130 DllLinkage int __cdecl ag_getxmitslot( int chDev, SC_TSINFO *sc_tsinfop) { return 0; }
00131 DllLinkage int __cdecl ag_listen( int chDev, SC_TSINFO *sc_tsinfop ) { return 0; }
00132 DllLinkage int __cdecl ag_unlisten( int chDev ) { return 0; }
00133 
00134 DllLinkage int __cdecl dx_fileerrno( void ) { return 0; }
00135 
00136 // Needed for Framework
00137 DllLinkage long __cdecl ATDX_CONNTYPE( INT SrlDevice ) { return 0; }
00138 DllLinkage long __cdecl ATDX_CPERROR(  INT SrlDevice ) { return 0; }
00139 DllLinkage long __cdecl ATDX_CPTERM(   INT SrlDevice ) { return 0; }
00140 DllLinkage long __cdecl ATDX_STATE(      INT SrlDevice ) { return 0; }
00141 DllLinkage long __cdecl ATDX_TRCOUNT(    INT SrlDevice ) { return 0; }
00142 DllLinkage int __cdecl dx_addtone( int chdev, unsigned char digit, unsigned char digtype ) { return 0; }
00143 DllLinkage int __cdecl dx_bldst( unsigned int ToneID, unsigned int freq, unsigned int fqdev,
00144                      unsigned int mode ) { return 0; }
00145 DllLinkage void __cdecl dx_bldtngen( TN_GEN *tngenp, 
00146                         unsigned short freq1, unsigned short freq2,
00147                         short amplitude1,    short amplitude2, short duration ) { return; }
00148 DllLinkage void __cdecl dx_clrcap( DX_CAP *capp ) { return; }
00149 DllLinkage int __cdecl dx_deltones( int chdev ) { return 0; }
00150 DllLinkage int __cdecl dx_mreciottdata( int ChDev,DX_IOTT * iottp, const DV_TPT *tptp, 
00151                                DX_XPB * xpbp,unsigned short mode, SC_TSINFO *lpTimeSlot) { return 0; }
00152 DllLinkage int __cdecl dx_playtone( int ChDev, const TN_GEN *tngenp, const DV_TPT *tptp, int mode ) { return 0; }
00153 DllLinkage int __cdecl dx_setevtmsk( int ChDev, unsigned int mask ) { return 0; }

Generated on Tue Aug 12 12:41:29 2003 for bogotel by doxygen 1.3. Hosted by SourceForge.net Logo