X400 Gateway API

These function calls provide the X.400 Gateway API. More...

Functions

const char * X400mtError (int error)
 Return string for error code. More...
 
int X400mtOpen (const char *credentials, struct X400mtSession **spp)
 Open a session to the MTA. More...
 
int X400mtClose (struct X400mtSession *sp)
 Close a X400 Session. More...
 
int X400mtSetIntDefault (struct X400mtSession *sp, int paramtype, int value)
 Set a default integer parameter value in a session. More...
 
int X400mtSetStrDefault (struct X400mtSession *sp, int paramtype, const char *value, size_t length)
 Set a default string parameter value in a session. More...
 
int X400mtMsgNew (struct X400mtSession *sp, int type, struct X400mtMessage **mpp)
 Creates new message. More...
 
int X400mtMsgCountRecip (struct X400mtMessage *mp, int type, int *cp)
 Returns count of addresses of given type in message object. More...
 
int X400mtMsgSend (struct X400mtMessage *mp)
 Send message object to MTA. More...
 
int X400mtMsgDelete (struct X400mtMessage *mp)
 Delete message object. More...
 
int X400mtMsgAddStrParam (struct X400mtMessage *mp, int paramtype, const char *value, size_t length)
 Add string-valued parameter to the message. More...
 
int X400mtMsgAddIntParam (struct X400mtMessage *mp, int paramtype, int value)
 Add integer-valued parameter to the message. More...
 
int X400mtMsgAddAttachment (struct X400mtMessage *mp, int type, const char *string, size_t length)
 Add an attachment to the message. More...
 
int X400mtMsgAddBodypart (struct X400mtMessage *mp, struct X400Bodypart *bp)
 Add a body part object to a message. More...
 
int X400mtMsgAddMessageBody (struct X400mtMessage *mp, struct X400Message *mbp)
 
int X400mtMsgAddMessageBodyWType (struct X400mtMessage *mp, struct X400Message *mbp, int type)
 Add a message body part object to a message. More...
 
int X400mtRecipNew (struct X400mtMessage *mp, int type, struct X400Recipient **rpp)
 Add new recipient to a message. More...
 
int X400mtRecipAddStrParam (struct X400Recipient *rp, int paramtype, const char *value, size_t length)
 Add string-valued parameter to the message. More...
 
int X400mtRecipAddIntParam (struct X400Recipient *rp, int paramtype, int value)
 Add integer-valued parameter to the message. More...
 
int X400mtWait (struct X400mtSession *sp, int seconds, int *count)
 Wait for messages to be transferred out. More...
 
int X400mtMsgGet (struct X400mtSession *sp, struct X400mtMessage **mpp, int *typep)
 Transfer message object out from MTA completely. More...
 
int X400mtMsgGetStart (struct X400mtSession *sp, struct X400mtMessage **mpp, int *typep)
 Get message object for transfer out from MTA. More...
 
int X400mtMsgGetFinish (struct X400mtMessage *mp, int status, int reason, int diag, const char *info)
 Finish transfer-out of message from MTA, generate DR if required. More...
 
int X400mtMsgGetStrParam (struct X400mtMessage *mp, int paramtype, char *buffer, size_t buflen, size_t *paramlenp)
 Return a string-valued parameter from the message object. More...
 
int X400mtMsgGetIntParam (struct X400mtMessage *mp, int paramtype, int *valp)
 Return a integer-valued parameter from the message object. More...
 
int X400mtMsgGetCriticality (struct X400mtMessage *mp, int attType, int *critp)
 Get the criticality value for a parameter which comes from an extension field within a message's envelope. Sets a *critp as a bitmask with X400_CRITICAL_NONE, X400_CRITICAL_SUBMISSION, X400_CRITICAL_TRANSFER, X400_CRITICAL_DELIVERY. More...
 
int X400mtMsgGetAttachment (struct X400mtMessage *mp, int number, int *typep, char *buffer, size_t buflen, size_t *lengthp)
 Return the data of an attachment (=bodypart) from the message object. More...
 
int X400mtMsgGetBodypart (struct X400mtMessage *mp, int number, int *typep, struct X400Bodypart **bpp)
 Return a pointer to a body part object. More...
 
int X400mtMsgGetMessageBody (struct X400mtMessage *mp, int number, struct X400Message **mpp)
 Return a pointer to a body part object. More...
 
int X400mtRecipGet (struct X400mtMessage *mp, int type, int number, struct X400Recipient **rpp)
 Get recipient object from message. More...
 
int X400mtRecipGetStrParam (struct X400Recipient *rp, int paramtype, char *buffer, size_t buflen, size_t *paramlenp)
 Return a string-valued parameter from the recipient object. More...
 
int X400mtRecipGetIntParam (struct X400Recipient *rp, int paramtype, int *valp)
 Return a integer-valued parameter from the recipient object. More...
 
int X400mtGetRecipCriticality (struct X400Recipient *rp, int attType, int *critp)
 Return the criticality associated with an extension attribute from a recipient Sets a *critp as a bitmask with X400_CRITICAL_NONE, X400_CRITICAL_SUBMISSION, X400_CRITICAL_TRANSFER, X400_CRITICAL_DELIVERY. More...
 
int X400mtDLExpHistGet (struct X400mtMessage *mp, int entry, struct X400DLExpHist **hist)
 Create a new DL Expansion History object from the message object. More...
 
int X400mtDLExpHistNew (struct X400mtMessage *mp, struct X400DLExpHist **histp)
 Create a new DL Expansion History object, and associate it with the existing message. More...
 
struct X400DLExpHist * X400mtDLExpHistDeepCopy (struct X400mtMessage *mp, struct X400DLExpHist *orig)
 Copy a new DL Expansion History object, and associate it with the a message. More...
 
int X400mtTraceInfoGet (struct X400mtMessage *mp, int entry, struct X400TraceInfo **info, int type)
 Get a Trace Info object for a message object. More...
 
int X400mtTraceInfoNew (struct X400mtMessage *mp, struct X400TraceInfo **info, int type)
 Create a new Trace Info object for a message object. More...
 
struct X400TraceInfo * X400mtTraceInfoDeepCopy (struct X400mtMessage *mp, struct X400TraceInfo *orig, int type)
 Copy a TraceInformation object, and associate it with the a message. More...
 
int X400mtInternalTraceInfoGet (struct X400mtMessage *mp, int entry, struct X400InternalTraceInfo **info)
 Get an Internal Trace Info object for a message object. More...
 
int X400mtInternalTraceInfoNew (struct X400mtMessage *mp, struct X400InternalTraceInfo **info)
 Create a new Internal Trace Info object for a message object. More...
 
struct X400InternalTraceInfo * X400mtInternalTraceInfoDeepCopy (struct X400mtMessage *mp, struct X400InternalTraceInfo *orig)
 Copy an InternalTraceInformation object, and associate it with the a message. More...
 
int X400mtALINew (struct X400mtMessage *mp, struct X400ALI **ali)
 Create a new Address List Indicator object for a message object. More...
 
struct X400ALI * X400mtALIDeepCopy (struct X400mtMessage *mp, struct X400ALI *orig)
 Copy an AddressListIndicator object, and associate it with the a message. More...
 
int X400mtALIGet (struct X400mtMessage *mp, int entry, struct X400ALI **ali)
 Get a new Address List Indicator object for a message object. More...
 
int X400mtPSSNew (struct X400mtMessage *mp, int type, struct X400PSS **pss)
 Create a new Printable String Syntax object for a message object. More...
 
struct X400PSS * X400mtPSSDeepCopy (struct X400mtMessage *mp, struct X400PSS *orig, int type)
 Copy a PrintableStringSequence object, and associate it with the a message. More...
 
int X400mtPSSGet (struct X400mtMessage *mp, int type, int entry, struct X400PSS **pss)
 Get a new Printable String Syntax object for a message object. More...
 
int X400mtDistFieldNew (struct X400mtMessage *mp, struct X400DistField **distfield)
 Create a new P772 Distribution Field object for a message object. More...
 
struct X400DistField * X400mtDistFieldDeepCopy (struct X400mtMessage *mp, struct X400DistField *orig)
 Copy a P772 DistributionField object, and associate it with the a message. More...
 
int X400mtDistFieldGet (struct X400mtMessage *mp, int entry, struct X400DistField **distfield)
 Get a new P772 Distribution Field object for a message object. More...
 
int X400mtOtherRecipNew (struct X400mtMessage *mp, struct X400OtherRecip **otherrecip)
 Create a new P772 Other Recipient object for a message object. More...
 
struct X400OtherRecip * X400mtOtherRecipDeepCopy (struct X400mtMessage *mp, struct X400OtherRecip *orig)
 Copy a P772 Other Recipient object, and associate it with the a message. More...
 
int X400mtOtherRecipGet (struct X400mtMessage *mp, int entry, struct X400OtherRecip **otherrecip)
 Get a new P772 Other Recipient object for a message object. More...
 
int X400mtRediHistGetEnv (struct X400mtMessage *msg, int entry, struct X400RediHist **hist)
 Get the Redirection History object from a message envelope this is represented by 8.3.1.2.1.5 in X.411. More...
 
int X400mtRediHistNewEnv (struct X400mtMessage *msg, struct X400RediHist **hist)
 Create a new Redirection History object for a message envelope this is represented by 8.3.1.2.1.5 in X.411. More...
 
struct X400RediHist * X400mtRediHistDeepCopyEnv (struct X400mtMessage *mp, struct X400RediHist *orig)
 Copy a Redirection History object, and associate it with the a message. More...
 
int X400mtORandDLNew (struct X400mtMessage *msg, struct X400ORandDL **or_and_dl)
 Create new Originator and DL expansion history object. More...
 
struct X400ORandDL * X400mtORandDLDeepCopy (struct X400mtMessage *mp, struct X400ORandDL *orig)
 Copy an Originator and DL Expansion History object, and associate it with the a message. More...
 
int X400mtORandDLGet (struct X400mtMessage *msg, int entry, struct X400ORandDL **or_and_dl)
 Get Originator and DL expansion history object. More...
 

Detailed Description

These function calls provide the X.400 Gateway API.

Function Documentation

◆ X400mtError()

const char* X400mtError ( int  error)

Return string for error code.

Parameters
error[in] error code
Returns
Pointer to NUL terminated string for error
Examples
examples/x400_mtrcv.c, examples/x400_mtsend.c, examples/x400_mtsend_rep.c, and examples/x400_mttutorial.c.

◆ X400mtOpen()

int X400mtOpen ( const char *  credentials,
struct X400mtSession **  spp 
)

Open a session to the MTA.

Parameters
credentials[in] String for the credentials for the session
spp[out] Pointer to receive pointer to opaque session data
Returns
zero on success or non-zero error code

Opens a session for transfer in and transfer out. The credentials string should be formatted as "channelname[/mtaname]".

Examples
examples/x400_mtrcv.c, examples/x400_mtsend.c, examples/x400_mtsend_rep.c, and examples/x400_mttutorial.c.

◆ X400mtClose()

int X400mtClose ( struct X400mtSession *  sp)

Close a X400 Session.

Parameters
sp[in] Pointer to session data
Returns
Zero on success or non-zero error code

Closes a session and deletes all resources associated with the session.

Examples
examples/x400_mtrcv.c, examples/x400_mtsend.c, examples/x400_mtsend_rep.c, and examples/x400_mttutorial.c.

◆ X400mtSetIntDefault()

int X400mtSetIntDefault ( struct X400mtSession *  sp,
int  paramtype,
int  value 
)

Set a default integer parameter value in a session.

Parameters
sp[in] Session handle returned from an X400mtOpen call
paramtype[in] Parameter type to set
value[in] Parameter value to set
Returns
zero on success or non-zero error code

Sets a default integer parameter value in a session object. If this parameter has previously been set in the session, the existing value is replaced. When a message is sent, any attribute which is not present in the message being sent will be taken from the session's default set.

Examples
examples/x400_mtrcv.c, and examples/x400_mtsend.c.

◆ X400mtSetStrDefault()

int X400mtSetStrDefault ( struct X400mtSession *  sp,
int  paramtype,
const char *  value,
size_t  length 
)

Set a default string parameter value in a session.

Parameters
sp[in] Session handle returned from an X400mtOpen call
paramtype[in] Parameter type to set
value[in] Parameter value to set
length[in] Length of parameter value to set
Returns
zero on success or non-zero error code

Sets a default string parameter value in a session object. If this parameter has previously been set in the session, the existing value is replaced. When a message is sent, any attribute which is not present in the message being sent will be taken from the session's default set.

Examples
examples/x400_mtrcv.c, examples/x400_mtsend.c, and examples/x400_mttutorial.c.

◆ X400mtMsgNew()

int X400mtMsgNew ( struct X400mtSession *  sp,
int  type,
struct X400mtMessage **  mpp 
)

Creates new message.

Parameters
sp[in] X400 session pointer
type[in] Type of message object
mpp[out] pointer to receive pointer to message object
Returns
zero on success or non-zero error code

Message types are

  • X400_MSG_MESSAGE A Message object
  • X400_MSG_REPORT A Report object
  • X400_MSG_PROBE A Probe object
Examples
examples/x400_mtsend.c, examples/x400_mtsend_rep.c, and examples/x400_mttutorial.c.

◆ X400mtMsgCountRecip()

int X400mtMsgCountRecip ( struct X400mtMessage *  mp,
int  type,
int *  cp 
)

Returns count of addresses of given type in message object.

Parameters
mp[in] X400 MT message
type[in] Type of address to count
cp[out] pointer integer to receive count of addresses
Returns
zero on success or non-zero error code

◆ X400mtMsgSend()

int X400mtMsgSend ( struct X400mtMessage *  mp)

Send message object to MTA.

Parameters
mp[in] Message pointer
Returns
Zero on success or non-zero error code
Examples
examples/x400_mtsend.c, examples/x400_mtsend_rep.c, and examples/x400_mttutorial.c.

◆ X400mtMsgDelete()

int X400mtMsgDelete ( struct X400mtMessage *  mp)

Delete message object.

Parameters
mp[in] Message pointer
Returns
Zero on success or non-zero error code

This is called after submitting a message object or to abandon submission.

Examples
examples/x400_mtrcv.c, examples/x400_mtsend.c, examples/x400_mtsend_rep.c, and examples/x400_mttutorial.c.

◆ X400mtMsgAddStrParam()

int X400mtMsgAddStrParam ( struct X400mtMessage *  mp,
int  paramtype,
const char *  value,
size_t  length 
)

Add string-valued parameter to the message.

Parameters
mp[in] Message pointer
paramtype[in] Type of parameter
value[in] Value of parameter
length[in] Length of parameter, -1 if NUL terminated
Returns
Zero on success or non-zero error code
Examples
examples/x400_mtsend.c, examples/x400_mtsend_rep.c, and examples/x400_mttutorial.c.

◆ X400mtMsgAddIntParam()

int X400mtMsgAddIntParam ( struct X400mtMessage *  mp,
int  paramtype,
int  value 
)

Add integer-valued parameter to the message.

Parameters
mp[in] Message pointer
paramtype[in] Type of parameter
value[in] Value of parameter
Returns
Zero on success or non-zero error code
Examples
examples/x400_mtsend.c, examples/x400_mtsend_rep.c, and examples/x400_mttutorial.c.

◆ X400mtMsgAddAttachment()

int X400mtMsgAddAttachment ( struct X400mtMessage *  mp,
int  type,
const char *  string,
size_t  length 
)

Add an attachment to the message.

Parameters
mp[in] Message pointer
type[in] Type of attachment
string[in] String value for attachment
length[in] Length of string
Returns
Zero on success or non-zero error code
Examples
examples/x400_mtsend.c.

◆ X400mtMsgAddBodypart()

int X400mtMsgAddBodypart ( struct X400mtMessage *  mp,
struct X400Bodypart *  bp 
)

Add a body part object to a message.

Parameters
mp[in] Message pointer
bp[in] Bodypart pointer
Returns
Zero on success or non-zero error code
Examples
examples/x400_mtsend.c.

◆ X400mtMsgAddMessageBody()

int X400mtMsgAddMessageBody ( struct X400mtMessage *  mp,
struct X400Message *  mbp 
)
Deprecated:
Use X400mtMsgAddMessageBodyWtype instead.
Examples
examples/x400_mtsend.c.

◆ X400mtMsgAddMessageBodyWType()

int X400mtMsgAddMessageBodyWType ( struct X400mtMessage *  mp,
struct X400Message *  mbp,
int  type 
)

Add a message body part object to a message.

Parameters
mp[in] Message pointer
mbp[in] Message body part pointer
type[in] BodyPart type (E.G X400_T_MESSAGE)
Returns
Zero on success or non-zero error code

The message body part must be a message delivery object for forwarded-message body part.

If the message object being created has an IPN content, then any envelope information is ignored.

Examples
examples/x400_mtsend.c.

◆ X400mtRecipNew()

int X400mtRecipNew ( struct X400mtMessage *  mp,
int  type,
struct X400Recipient **  rpp 
)

Add new recipient to a message.

Parameters
mp[in] Message pointer
type[in] type of recipient
rpp[out] Pointer to place for pointer to recipient information
Returns
Zero on success or non-zero error code

Creates a recipient object associated with the message. There are several different types for recipient object. Normal recipients can be specified separately for the envelope (i.e. controlling where the message actually goes) and the header which is part of the content. They can also be specified together. A separate type of recipient is the reported recipient which appears in a report content.

  • X400_RECIP_PRIMARY Primary recipient in header
  • X400_RECIP_CC Carbon copy recipient in header
  • X400_RECIP_BCC Blind copy recipient in header
  • X400_RECIP_REPLY Reply-recipient in header
  • X400_RECIP_ENVELOPE Actual recipient in envelope
  • X400_RECIP_REPORT Reported recipient in report content
  • X400_RECIP_INTENDED Originally intended recipient in report content
  • X400_ORIGINATOR Originator address in IPM header
  • X400_AUTH_ORIG Authorizing originator address in IPM header

To set a given recipient in both envelope and header, add together the values, e.g. X400_RECIP_PRIMARY + X400_RECIP_ENVELOPE. The value X400_RECIP_STANDARD is a shorthand for this combination.

Examples
examples/x400_mtsend.c, examples/x400_mtsend_rep.c, and examples/x400_mttutorial.c.

◆ X400mtRecipAddStrParam()

int X400mtRecipAddStrParam ( struct X400Recipient *  rp,
int  paramtype,
const char *  value,
size_t  length 
)

Add string-valued parameter to the message.

Parameters
rp[in] Recipient pointer
paramtype[in] Type of parameter
value[in] Value of parameter
length[in] Length of parameter, -1 if NUL terminated
Returns
Zero on success or non-zero error code
Examples
examples/x400_mtsend.c, examples/x400_mtsend_rep.c, and examples/x400_mttutorial.c.

◆ X400mtRecipAddIntParam()

int X400mtRecipAddIntParam ( struct X400Recipient *  rp,
int  paramtype,
int  value 
)

Add integer-valued parameter to the message.

Parameters
rp[in] Message pointer
paramtype[in] Type of parameter
value[in] Value of parameter
Returns
Zero on success or non-zero error code
Examples
examples/x400_mtsend.c, examples/x400_mtsend_rep.c, and examples/x400_mttutorial.c.

◆ X400mtWait()

int X400mtWait ( struct X400mtSession *  sp,
int  seconds,
int *  count 
)

Wait for messages to be transferred out.

Parameters
sp[in] Session pointer
seconds[in] Seconds to wait
count[out] pointer to receive number of messages
Returns
Zero on success, non-zero on failure, including timeout.
If seconds is zero, then there is no delay. If seconds is negative,
then the delay is indefinite.

◆ X400mtMsgGet()

int X400mtMsgGet ( struct X400mtSession *  sp,
struct X400mtMessage **  mpp,
int *  typep 
)

Transfer message object out from MTA completely.

Parameters
sp[in] Session pointer
mpp[out] Pointer to receive message object pointer
typep[out] Pointer to receive message object type.
Returns
Zero on success, non-zero on failure

◆ X400mtMsgGetStart()

int X400mtMsgGetStart ( struct X400mtSession *  sp,
struct X400mtMessage **  mpp,
int *  typep 
)

Get message object for transfer out from MTA.

Parameters
sp[in] Session pointer
mpp[out] Pointer to receive message object pointer
typep[out] Pointer to receive message object type.
Returns
Zero on success, non-zero on failure

Starts transfer-out of a message from the MTA. Returns a handle to a message, but does not aceept responsibilty for the message. Once the message has been processed by the gateway application, X400mtMsgGetFinish must be called to cause a delivery report to be generated if required, and to allow the MTA to release the message.

Examples
examples/x400_mtrcv.c, and examples/x400_mttutorial.c.

◆ X400mtMsgGetFinish()

int X400mtMsgGetFinish ( struct X400mtMessage *  mp,
int  status,
int  reason,
int  diag,
const char *  info 
)

Finish transfer-out of message from MTA, generate DR if required.

Parameters
mp[in] Message pointer
status[in] Status from gateway message handling.
reason[in] DR reason code. See standards for values
diag[in] DR diagnostic code. See standards for values
info[in] DR supplementary info.
Returns
Zero on success, non-zero on failure

Signals that the gateway application has completed its handling of the specified message.

If the 'x400_reports' key of the x400tailor file is set to "1" and "status" is specified as X400_E_NOERROR, a positive delivery report will be generated. If an error status is passed in, the DR reason and diagnostic codes and supplementary information will be used to generate a DR.

Under normal circumstances, gateway applications should generate their own delivery reports, and not rely on the ones generated by this function, as for example, when there's more than one recipient in the message, it cannot set a different status for each recipient.

Examples
examples/x400_mtrcv.c, and examples/x400_mttutorial.c.

◆ X400mtMsgGetStrParam()

int X400mtMsgGetStrParam ( struct X400mtMessage *  mp,
int  paramtype,
char *  buffer,
size_t  buflen,
size_t *  paramlenp 
)

Return a string-valued parameter from the message object.

Parameters
mp[in] message object pointer
paramtype[in] type of parameter
buffer[in/out] address for result
buflen[in] length of buffer provided
paramlenp[out] Pointer to receive actual length
Returns
Zero on success or non-zero error code
Examples
examples/x400_mtrcv.c, and examples/x400_mttutorial.c.

◆ X400mtMsgGetIntParam()

int X400mtMsgGetIntParam ( struct X400mtMessage *  mp,
int  paramtype,
int *  valp 
)

Return a integer-valued parameter from the message object.

Parameters
mp[in] message object pointer
paramtype[in] type of parameter
valp[out] Pointer to receive value
Returns
Zero on success or non-zero error code
Examples
examples/x400_mtrcv.c.

◆ X400mtMsgGetCriticality()

int X400mtMsgGetCriticality ( struct X400mtMessage *  mp,
int  attType,
int *  critp 
)

Get the criticality value for a parameter which comes from an extension field within a message's envelope. Sets a *critp as a bitmask with X400_CRITICAL_NONE, X400_CRITICAL_SUBMISSION, X400_CRITICAL_TRANSFER, X400_CRITICAL_DELIVERY.

Parameters
mp[in] message object pointer
attTyoe[in] Attribute type
critp[out] Pointer to receive criticality value
Returns
Zero on success or non-zero error code

◆ X400mtMsgGetAttachment()

int X400mtMsgGetAttachment ( struct X400mtMessage *  mp,
int  number,
int *  typep,
char *  buffer,
size_t  buflen,
size_t *  lengthp 
)

Return the data of an attachment (=bodypart) from the message object.

Parameters
mp[in] message object pointer
number[in] Attachment number
typep[out] Pointer to receive attachment type
buffer[in] Buffer to receive data
buflen[in] Length of buffer
lengthp[out] Length of string
Returns
Zero on success or non-zero error code

This is different from X400msMsgGetBodypart() in that only the data and not the bodypart itself is returned.

◆ X400mtMsgGetBodypart()

int X400mtMsgGetBodypart ( struct X400mtMessage *  mp,
int  number,
int *  typep,
struct X400Bodypart **  bpp 
)

Return a pointer to a body part object.

Parameters
mp[in] message object pointer
number[in] Bodypart number
typep[out] Pointer to receive attachment type
bpp[out] Pointer to pointer to object
Returns
Zero on success or non-zero error code
Examples
examples/x400_mtrcv.c.

◆ X400mtMsgGetMessageBody()

int X400mtMsgGetMessageBody ( struct X400mtMessage *  mp,
int  number,
struct X400Message **  mpp 
)

Return a pointer to a body part object.

Parameters
mp[in] message object pointer
number[in] Bodypart number
mpp[out] Pointer to pointer to object
Returns
Zero on success or non-zero error code
Examples
examples/x400_mtrcv.c.

◆ X400mtRecipGet()

int X400mtRecipGet ( struct X400mtMessage *  mp,
int  type,
int  number,
struct X400Recipient **  rpp 
)

Get recipient object from message.

Parameters
mp[in] Message object pointer
type[in] Type of recipient
number[in] Ordinal number of recipient
rpp[out] Pointer to receive recipient object pointer
Returns
Zero on success, non-zero on failure
Examples
examples/x400_mtrcv.c, and examples/x400_mttutorial.c.

◆ X400mtRecipGetStrParam()

int X400mtRecipGetStrParam ( struct X400Recipient *  rp,
int  paramtype,
char *  buffer,
size_t  buflen,
size_t *  paramlenp 
)

Return a string-valued parameter from the recipient object.

Parameters
rp[in] recipient object pointer
paramtype[in] type of parameter
buffer[in/out] address for result
buflen[in] length of buffer provided
paramlenp[out] Pointer to receive actual length
Returns
Zero on success or non-zero error code
Examples
examples/x400_mtrcv.c, and examples/x400_mttutorial.c.

◆ X400mtRecipGetIntParam()

int X400mtRecipGetIntParam ( struct X400Recipient *  rp,
int  paramtype,
int *  valp 
)

Return a integer-valued parameter from the recipient object.

Parameters
rp[in] recipient object pointer
paramtype[in] type of parameter
valp[out] Pointer to receive value
Returns
Zero on success or non-zero error code
Examples
examples/x400_mtrcv.c.

◆ X400mtGetRecipCriticality()

int X400mtGetRecipCriticality ( struct X400Recipient *  rp,
int  attType,
int *  critp 
)

Return the criticality associated with an extension attribute from a recipient Sets a *critp as a bitmask with X400_CRITICAL_NONE, X400_CRITICAL_SUBMISSION, X400_CRITICAL_TRANSFER, X400_CRITICAL_DELIVERY.

Parameters
rp[in] recipient object pointer
attTyoe[in] Attribute type
critp[out] Pointer to receive criticality value
Returns
Zero on success or non-zero error code

◆ X400mtDLExpHistGet()

int X400mtDLExpHistGet ( struct X400mtMessage *  mp,
int  entry,
struct X400DLExpHist **  hist 
)

Create a new DL Expansion History object from the message object.

Parameters
mp[in] message object pointer
entry[in] DL expansion history element to fetch
hist[out] pointer to receive new DL Expansion History object
Returns
Zero on success, or non-zero error code
Examples
examples/x400_mtrcv.c.

◆ X400mtDLExpHistNew()

int X400mtDLExpHistNew ( struct X400mtMessage *  mp,
struct X400DLExpHist **  histp 
)

Create a new DL Expansion History object, and associate it with the existing message.

Parameters
mp[in] message pointer
histp[out] pointer to receive new DL Expansion History object
Returns
Zero on success, or non-zero error code
Examples
examples/x400_mtsend.c.

◆ X400mtDLExpHistDeepCopy()

struct X400DLExpHist* X400mtDLExpHistDeepCopy ( struct X400mtMessage *  mp,
struct X400DLExpHist *  orig 
)

Copy a new DL Expansion History object, and associate it with the a message.

Parameters
mp[in] message pointer
orig[in] original DL Expansion History object to copy
Returns
new DLExpHist object on success, or NULL on error

◆ X400mtTraceInfoGet()

int X400mtTraceInfoGet ( struct X400mtMessage *  mp,
int  entry,
struct X400TraceInfo **  info,
int  type 
)

Get a Trace Info object for a message object.

Parameters
mp[in] message pointer
entry[in] Trace Info object to use
info[out] pointer to receive new trace infomation object
type[in] type of trace info object to get
Returns
Zero on success, or non-zero error code
Examples
examples/x400_mtrcv.c.

◆ X400mtTraceInfoNew()

int X400mtTraceInfoNew ( struct X400mtMessage *  mp,
struct X400TraceInfo **  info,
int  type 
)

Create a new Trace Info object for a message object.

Parameters
mp[in] message pointer
info[out] pointer to receive new trace infomation object
type[in] type of trace info object to create
Returns
Zero on success, or non-zero error code
Examples
examples/x400_mtsend.c, and examples/x400_mtsend_rep.c.

◆ X400mtTraceInfoDeepCopy()

struct X400TraceInfo* X400mtTraceInfoDeepCopy ( struct X400mtMessage *  mp,
struct X400TraceInfo *  orig,
int  type 
)

Copy a TraceInformation object, and associate it with the a message.

Parameters
mp[in] message pointer
orig[in] original TraceInfo object to copy
type[in] type of trace info object to create
Returns
new TraceInfo object on success, or NULL on error

◆ X400mtInternalTraceInfoGet()

int X400mtInternalTraceInfoGet ( struct X400mtMessage *  mp,
int  entry,
struct X400InternalTraceInfo **  info 
)

Get an Internal Trace Info object for a message object.

Parameters
mp[in] message pointer
entry[in] Trace Info object to use
info[out] pointer to receive new trace infomation object
Returns
Zero on success, or non-zero error code
Examples
examples/x400_mtrcv.c.

◆ X400mtInternalTraceInfoNew()

int X400mtInternalTraceInfoNew ( struct X400mtMessage *  mp,
struct X400InternalTraceInfo **  info 
)

Create a new Internal Trace Info object for a message object.

Parameters
mp[in] message pointer
info[out] pointer to receive new trace infomation object
Returns
Zero on success, or non-zero error code
Examples
examples/x400_mtsend.c.

◆ X400mtInternalTraceInfoDeepCopy()

struct X400InternalTraceInfo* X400mtInternalTraceInfoDeepCopy ( struct X400mtMessage *  mp,
struct X400InternalTraceInfo *  orig 
)

Copy an InternalTraceInformation object, and associate it with the a message.

Parameters
mp[in] message pointer
orig[in] original InternalTraceInfo object to copy
Returns
new InternalTraceInfo object on success, or NULL on error

◆ X400mtALINew()

int X400mtALINew ( struct X400mtMessage *  mp,
struct X400ALI **  ali 
)

Create a new Address List Indicator object for a message object.

Parameters
mp[in] message pointer
ali[out] pointer to receive ALI object
Returns
Zero on success, or non-zero error code
Examples
examples/x400_mtsend.c.

◆ X400mtALIDeepCopy()

struct X400ALI* X400mtALIDeepCopy ( struct X400mtMessage *  mp,
struct X400ALI *  orig 
)

Copy an AddressListIndicator object, and associate it with the a message.

Parameters
mp[in] message pointer
orig[in] original AddressListIndicator object to copy
Returns
new AddressListIndicator object on success, or NULL on error

◆ X400mtALIGet()

int X400mtALIGet ( struct X400mtMessage *  mp,
int  entry,
struct X400ALI **  ali 
)

Get a new Address List Indicator object for a message object.

Parameters
mp[in] message pointer
entry[in] ALI object being used.
ali[out] pointer to receive new ALI object
Returns
Zero on success, or non-zero error code
Examples
examples/x400_mtrcv.c.

◆ X400mtPSSNew()

int X400mtPSSNew ( struct X400mtMessage *  mp,
int  type,
struct X400PSS **  pss 
)

Create a new Printable String Syntax object for a message object.

Parameters
mp[in] message pointer
type[in] type of PSS being used.
pss[out] pointer to receive pss object
Returns
Zero on success, or non-zero error code
Examples
examples/x400_mtsend.c.

◆ X400mtPSSDeepCopy()

struct X400PSS* X400mtPSSDeepCopy ( struct X400mtMessage *  mp,
struct X400PSS *  orig,
int  type 
)

Copy a PrintableStringSequence object, and associate it with the a message.

Parameters
mp[in] message pointer
orig[in] original PrintableStringSyntax object to copy
type[in] type of PSS being used.
Returns
new PrintableStringSequence object on success, or NULL on error

◆ X400mtPSSGet()

int X400mtPSSGet ( struct X400mtMessage *  mp,
int  type,
int  entry,
struct X400PSS **  pss 
)

Get a new Printable String Syntax object for a message object.

Parameters
mp[in] message pointer
type[in] type of PSS being used.
entry[in] PSS object being used.
pss[out] pointer to receive new PSS object
Returns
Zero on success, or non-zero error code
Examples
examples/x400_mtrcv.c.

◆ X400mtDistFieldNew()

int X400mtDistFieldNew ( struct X400mtMessage *  mp,
struct X400DistField **  distfield 
)

Create a new P772 Distribution Field object for a message object.

Parameters
mp[in] message pointer
distfield[out] pointer to receive distfield object
Returns
Zero on success, or non-zero error code
Examples
examples/x400_mtsend.c.

◆ X400mtDistFieldDeepCopy()

struct X400DistField* X400mtDistFieldDeepCopy ( struct X400mtMessage *  mp,
struct X400DistField *  orig 
)

Copy a P772 DistributionField object, and associate it with the a message.

Parameters
mp[in] message pointer
orig[in] original object to copy
Returns
new DistributionField object on success, or NULL on error

◆ X400mtDistFieldGet()

int X400mtDistFieldGet ( struct X400mtMessage *  mp,
int  entry,
struct X400DistField **  distfield 
)

Get a new P772 Distribution Field object for a message object.

Parameters
mp[in] message pointer
entry[in] distfield object being used.
distfield[out] pointer to receive new PSS object
Returns
Zero on success, or non-zero error code
Examples
examples/x400_mtrcv.c.

◆ X400mtOtherRecipNew()

int X400mtOtherRecipNew ( struct X400mtMessage *  mp,
struct X400OtherRecip **  otherrecip 
)

Create a new P772 Other Recipient object for a message object.

Parameters
mp[in] message pointer
otherrecip[out] pointer to receive other recipient object
Returns
Zero on success, or non-zero error code
Examples
examples/x400_mtsend.c.

◆ X400mtOtherRecipDeepCopy()

struct X400OtherRecip* X400mtOtherRecipDeepCopy ( struct X400mtMessage *  mp,
struct X400OtherRecip *  orig 
)

Copy a P772 Other Recipient object, and associate it with the a message.

Parameters
mp[in] message pointer
orig[in] original object to copy
Returns
new OtherRecipient object on success, or NULL on error

◆ X400mtOtherRecipGet()

int X400mtOtherRecipGet ( struct X400mtMessage *  mp,
int  entry,
struct X400OtherRecip **  otherrecip 
)

Get a new P772 Other Recipient object for a message object.

Parameters
mp[in] message pointer
entry[in] Other Recip object being used.
otherrecip[out] pointer to receive new other recipient object
Returns
Zero on success, or non-zero error code
Examples
examples/x400_mtrcv.c.

◆ X400mtRediHistGetEnv()

int X400mtRediHistGetEnv ( struct X400mtMessage *  msg,
int  entry,
struct X400RediHist **  hist 
)

Get the Redirection History object from a message envelope this is represented by 8.3.1.2.1.5 in X.411.

Parameters
msg[in] X.400 Message
entry[in] Redirection history object to use
hist[out] Pointer to redirection history object
Returns
Zero on success or non-zero error code
Examples
examples/x400_mtrcv.c.

◆ X400mtRediHistNewEnv()

int X400mtRediHistNewEnv ( struct X400mtMessage *  msg,
struct X400RediHist **  hist 
)

Create a new Redirection History object for a message envelope this is represented by 8.3.1.2.1.5 in X.411.

Parameters
msg[in] X.400 Redirection history
hist[out] Pointer to redirection history object
Returns
Zero on success or non-zero error code
Examples
examples/x400_mtsend_rep.c.

◆ X400mtRediHistDeepCopyEnv()

struct X400RediHist* X400mtRediHistDeepCopyEnv ( struct X400mtMessage *  mp,
struct X400RediHist *  orig 
)

Copy a Redirection History object, and associate it with the a message.

Parameters
mp[in] message pointer
orig[in] original object to copy
Returns
new redirection History object on success, or NULL on error

◆ X400mtORandDLNew()

int X400mtORandDLNew ( struct X400mtMessage *  msg,
struct X400ORandDL **  or_and_dl 
)

Create new Originator and DL expansion history object.

Parameters
msg[in] X.400 Originator and DL expansion history object
or_and_dl[out] Pointer to Originator and DL expansion history object
Returns
Zero on success or non-zero error code
Examples
examples/x400_mtsend_rep.c.

◆ X400mtORandDLDeepCopy()

struct X400ORandDL* X400mtORandDLDeepCopy ( struct X400mtMessage *  mp,
struct X400ORandDL *  orig 
)

Copy an Originator and DL Expansion History object, and associate it with the a message.

Parameters
mp[in] message pointer
orig[in] original object to copy
Returns
new object on success, or NULL on error

◆ X400mtORandDLGet()

int X400mtORandDLGet ( struct X400mtMessage *  msg,
int  entry,
struct X400ORandDL **  or_and_dl 
)

Get Originator and DL expansion history object.

Parameters
msg[in] X.400 Message
entry[in] The originator and dl expansion history object to use
or_and_dl[out] Pointer to orig ans dl expan history object
Returns
Zero on success or non-zero error code
Examples
examples/x400_mtrcv.c.

All rights reserved © 2002 - 2024 Isode Ltd.