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.

gc_GetConfigData( ) — retrieve parameter values for a given target object<br />

/* print the parm data */<br />

void print_parm_data(int valuetype, GC_PARM_DATAP parmdatap)<br />

{<br />

int t_IntVal;<br />

char t_StrVal[T_MAX_NAMESTRING];<br />

short t_ShortVal;<br />

long t_LongVal;<br />

char t_CharVal;<br />

}<br />

See Also<br />

switch (valuetype)<br />

{<br />

case GC_VALUE_INT:<br />

if (parmdatap->value_size == sizeof(int))<br />

{<br />

memcpy(&t_IntVal, parmdatap->value_buf, sizeof(int));<br />

printf("Retrieve Set ID = %d and Parm ID = %d with value = %d \n",<br />

parmdatap->set_ID, parmdatap->parm_ID, t_IntVal);<br />

}<br />

break;<br />

case GC_VALUE_LONG:<br />

if (parmdatap->value_size == sizeof(long))<br />

{<br />

memcpy(&t_LongVal, parmdatap->value_buf, sizeof(long));<br />

printf("Retrieve Set ID = %d and Parm ID = %d with value = %d \n",<br />

parmdatap->set_ID, parmdatap->parm_ID, t_LongVal);<br />

}<br />

break;<br />

case GC_VALUE_SHORT:<br />

if (parmdatap->value_size == sizeof(short))<br />

{<br />

memcpy(&t_ShortVal, parmdatap->value_buf, sizeof(short));<br />

printf("Retrieve Set ID = %d and Parm ID = %d with value = %d \n",<br />

parmdatap->set_ID, parmdatap->parm_ID, t_ShortVal);<br />

}<br />

break;<br />

case GC_VALUE_CHAR:<br />

if (parmdatap->value_size == sizeof(char))<br />

{<br />

memcpy(&t_CharVal, parmdatap->value_buf, sizeof(char));<br />

printf("Retrieve Set ID = %d and Parm ID = %d with value = %c \n",<br />

parmdatap->set_ID, parmdatap->parm_ID, t_CharVal);<br />

}<br />

break;<br />

case GC_VALUE_STRING:<br />

if (parmdatap->value_size == T_MAX_NAMESTRING)<br />

{<br />

strcpy(t_StrVal, (const char*)parmdatap->value_buf);<br />

printf("Retrieve Set ID = %d and Parm ID = %d with value = %s \n",<br />

parmdatap->set_ID, parmdatap->parm_ID, t_StrVal);<br />

}<br />

break;<br />

default:<br />

printf("Retrieve Unsupported parm Set ID = %d and Parm ID = %d\n",<br />

parmdatap->set_ID, parmdatap->parm_ID);<br />

break;<br />

}<br />

gc_SetConfigData( )<br />

gc_QueryConfigData( )<br />

146 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!