OSI/MHS Gateway Programmatic Interface (GPI) Programming Guide
C Program Example
OSI/MHS Gateway Programmatic Interface (GPI) Programming Guide—424822-001
B-30
IM_T_TEXT, /* Attribute type */
0, /* Value position */
&string_offset, /* Offset of the start of the */
/* string to read */
string_length, /* Number of string to be read */
data_string, /* Buffer to contain the */
/* strings */
&actual_number, /* The actual number of octets */
/* read by this call */
&total_number ); /* The total number of octets */
/* in this value */
if (( local_rc == OM_RC_SUCCESS ) ||
( local_rc == ZGPI_RC_WARNING ))
{
if ( local_rc == ZGPI_RC_WARNING )
printf (" WARNING! number: %d \n", local_rc );
len = (short) stccpy ( printout,
data_string,
SECOND_LINE_LEN + 1);
printf (" %s \n",
printout);
if ( total_number > 59 )
printf ("Note: There is more content in the
buffer.\n");
} /* if */
else
{
show_gpi_status (ZGPI_ANY);
} /* else */
} /* if */
} /* if */
else
{
show_gpi_status (ZGPI_ANY);
} /* else */
} /* else */
} /* if */
else
printf (" Attribute doesn't exist. Name: %s\n",
print_data[counter].text);
} /* for */
} /* print_attributes */
#pragma page
/**************************************************************************/
/* Function Name: print_object */
/* */
/* Arguments: local_type IN */
/* number_of_attri IN */
/* print_data IN */
/* f_desc_list IN */
/* desc_list IN */
/* max_number IN */
/* */
/* Return: Return code from the function call */
/* */
/* Description: This function prints all attributes from a sub- */
/* object. Print_data contains the type of the attri- */
/* bute and a pointer to the type in ASCII. The */
/* number of attributes doesn't have to be equal to */