OSI/MHS Gateway Programmatic Interface (GPI) Programming Guide
C Program Example
OSI/MHS Gateway Programmatic Interface (GPI) Programming Guide—424822-001
B-25
( root_id, /* Root object */
/* identifier */
OM_POSITION_AT_END,
descriptor_list,
descriptor_count);
} /* if */
} /* if */
} /* if */
} /* if */
} /* if */
else
printf (" MH_C_OR_NAME doesn't exist. \n");
} /* if */
} /* if */
} /* if */
} /* if */
} /* if */
} /* if */
return (local_rc);
} /* build_and_insert_messagerd_object */
#pragma page
/**************************************************************************/
/* Function Name: build_root_object */
/* */
/* Arguments: session IN */
/* root_id OUT */
/* */
/* Return: Return code from the function call */
/* */
/* Description: This function creates the root object and calls a */
/* function to insert the root level attributes. Then */
/* it calls each function that builds and inserts */
/* subobjects into the root object. When this function */
/* is finished, the root object/message is ready to be */
/* transferred out. */
/**************************************************************************/
unsigned short build_root_object (short local_session,
unsigned long *root_id)
{
unsigned short
local_rc; /* Return code from the function call */
/* Create the root object */
local_rc = GPI_OM_CREATE_ ( MH_C_MESSAGE, /* Class of the object */
OM_FALSE, /* Without defined initial */
/* values */
root_id,
, /* Not required for the root */
/* object */
local_session);
/* Insert all attributes for the root */
if (( local_rc == OM_RC_SUCCESS ) || ( local_rc == ZGPI_RC_WARNING ))
{
if ( local_rc == ZGPI_RC_WARNING )
printf (" WARNING! number: %d \n", local_rc );
printf (" Creating and inserting ROOT ATTRIBUTES\n");