OSI/MHS Gateway Programmatic Interface (GPI) Reference Manual

Introduction to the GPI
OSI/MHS Gateway Programmatic Interface (GPI) Reference Manual522223-001
1-5
Message Transfer
Message Transfer
The GPI message transfer procedures allow you to transfer X.400 communications in
from and out to the X.400 network. You process inbound communications by using
three procedures:
To determine whether a communication is awaiting transfer from the input queue,
you use the GPI_MT_WAIT_ procedure.
If a communication is available, you call the GPI_MT_START_TRANSFER_IN_
procedure to reserve it. A reserved communication is assigned an object identifier
and can be examined, using the object management procedures, but cannot be
modified. You can copy a reserved object.
After delivering a message or report to the intended recipients or after examining a
probe to determine whether or not a communication can be delivered to the intended
recipients, you can call the GPI_MT_FINISH_TRANSFER_IN_ procedure to
indicate you have finished processing an inbound communication.
GPI_MT_FINISH_TRANSFER_IN_ can be used to:
Cancel processing and leave the object in the input queue.
Remove the object from the input queue.
Move the object to an archive queue, where nondecodable communications are
stored for future examination.
Transfer the object back to the MTA for X.400 routing (this option is valid only
for gateways that are configured as P1-EXIT type).
You call the GPI_MT_TRANSFER_OUT_ procedure to transfer a root object out to the
GPI service.
Status Checking
Each GPI procedure returns a code that indicates the status (success or failure) of the
procedure call. If the procedure is not successful, you can either take immediate action
based on the information provided by the return code, or you can call the
GPI_STATUS_ procedure to request more information about the cause of the failure.
You can request information about the last error in a specific session, the last procedure
call in any session, or the last error that occurred outside a session. The GPI_STATUS_
procedure returns an error class that indicates the severity of the problem.
For a description of the information returned by GPI_STATUS_ , see Appendix B,
Return Codes.