08.01.2013 Views

Dialogic® Global Call API Library Reference

Dialogic® Global Call API Library Reference

Dialogic® Global Call API Library Reference

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

gc_GetLinedevState( ) — retrieve the status of the line device<br />

}<br />

/*<br />

* Find the status of the board.<br />

* The D Channel can be in one of two states DATA_LINK_UP or<br />

* DATA_LINK_DOWN.<br />

*/<br />

type = GCGLS_DCHANNEL;<br />

if(gc_GetLinedevState(bdd, type, &statebuf) != GC_SUCCESS)<br />

{<br />

gc_ErrorInfo( &gc_error_info );<br />

printf ("Error: gc_GetLinedevState() on linedev: 0x%lx, GC ErrorValue: 0x%hx - %s,<br />

CCLibID: %i - %s, CC ErrorValue: 0x%lx - %s\n",<br />

bdd, gc_error_info.gcValue, gc_error_info.gcMsg,<br />

gc_error_info.ccLibId, gc_error_info.ccLibName,<br />

gc_error_info.ccValue, gc_error_info.ccMsg);<br />

return (gc_error_info.gcValue);<br />

}<br />

else<br />

{<br />

printf("D Channel Status: %d\n", statebuf);<br />

}<br />

/*<br />

* Find the status of the line.<br />

* the B Channel can be in one of three states GCLS_INSERVICE,<br />

* GCLS_MAINTENANCE, or GCLS_OUT_OF_SERVICE.<br />

*/<br />

type = GCGLS_BCHANNEL;<br />

if(gc_GetLinedevState(ldev, type, &statebuf) != GC_SUCCESS)<br />

{<br />

gc_ErrorInfo( &gc_error_info );<br />

printf ("Error: gc_GetLinedevState() on linedev: 0x%lx, GC ErrorValue: 0x%hx - %s,<br />

CCLibID: %i - %s, CC ErrorValue: 0x%lx - %s\n",<br />

ldev, gc_error_info.gcValue, gc_error_info.gcMsg,<br />

gc_error_info.ccLibId, gc_error_info.ccLibName,<br />

gc_error_info.ccValue, gc_error_info.ccMsg);<br />

return (gc_error_info.gcValue);<br />

}<br />

else<br />

{<br />

printf("B Channel Status: %d\n", statebuf);<br />

}<br />

gc_Close(bdd);<br />

gc_Close(ldev);<br />

return (0);<br />

See Also<br />

gc_SetChanState( )<br />

164 Dialogic ® <strong>Global</strong> <strong>Call</strong> <strong>API</strong> <strong>Library</strong> <strong>Reference</strong> — January 2008<br />

Dialogic Corporation

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!