OSI/MHS Gateway Programmatic Interface (GPI) Programming Guide

OSI/MHS Gateway Programmatic Interface (GPI) Programming Guide424822-001
5-1
5
Writing Your Program
Before writing a GPI program, you should understand GPI procedures and how to use
objects and attributes (see Section 2, The GPI Library, and Section 3, GPI Object
Management). You should also have considered how to implement gateway fault
recovery, security, and if necessary, multiple GPI sessions (Section 4, Planning Your
Program).
This section focuses on GPI program development. It shows how to use GPI procedures
to construct a typical client program. The topics covered are:
Developing program structure
Managing the GPI environment
Initializing the GPI environment
Opening a session
Closing a session
Retrieving error information
Processing outbound information
Building a root object
Transferring out a root object
Processing inbound information
Initiating transfer-in of a root object
Retrieving information from a root object
Finishing transfer-in of a root object
Editing a root object
Developing Program Structure
The GPI can be applied to a wide range of X.400 gateways. As a result, there are many
possible implementations of GPI client programs. This subsection provides general
information that applies to most client programs.
Generally speaking, a GPI client program can be developed for outbound processing,
inbound processing, or a combination of both. Outbound and inbound processing can be
done in the same session, or they can be done in separate sessions.
Note. As mentioned in Section 4, Planning Your Program, Compaq recommends that you limit
a client program to a single session, and that you limit the session to either outbound or
inbound processing. To implement both outbound and inbound processing, you can develop a
separate client program for each and run them concurrently.