Dialogic Dialogic Global Call IP IP Phone User Manual


 
Dialogic
®
Global Call IP Technology Guide — November 2007 431
Dialogic Corporation
find a parameter in a GC_PARM_BLK — gc_util_find_parm_ex( )
GC_PARM_BLK, the function fills in the GC_PARM_DATA_EXT structure with the parameter
data and returns GC_SUCCESS. If the parameter does not exist in the GC_PARM_BLK, or if no
more parameters of the specified type are found, the function returns EGC_NO_MORE_PARMS.
To search from the beginning of the GC_PARM_BLK, initialize the GC_PARM_DATA_EXT
structure by using INIT_GC_PARM_DATA_EXT(parm) before calling
gc_util_find_parm_ex(
). If the structure pointed to by parm contains parameter information that
was retrieved in a previous call to this function, the function will begin its search at that parameter
rather than the beginning of the parameter block.
Cautions
Unlike the similar gc_util_find_parm( ) function, the parm pointer used in this function
cannot be used to update the parameter itself because it points to a data structure that is in the
application’s memory rather than a location in the GC_PARM_BLK itself.
The parm parameter must point to a valid GC_PARM_DATA_EXT structure. If it is desired to
search from the beginning of the parameter block, the application must initialize the structure
via INIT_GC_PARM_DATA_EXT(parm) before calling gc_util_find_parm_ex(
).
Errors
If this function returns GC_ERROR to indicate failure, use the gc_ErrorInfo( ) function to retrieve
the reason for the error. See the “Error Handling” section in the Dialogic
®
Global Call API
Programming Guide. All Global Call error codes are defined in the gcerr.h file.
Example
#include "gclib.h"
#include "gcip.h"
void search_parm_block(GC_PARM_BLKP parm_blkp)
{
GC_PARM_DATA_EXT parm_data_ext;
int ret = 0;
Parameter Description
parm_blk points to a valid GC_PARM_BLK that will be searched for a parameter of
the specified type
setID set ID of the parameter to be found
parmID parameter ID of the parameter to be found
parm points to a valid GC_PARM_DATA_EXT provided by the application. If a
pointer to a newly initialized structure is passed in the function call, the
function searches from the beginning of the GC_PARM_BLK; if the
structure contains data from a previously found parameter, the function
searches from that parameter onward. When the function completes
successfully, the structure is updated to contain retrieved information for the
parameter that was found.