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

LibGc.cpp

Go to the documentation of this file.
00001 /*
00002  * LibGc.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 <gclib.h>
00013 #include <gcerr.h>
00014 
00015 #include <bogotel/LibBogoTel.h>
00016 #include <bogotel/BgtErrors.h>
00017 
00018 int __cdecl gc_Start(GC_START_STRUCT *startp) 
00019 { 
00020     if (bogotel::gc_Start() != bogotel::resultSUCCESS) {
00021         return GC_ERROR;
00022     } else {
00023         return GC_SUCCESS;
00024     }
00025 }
00026 
00027 int __cdecl gc_Stop(void) 
00028 { 
00029     if (bogotel::gc_Stop() != bogotel::resultSUCCESS) {
00030         return GC_ERROR;
00031     } else {
00032         return GC_SUCCESS;
00033     }
00034 }
00035 
00036 int gc_Open(LINEDEV *linedevp, char *devicename, int rfu)
00037 { 
00038     if (bogotel::gc_Open(linedevp, devicename) != bogotel::resultSUCCESS) {
00039         return GC_ERROR;
00040     } else {
00041         return GC_SUCCESS;
00042     }
00043 }
00044 
00045 int __cdecl gc_OpenEx(LINEDEV *linedevp, char *devicename, int rfu, void *usrattr) 
00046 { 
00047     if (bogotel::gc_OpenEx(linedevp, devicename, usrattr) != bogotel::resultSUCCESS) {
00048         return GC_ERROR;
00049     } else {
00050         return GC_SUCCESS;
00051     }
00052 }
00053 
00054 int __cdecl gc_GetXmitSlot(LINEDEV hDev, SC_TSINFO *pScTsInfo) 
00055 { 
00056     if (bogotel::gc_GetXmitSlot(hDev, pScTsInfo) != bogotel::resultSUCCESS) {
00057         return GC_ERROR;
00058     } else {
00059         return GC_SUCCESS;
00060     }
00061 }
00062 
00063 int __cdecl gc_Listen(LINEDEV hDev, SC_TSINFO *pScTsInfo, unsigned long mode) 
00064 {
00065     if (bogotel::gc_Listen(hDev, pScTsInfo) != bogotel::resultSUCCESS) {
00066         return GC_ERROR;
00067     } else {
00068         return GC_SUCCESS;
00069     }
00070 }
00071 
00072 int __cdecl gc_GetMetaEvent(METAEVENT *metaeventp) 
00073 { 
00074     if (bogotel::gc_GetMetaEvent(metaeventp) != bogotel::resultSUCCESS) {
00075         return GC_ERROR;
00076     } else {
00077         return GC_SUCCESS;
00078     }
00079 }
00080 
00081 int __cdecl gc_GetNetworkH(LINEDEV linedev, int *networkhp) 
00082 { 
00083     (*networkhp) = linedev;
00084     return GC_SUCCESS;
00085 }
00086 
00087 int __cdecl gc_GetUsrAttr(LINEDEV linedev, void  **usr_attrp) 
00088 { 
00089     if (bogotel::gc_GetUsrAttr(linedev, usr_attrp) != bogotel::resultSUCCESS) {
00090         return GC_ERROR;
00091     } else {
00092         return GC_SUCCESS;
00093     }
00094 }
00095 
00096 int __cdecl gc_GetCRN(CRN *crn_ptr, METAEVENT *metaeventp) 
00097 { 
00098     if (bogotel::gc_GetCRN(crn_ptr, metaeventp) != bogotel::resultSUCCESS) {
00099         return GC_ERROR;
00100     } else {
00101         return GC_SUCCESS;
00102     }
00103 }
00104 
00105 int __cdecl gc_WaitCall(LINEDEV linedev, CRN *crnp, GC_WAITCALL_BLK *waitcallp,int timeout, unsigned long mode) 
00106 { 
00107     if (bogotel::gc_WaitCall(linedev, crnp, waitcallp, timeout, mode) != bogotel::resultSUCCESS) {
00108         return GC_ERROR;
00109     } else {
00110         return GC_SUCCESS;
00111     }
00112 }
00113 
00114 int __cdecl gc_GetANI(CRN crn, char * anibuf) 
00115 { 
00116     if (bogotel::gc_GetANI(crn, anibuf) != bogotel::resultSUCCESS) {
00117         return GC_ERROR;
00118     } else {
00119         return GC_SUCCESS;
00120     }
00121 }
00122 
00123 int __cdecl gc_GetDNIS(CRN crn, char *dnis) 
00124 { 
00125     if (bogotel::gc_GetDNIS(crn, dnis) != bogotel::resultSUCCESS) {
00126         return GC_ERROR;
00127     } else {
00128         return GC_SUCCESS;
00129     }
00130 }
00131 
00132 int __cdecl gc_MakeCall(LINEDEV hSignal, CRN *pCrn, char *szNumber, GC_MAKECALL_BLK *pMakecall, int iTimeout, unsigned long ulMode) 
00133 { 
00134     if (bogotel::gc_MakeCall(hSignal, pCrn, szNumber, pMakecall, iTimeout, ulMode) != bogotel::resultSUCCESS) {
00135         return GC_ERROR;
00136     } else {
00137         return GC_SUCCESS;
00138     }
00139 }
00140 
00141 int __cdecl gc_AcceptCall(CRN crn, int iRings, unsigned long ulMode) 
00142 { 
00143     if (bogotel::gc_AcceptCall(crn, iRings, ulMode) != bogotel::resultSUCCESS) {
00144         return GC_ERROR;
00145     } else {
00146         return GC_SUCCESS;
00147     }
00148 }
00149 
00150 int __cdecl gc_AnswerCall(CRN crn, int iRings, unsigned long ulMode) 
00151 {
00152     if (bogotel::gc_AnswerCall(crn, iRings, ulMode) != bogotel::resultSUCCESS) {
00153         return GC_ERROR;
00154     } else {
00155         return GC_SUCCESS;
00156     }
00157 }
00158 
00159 int __cdecl gc_SetCallingNum(LINEDEV hSignal, char *calling_num) 
00160 {
00161     if (bogotel::gc_SetCallingNum(hSignal, calling_num) != bogotel::resultSUCCESS) {
00162         return GC_ERROR;
00163     } else {
00164         return GC_SUCCESS;
00165     }
00166 }
00167 
00168 int __cdecl gc_ErrorValue(int *piError, int *piCcLib, long *plCcLibErr) 
00169 { 
00170     if (bogotel::gc_ErrorValue(piError, piCcLib, plCcLibErr) != bogotel::resultSUCCESS) {
00171         return GC_ERROR;
00172     } else {
00173         return GC_SUCCESS;
00174     }
00175 }
00176 
00177 int __cdecl gc_CCLibIDToName(int iCcLibId, char **pszCcLibName) 
00178 { 
00179     if (bogotel::gc_CCLibIDToName(iCcLibId, pszCcLibName) != bogotel::resultSUCCESS) {
00180         return GC_ERROR;
00181     } else {
00182         return GC_SUCCESS;
00183     }
00184 }
00185 
00186 int __cdecl gc_ResultMsg(int iCcLibId, long lResultCode, char **pszMsg) 
00187 { 
00188     if (bogotel::gc_ResultMsg(iCcLibId, lResultCode, pszMsg) != bogotel::resultSUCCESS) {
00189         return GC_ERROR;
00190     } else {
00191         return GC_SUCCESS;
00192     }
00193 }
00194 
00195 int __cdecl gc_DropCall(CRN crn, int iCause, unsigned long ulMode) 
00196 {
00197     if (bogotel::gc_DropCall(crn, iCause, ulMode) != bogotel::resultSUCCESS) {
00198         return GC_ERROR;
00199     } else {
00200         return GC_SUCCESS;
00201     }
00202 }
00203 
00204 int __cdecl gc_ReleaseCall(CRN crn) 
00205 {
00206     if (bogotel::gc_ReleaseCallEx(crn, EV_SYNC) != bogotel::resultSUCCESS) {
00207         return GC_ERROR;
00208     } else {
00209         return GC_SUCCESS;
00210     }
00211 }
00212 
00213 int gc_ReleaseCallEx(CRN crn, unsigned long mode) 
00214 { 
00215     if (bogotel::gc_ReleaseCallEx(crn, mode) != bogotel::resultSUCCESS) {
00216         return GC_ERROR;
00217     } else {
00218         return GC_SUCCESS;
00219     }
00220 }
00221 
00222 int __cdecl gc_ResultValue(METAEVENT *pMetaEvent, int *piGcResult, int *pCcLibId, long *pCcLibResult) 
00223 {
00224     if (bogotel::gc_ResultValue(pMetaEvent, piGcResult, pCcLibId, pCcLibResult) != bogotel::resultSUCCESS) {
00225         return GC_ERROR;
00226     } else {
00227         return GC_SUCCESS;
00228     }
00229 }
00230 
00231 int __cdecl gc_ResetLineDev(LINEDEV linedev, unsigned long mode) 
00232 { 
00233     if (bogotel::gc_ResetLineDev(linedev, mode) != bogotel::resultSUCCESS) {
00234         return GC_ERROR;
00235     } else {
00236         return GC_SUCCESS;
00237     }
00238 }
00239 
00240 int gc_CCLibStatusEx(char *cclib_name, void *cclib_infop) 
00241 { 
00242     if (bogotel::gc_CCLibStatusEx(cclib_name, cclib_infop) != bogotel::resultSUCCESS) {
00243         return GC_ERROR;
00244     } else {
00245         return GC_SUCCESS;
00246     }
00247 }
00248 
00249 int gc_ResultInfo(METAEVENT *a_Metaevent, GC_INFO *a_Info) 
00250 { 
00251     if (bogotel::gc_ResultInfo(a_Metaevent, a_Info) != bogotel::resultSUCCESS) {
00252         return GC_ERROR;
00253     } else {
00254         return GC_SUCCESS;
00255     }
00256 }
00257 
00258 int gc_ErrorInfo(GC_INFO *a_Info) 
00259 { 
00260     if (bogotel::gc_ErrorInfo(a_Info) != bogotel::resultSUCCESS) {
00261         return GC_ERROR;
00262     } else {
00263         return GC_SUCCESS;
00264     }
00265 }
00266 
00267 int __cdecl gc_Close(LINEDEV linedev) { return GC_SUCCESS; }
00268 int __cdecl gc_SetChanState(LINEDEV linedev, int chanstate, unsigned long mode) { return GC_SUCCESS; }
00269 int __cdecl gc_StartTrace(LINEDEV linedev, char *tracefilename) { return GC_SUCCESS; }
00270 int __cdecl gc_StopTrace(LINEDEV linedev) { return GC_SUCCESS; }
00271 
00272 int gc_GetVoiceH(LINEDEV linedev, int * voicehp) { return GC_SUCCESS; }
00273 
00274 int gc_util_insert_parm_val(GC_PARM_BLKP *parm_blkpp, unsigned short setID,
00275                             unsigned short parmID, unsigned char data_size,
00276                             unsigned long data) { return GC_SUCCESS; }
00277 void gc_util_delete_parm_blk(GC_PARM_BLKP parm_blk) { return; }
00278 int gc_GetCallInfo(CRN crn,int info_id, char *valuep) { return GC_SUCCESS; }
00279 int gc_LoadDxParm(LINEDEV linedev, char *pathp, char *errmsgp, int err_length) { return GC_SUCCESS; }
00280 

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