OSI/MHS Gateway Programmatic Interface (GPI) Programming Guide

Writing Your Program
OSI/MHS Gateway Programmatic Interface (GPI) Programming Guide424822-001
5-17
Building a Root Object
The following subsections describe three subtasks of building a root object:
Creating an object (using GPI_OM_CREATE_ )
Inserting an attribute value (using GPI_OM_INSERT_ )
Writing a long string to an attribute value (using GPI_OM_WRITE_ )
Creating an Object
You call the GPI_OM_CREATE_ procedure to create a new object of a specified class.
GPI_OM_CREATE_ causes the GPI service to allocate resources required to represent
the object. If you so specify, it also adds to the object a set of default first-level
attributes and their values.
Parameters for GPI_OM_CREATE_ are:
class (input)
initialize (input)
object (output)
root-object (input; optional)
session (input; optional)
class-obj-id (input; optional)
class-obj-id-len (input; optional)
class specifies the class of object to be created. Supported object classes are listed in
Section 3, GPI Object Management
. For details on each class, refer to the GPI Reference
Manual.
initialize specifies whether to initialize the new object with first-level default
attributes, as follows:
OM-TRUE specifies creating the object with default attributes.
OM-FALSE specifies creating the object with the OM-T-CLASS attribute only.
object returns the object identifier of the newly created object. If the procedure is not
successful, this parameter is unchanged.
root-object specifies the identifier of the root object in which the new object is to
be contained. The specified root object must already exist. You must use this parameter
if you are creating any object other than a root object. If you are creating a root object,
this parameter is ignored.
session specifies the identifier of the session in which the object is being created.
You must use this parameter if you are creating a root object. If you are creating any
object other than a root object, this parameter is ignored.
class-obj-id specifies the class of object to be created. As described in the GPI
Reference Manual, you must use this parameter if you are creating an object specified
by an ASN.1 object identifier rather than an integer (for an object specified by an
integer, you use the class parameter described previously). The class-obj-id-len
specifies the length, in octets, of the value of class-obj-id.