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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Example<br />

#include "gclib.h"<br />

retrieve the next parameter in a GC_PARM_BLK — gc_util_next_parm( )<br />

void main( )<br />

{<br />

GC_PARM_BLKP my_blkp = NULL;<br />

GC_PARM_DATAP my_parmp;<br />

int type = 1;<br />

}<br />

See Also<br />

/* insert parm by reference */<br />

if ( gc_util_insert_parm_ref( &my_blkp, GC_SET_SERVREQ, PARM_REQTYPE,<br />

sizeof( int ), &type ) != GC_SUCCESS )<br />

{<br />

/* Process error */<br />

}<br />

/* insert parm by value */<br />

if ( gc_util_insert_parm_val( &my_blkp, GC_SET_SERVREQ, PARM_ACK,<br />

sizeof( short ), GC_ACK ) != GC_SUCCESS )<br />

{<br />

/* Process error */<br />

}<br />

/* Now we should have a GC_PARM_BLK with 2 parameters */<br />

/* Following use of gc_util_next_parm retrieves the first parameter in a<br />

* GC_PARM_BLK, which in this case is PARM_REQTYPE */<br />

my_parmp = gc_util_next_parm( my_blkp, NULL );<br />

/* Retrieve the next parameter after getting the first one */<br />

my_parmp = gc_util_next_parm( my_blkp, my_parmp );<br />

/* This function finds and returns specified parameter, NULL if not found */<br />

my_parmp = gc_util_find_parm( my_blkp, GC_SET_SERVREQ, PARM_ACK );<br />

/* After GC_PARM_BLK is no longer needed, delete the block */<br />

gc_util_delete_parm_blk( my_blkp );<br />

/* Set my_blkp to NULL now that the block has been deleted */<br />

my_blkp = NULL;<br />

gc_util_find_parm( )<br />

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

Dialogic Corporation

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

Saved successfully!

Ooh no, something went wrong!