| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Modules | |
| Session Types | |
| Event Types | |
| Message Store Entry Classes | |
| Error codes for passing into X400msMsgGetFinish | |
Typedefs | |
| typedef void | X400msConnEstablishedCb (struct X400msSession *session, int errorcode, int alert) |
| A callback which will be invoked when a P7 bind completes asynchronously, whether the completion is successful or unsuccessful. | |
| typedef void | X400msConnDroppedCb (struct X400msSession *session, int reason_code, char *diagnostic) |
| A callback which will be invoked when a P7 connection is lost. | |
| typedef void | X400msMsgSubmittedCb (struct X400msSession *session, struct X400msMessage *message, int errorcode) |
| A callback which will be invoked when a P7 Submission operation completes asynchronously, whether the completion is successful or unsuccessful. | |
| typedef void | X400msMsgFetchedCb (struct X400msSession *session, struct X400msMessage *message, int type, int seqno, int errorcode) |
| A callback which will be invoked when a P7 Fetch operation completes asynchronously, whether the completion is successful or unsuccessful. | |
| typedef void | X400msMsgDeletedCb (struct X400msSession *session, int seqno, int errorcode) |
| A callback which will be invoked when a P7 Delete operation completes asynchronously, whether the completion is successful or unsuccessful. | |
| typedef void | X400msMsgWaitingCb (struct X400msSession *session, int num_messages_waiting, int errorcode) |
| A callback which will be invoked when a P7 Summarize operation (invoked via X400msWait) completes asynchronously, whether the completion is successful or unsuccessful. | |
| typedef void | X400msListCb (struct X400msSession *session, struct X400msListResult *lrp, int errorcode) |
| A callback which will be invoked when a P7 List operation completes asynchronously, whether the completion is successful or unsuccessful. | |
| typedef void | X400msRegisterCb (struct X400msSession *session, int errorcode) |
| A callback which will be invoked when a P7 Register operation completes asynchronously, whether the completion is successful or unsuccessful. | |
| typedef void | X400msAlertCb (struct X400msSession *session) |
| A callback which will be invoked when a P7 Alert invoke is received. | |
| typedef int | X400msManageCb (struct X400msSession *session, int fd, int event_mask) |
| A callback which will be invoked when a particular file descriptor either needs to be monitored for a given set of event types, or no longer needs to be monitored for the specified event types. | |
Functions | |
| const char * | X400msError (int error) |
| Obtain a string describing the meaning of the given error code. | |
| int | X400msOpenAsync (int type, const char *oraddr, const char *dirname, const char *credentials, const char *pa, const char *ret_psw, X400msConnEstablishedCb *conupcb, X400msConnDroppedCb *condowncb, X400msMsgSubmittedCb *msgsubcb, X400msMsgFetchedCb *msgfetchcb, X400msMsgDeletedCb *msgdelcb, X400msMsgWaitingCb *msgwaitcb, X400msListCb *listcb, X400msRegisterCb *registercb, X400msAlertCb *alertcb, X400msManageCb *managecb, X400msManageCb *unmanagecb, struct X400msSession **spp) |
| Initiate an asynchronous opening of a session to a Message Store (P7). | |
| int | X400msOpenAsyncSession (struct X400msSession *sp, const char *addr, const char *dn, const char *credentials, const char *pa, const char *ret_psw, X400msConnEstablishedCb *conupcb, X400msConnDroppedCb *condowncb, X400msMsgSubmittedCb *msgsubcb, X400msMsgFetchedCb *msgfetchcb, X400msMsgDeletedCb *msgdelcb, X400msMsgWaitingCb *msgwaitcb, X400msListCb *listcb, X400msRegisterCb *registercb, X400msAlertCb *alertcb, X400msManageCb *managecb, X400msManageCb *unmanagecb) |
| Initiate an asynchronous opening of a session to a Message Store (P7) using an existing session object. | |
| X400msSession * | X400msNewAsyncSession (int type) |
| Create a new X400msSession object of the specified type. | |
| int | X400msGetHandle (struct X400msSession *session) |
| Get a handle suitable for use in a call to select(). | |
| void | X400msSetUserPointer (struct X400msSession *session, void *ptr) |
| Set a user pointer value in a session object. | |
| void * | X400msGetUserPointer (struct X400msSession *session) |
| Get a user pointer value from a session object. | |
| int | X400msOpen (int type, const char *oraddr, const char *dirname, const char *credentials, const char *pa, int *messages, struct X400msSession **spp) |
| Open a session to a Message Store (P7) or MTA (P3) in synchronous mode. | |
| int | X400msOpenCheck (int type, const char *oraddr, const char *dirname, const char *credentials, const char *pa, const char *ret_psw, int *messages, struct X400msSession **spp) |
| Open a session to a Message Store (P7) or MTA (P3) in synchronous mode, checking the password which the Message Store or MTA returns. | |
| void | X400msSetConfigRequest (int val) |
| Disable and enable configuration requests in MS Bind operations. | |
| int | X400msClose (struct X400msSession *sp) |
| Close a X400 Session. | |
| int | X400msList (struct X400msSession *sp, char *since_time, struct X400msListResult **lrp) |
| List messages in the P7 Message Store. | |
| int | X400msListEx (struct X400msSession *sp, char *since_time, int entryclass, struct X400msListResult **lrp) |
| List messages in the P7 Message Store, specifying entryclass. | |
| int | X400msListExAux (struct X400msSession *sp, char *since_time, int entryclass, int entrystatus, struct X400msListResult **lrp) |
| List messages in the P7 Message Store, specifying entryclass and entrystatus. | |
| int | X400msListGetIntParam (struct X400msListResult *lr, int paramtype, int number, int *valp) |
| Get an integer attribute value from an element of a ListResult. | |
| int | X400msListGetStrParam (struct X400msListResult *lr, int paramtype, int number, char *buffer, size_t buflen, size_t *paramlenp) |
| Get a string attribute value from an element of a ListResult. | |
| void | X400msListFree (struct X400msListResult *lr) |
| Free the memory occupied by a ListResult. | |
| int | X400msMsgNew (struct X400msSession *sp, int type, struct X400msMessage **mpp) |
| Creates new message. | |
| int | X400msMsgCountRecip (struct X400msMessage *mp, int type, int *cp) |
| Returns count of addresses of given type in message object. | |
| int | X400msMsgSend (struct X400msMessage *mp) |
| Send message object. | |
| int | X400msMsgDelete (struct X400msMessage *mp, int retain) |
| Delete message object. | |
| int | X400msMsgAddStrParam (struct X400msMessage *mp, int paramtype, const char *value, size_t length) |
| Add string-valued parameter to the message. | |
| int | X400msMsgAddIntParam (struct X400msMessage *mp, int paramtype, int value) |
| Add integer-valued parameter to the message. | |
| int | X400msMsgAddAttachment (struct X400msMessage *mp, int type, const char *string, size_t length) |
| Add attachment to the message. | |
| int | X400msMsgAddBodypart (struct X400msMessage *mp, struct X400Bodypart *bp) |
| Add a body part object to a message. | |
| int | X400msMsgAddMessageBodyWType (struct X400msMessage *mp, struct X400Message *mbp, int type) |
| Add a message body part object to a message. | |
| int | X400msMsgAddMessageBody (struct X400msMessage *mp, struct X400Message *mbp) |
| int | X400msRecipNew (struct X400msMessage *mp, int type, struct X400Recipient **rpp) |
| Add new recipient to a message. | |
| int | X400msRecipAddStrParam (struct X400Recipient *rp, int paramtype, const char *value, size_t length) |
| Add string-valued parameter to the message. | |
| int | X400msRecipAddIntParam (struct X400Recipient *rp, int paramtype, int value) |
| Add integer-valued parameter to the message. | |
| int | X400msWait (struct X400msSession *sp, int seconds, int *count) |
| Wait for messages to be ready to be read. | |
| int | X400msWaitNew (struct X400msSession *sp, int seconds, int *count) |
| Wait for new messages to be ready to be read. | |
| int | X400msMsgGet (struct X400msSession *sp, int number, struct X400msMessage **mpp, int *typep, int *seqp) |
| Get message object for transfer out from MTA. | |
| int | X400msMsgGetEx (struct X400msSession *sp, int number, int entryclass, struct X400msMessage **mpp, int *typep, int *seqp) |
| Get message object for transfer out from MTA. | |
| int | X400msMsgGetStart (struct X400msSession *sp, int number, struct X400msMessage **mpp, int *typep, int *seqp) |
| Get message object for transfer out from MTA. | |
| int | X400msMsgGetStartEx (struct X400msSession *sp, int number, int entryclass, struct X400msMessage **mpp, int *typep, int *seqp) |
| Get message object for transfer out from MTA. | |
| int | X400msMsgGetFinish (struct X400msMessage *mp, int errnum, int problem) |
| Generate delivery result or error for a message. | |
| int | X400msMsgGetStrParam (struct X400msMessage *mp, int paramtype, char *buffer, size_t buflen, size_t *paramlenp) |
| Return a string-valued parameter from the message object. | |
| int | X400msMsgGetIntParam (struct X400msMessage *mp, int paramtype, int *valp) |
| Return a integer-valued parameter from the message object. | |
| int | X400msMsgGetAttachment (struct X400msMessage *mp, int number, int *typep, char *buffer, size_t buflen, size_t *lengthp) |
| Return a integer-valued parameter from the message object. | |
| int | X400msMsgGetBodypart (struct X400msMessage *mp, int number, int *typep, struct X400Bodypart **bpp) |
| Return a pointer to a body part object. | |
| int | X400msMsgGetMessageBody (struct X400msMessage *mp, int number, struct X400Message **mpp) |
| Return a pointer to a message part object. | |
| int | X400msMakeIPN (struct X400msMessage *mp, int non_receipt_reason, struct X400msMessage **mpp) |
| Get recipient object from message. | |
| int | X400msRecipGet (struct X400msMessage *mp, int type, int number, struct X400Recipient **rpp) |
| Get recipient object from message. | |
| int | X400msRecipGetStrParam (struct X400Recipient *rp, int paramtype, char *buffer, size_t buflen, size_t *paramlenp) |
| Return a string-valued parameter from the recipient object. | |
| int | X400msRecipGetIntParam (struct X400Recipient *rp, int paramtype, int *valp) |
| Return a integer-valued parameter from the recipient object. | |
| int | X400msSetIntDefault (struct X400msSession *sp, int paramtype, int value) |
| Set a default integer parameter value in a session. | |
| int | X400msSetStrDefault (struct X400msSession *sp, int paramtype, const char *value, size_t length) |
| Set a default string parameter value in a session. | |
| int | X400msRegisterAutoAction (struct X400msSession *sp, int type, int id, struct X400msAutoActionParameter *aa_param) |
| Register an autoaction with the Message Store. | |
| int | X400msDeregisterAutoAction (struct X400msSession *sp, int type, int id) |
| Deregister an autoaction from the Message Store. | |
| X400msAutoActionParameter * | X400msNewAutoActionParameter (void) |
| Create a new (empty) autoaction parameter structure. | |
| void | X400msFreeAutoActionParameter (struct X400msAutoActionParameter *aa_param) |
| Free an autoaction parameter. | |
| int | X400msAutoActionParameterAddRecip (struct X400msAutoActionParameter *aap, int reciptype, struct X400Recipient *recip) |
| Add a receipient to the autoaction parameter. | |
| int | X400msAutoActionParameterAddIntParam (struct X400msAutoActionParameter *aap, int paramtype, int value) |
| Add integer-valued parameter to the autoaction parameter. | |
| int | X400msAutoActionParameterAddStrParam (struct X400msAutoActionParameter *aap, int paramtype, const char *value, size_t length) |
| Add string-valued parameter to the autoaction parameter. | |
| int | X400msDLExpHistGet (struct X400msMessage *mp, int entry, struct X400DLExpHist **hist) |
| Create a new DL Expansion History object from the message object. | |
| int | X400msDLExpHistNew (struct X400msMessage *mp, struct X400DLExpHist **histp) |
| Create a new DL Expansion History object, and associate it with the existing message. | |
| int | X400msALINew (struct X400msMessage *mp, struct X400ALI **ali) |
| Create a new Address List Indicator Object, and associate it with the existing message. | |
| int | X400msALIGet (struct X400msMessage *mp, int entry, struct X400ALI **info) |
| Get a Address List Indicator Object for a message object. | |
| int | X400msPSSNew (struct X400msMessage *mp, struct X400PSS **pss, int type) |
| Create a new Printable String Syntax Object, and associate it with the existing message. | |
| int | X400msPSSGet (struct X400msMessage *mp, int type, int entry, struct X400PSS **pss) |
| Get a Printable String Syntax Object for a message object. | |
| int | X400msDistFieldNew (struct X400msMessage *mp, struct X400DistField **pss) |
| Create a new P772 Distribution Field object for a message object. | |
| int | X400msDistFieldGet (struct X400msMessage *mp, int entry, struct X400DistField **pss) |
| Get a new P772 Distribution Field object for a message object. | |
| int | X400msOtherRecipNew (struct X400msMessage *mp, struct X400OtherRecip **otherrecip) |
| Create a new P772 Other Recipient object for a message object. | |
| int | X400msOtherRecipGet (struct X400msMessage *mp, int entry, struct X400OtherRecip **otherrecip) |
| Get a new P772 Other Recipient object for a message object. | |
| int | X400msRediHistGetEnv (struct X400msMessage *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. | |
| int | X400msTraceInfoGet (struct X400msMessage *mp, int entry, struct X400TraceInfo **info, int type) |
| Get a Trace Info object for a message object. | |
| int | X400msInternalTraceInfoGet (struct X400msMessage *mp, int entry, struct X400InternalTraceInfo **info) |
| Get an Internal Trace Info object for a message object. | |
| int | X400msORandDLGet (struct X400msMessage *msg, int entry, struct X400ORandDL **or_and_dl) |
| Get Originator and DL expansion history object. | |
| typedef void X400msConnEstablishedCb(struct X400msSession *session, int errorcode, int alert) |
A callback which will be invoked when a P7 bind completes asynchronously, whether the completion is successful or unsuccessful.
| session | [in] Session to which callback applies | |
| errorcode | [in] Indicates success or failure of connection attempt | |
| alert | [in] Set for alert indication |
Definition at line 358 of file x400_msapi.h.
| typedef void X400msConnDroppedCb(struct X400msSession *session, int reason_code, char *diagnostic) |
A callback which will be invoked when a P7 connection is lost.
| session | [in] Session to which callback applies | |
| reason_code | [in] Reason for connection loss | |
| diagnostic | [in] Diagnostic text |
Definition at line 368 of file x400_msapi.h.
| typedef void X400msMsgSubmittedCb(struct X400msSession *session, struct X400msMessage *message, int errorcode) |
A callback which will be invoked when a P7 Submission operation completes asynchronously, whether the completion is successful or unsuccessful.
| session | [in] Session to which callback applies | |
| message | [in] On success, gives message submission result attributes | |
| errorcode | [in] Indicates success or failure of submission |
Definition at line 380 of file x400_msapi.h.
| typedef void X400msMsgFetchedCb(struct X400msSession *session, struct X400msMessage *message, int type, int seqno, int errorcode) |
A callback which will be invoked when a P7 Fetch operation completes asynchronously, whether the completion is successful or unsuccessful.
| session | [in] Session to which callback applies | |
| message | [in] On success, message which has been fetched | |
| type | [in] On success, message type | |
| seqno | [in] On success, message sequence number | |
| errorcode | [in] Indicates success or failure of fetch operation |
Definition at line 394 of file x400_msapi.h.
| typedef void X400msMsgDeletedCb(struct X400msSession *session, int seqno, int errorcode) |
A callback which will be invoked when a P7 Delete operation completes asynchronously, whether the completion is successful or unsuccessful.
| session | [in] Session to which callback applies | |
| errorcode | [in] Indicates success or failure of delete operation |
Definition at line 407 of file x400_msapi.h.
| typedef void X400msMsgWaitingCb(struct X400msSession *session, int num_messages_waiting, int errorcode) |
A callback which will be invoked when a P7 Summarize operation (invoked via X400msWait) completes asynchronously, whether the completion is successful or unsuccessful.
| session | [in] Session to which callback applies | |
| num_messages_waiting | [in] Number of messages waiting | |
| errorcode | [in] Indicates success or failure of summarize operation |
Definition at line 419 of file x400_msapi.h.
| typedef void X400msListCb(struct X400msSession *session, struct X400msListResult *lrp, int errorcode) |
A callback which will be invoked when a P7 List operation completes asynchronously, whether the completion is successful or unsuccessful.
| session | [in] Session to which callback applies | |
| lrp | [in] List result pointer on success | |
| errorcode | [in] Indicates success or failure of list operation |
Definition at line 431 of file x400_msapi.h.
| typedef void X400msRegisterCb(struct X400msSession *session, int errorcode) |
A callback which will be invoked when a P7 Register operation completes asynchronously, whether the completion is successful or unsuccessful.
| session | [in] Session to which callback applies | |
| errorcode | [in] Indicates success or failure of register operation |
Definition at line 442 of file x400_msapi.h.
| typedef void X400msAlertCb(struct X400msSession *session) |
A callback which will be invoked when a P7 Alert invoke is received.
| session | [in] Session to which callback applies |
Definition at line 450 of file x400_msapi.h.
| typedef int X400msManageCb(struct X400msSession *session, int fd, int event_mask) |
A callback which will be invoked when a particular file descriptor either needs to be monitored for a given set of event types, or no longer needs to be monitored for the specified event types.
| session | [in] Session to which callback applies | |
| fd | [in] File descriptor to which the callback applies | |
| event_mask | [in] The set of events which need to be managed or can now be ignored. |
Definition at line 500 of file x400_msapi.h.
| const char* X400msError | ( | int | error | ) |
Obtain a string describing the meaning of the given error code.
| error | [in] error code |
| int X400msOpenAsync | ( | int | type, | |
| const char * | oraddr, | |||
| const char * | dirname, | |||
| const char * | credentials, | |||
| const char * | pa, | |||
| const char * | ret_psw, | |||
| X400msConnEstablishedCb * | conupcb, | |||
| X400msConnDroppedCb * | condowncb, | |||
| X400msMsgSubmittedCb * | msgsubcb, | |||
| X400msMsgFetchedCb * | msgfetchcb, | |||
| X400msMsgDeletedCb * | msgdelcb, | |||
| X400msMsgWaitingCb * | msgwaitcb, | |||
| X400msListCb * | listcb, | |||
| X400msRegisterCb * | registercb, | |||
| X400msAlertCb * | alertcb, | |||
| X400msManageCb * | managecb, | |||
| X400msManageCb * | unmanagecb, | |||
| struct X400msSession ** | spp | |||
| ) |
Initiate an asynchronous opening of a session to a Message Store (P7).
| type | [in] Connection type: X400_TYPE_MS, X400_TYPE_MTA_SUBMIT or X400_TYPE_MTA_BOTH | |
| oraddr | [in] String encoding of OR-Address to use when binding | |
| dirname | [in] String encoding of Directory name to use when binding | |
| credentials | [in] String giving the credentials for the session | |
| pa | [in] String encoding of MS or Presentation Address to contact. | |
| ret_psw | [in] String giving the expected password from the MS or MTA | |
| conupcb | [in] Function to be called when connection is open | |
| condowncb | [in] Function to be called when connection is lost | |
| msgsubcb | [in] Function to be called when submission completes | |
| msgfetchcb | [in] Function to be called when fetch completes | |
| msgdelcb | [in] Function to be called when delete completes | |
| msgwaitcb | [in] Function to be called when wait completes | |
| listcb | [in] Function to be called when list completes | |
| registercb | [in] Function to be called when register completes | |
| alertcb | [in] Function to be called when alert occurs | |
| managecb | [in] Function to be called when an event type needs to be handled | |
| unmanagecb | [in] Function to be called when an event type does not need to be handled | |
| spp | [out] Pointer to receive pointer to opaque session data |
The function will return X400_E_WAIT_WRITE, indicating that the client application need to wait for the file descriptor associated with the X400msSession object to become writeable. At this point, X400msProcessEvent needs to be called to handle the 'write' event (which actually indicates that the network-level connection has been established). X400msProcessEvent will then return X400_E_WAIT_READ, to indicate that the application needs to wait for the file descriptor to become readable before calling X400msProcessEvent again. The application will need to call X400msProcessEvent multiple times before the association becomes open - at this point the "X400msConnEstablishedCb" callback will be invoked.
| int X400msOpenAsyncSession | ( | struct X400msSession * | sp, | |
| const char * | addr, | |||
| const char * | dn, | |||
| const char * | credentials, | |||
| const char * | pa, | |||
| const char * | ret_psw, | |||
| X400msConnEstablishedCb * | conupcb, | |||
| X400msConnDroppedCb * | condowncb, | |||
| X400msMsgSubmittedCb * | msgsubcb, | |||
| X400msMsgFetchedCb * | msgfetchcb, | |||
| X400msMsgDeletedCb * | msgdelcb, | |||
| X400msMsgWaitingCb * | msgwaitcb, | |||
| X400msListCb * | listcb, | |||
| X400msRegisterCb * | registercb, | |||
| X400msAlertCb * | alertcb, | |||
| X400msManageCb * | managecb, | |||
| X400msManageCb * | unmanagecb | |||
| ) |
Initiate an asynchronous opening of a session to a Message Store (P7) using an existing session object.
| sp | [in] Session to connect | |
| addr | [in] String encoding of OR-Address to use when binding | |
| dn | [in] String encoding of Directory name to use when binding | |
| credentials | [in] String giving the credentials for the session | |
| pa | [in] String encoding of MS or Presentation Address to contact. | |
| ret_psw | [in] String giving the expected password from the MS or MTA | |
| conupcb | [in] Function to be called when connection is open | |
| condowncb | [in] Function to be called when connection is lost | |
| msgsubcb | [in] Function to be called when submission completes | |
| msgfetchcb | [in] Function to be called when fetch completes | |
| msgdelcb | [in] Function to be called when delete completes | |
| msgwaitcb | [in] Function to be called when wait completes | |
| listcb | [in] Function to be called when list completes | |
| registercb | [in] Function to be called when register completes | |
| alertcb | [in] Function to be called when alert occurs | |
| managecb | [in] Function to be called when an event type needs to be handled | |
| unmanagecb | [in] Function to be called when an event type does not need to be handled |
The function will return X400_E_WAIT_WRITE, indicating that the client application need to wait for the file descriptor associated with the X400msSession object to become writeable. At this point, X400msProcessEvent needs to be called to handle the 'write' event (which actually indicates that the network-level connection has been established). X400msProcessEvent will then return X400_E_WAIT_READ, to indicate that the application needs to wait for the file descriptor to become readable before calling X400msProcessEvent again. The application will need to call X400msProcessEvent multiple times before the association becomes open - at this point the "X400msConnEstablishedCb" callback will be invoked.
| struct X400msSession* X400msNewAsyncSession | ( | int | type | ) |
Create a new X400msSession object of the specified type.
| type | [in] Connection type: X400_TYPE_MS, X400_TYPE_MTA_SUBMIT or X400_TYPE_MTA_BOTH |
| int X400msGetHandle | ( | struct X400msSession * | session | ) |
Get a handle suitable for use in a call to select().
| session | [in] Session to get handle for |
| void X400msSetUserPointer | ( | struct X400msSession * | session, | |
| void * | ptr | |||
| ) |
Set a user pointer value in a session object.
| session | [in] Session to set pointer in | |
| ptr | [in] Pointer value to set |
| void* X400msGetUserPointer | ( | struct X400msSession * | session | ) |
Get a user pointer value from a session object.
| session | [in] Session to get pointer from |
| int X400msOpen | ( | int | type, | |
| const char * | oraddr, | |||
| const char * | dirname, | |||
| const char * | credentials, | |||
| const char * | pa, | |||
| int * | messages, | |||
| struct X400msSession ** | spp | |||
| ) |
Open a session to a Message Store (P7) or MTA (P3) in synchronous mode.
| type | [in] Connection type: X400_TYPE_MS, X400_TYPE_MTA_SUBMIT or X400_TYPE_MTA_BOTH | |
| oraddr | [in] String encoding of OR-Address to use when binding | |
| dirname | [in] String encoding of Directory name to use when binding | |
| credentials | [in] String giving the credentials for the session | |
| pa | [in] String encoding of MS or MTA Presentation Address to contact. | |
| messages | [out] Pointer to integer to get number of messages, or NULL if the result of the Summarize is not required | |
| spp | [out] Pointer to receive pointer to opaque session data |
Bear in mind that if you are binding only to submit a message, and don't need to know how many messages there are in the inbox, it's better to pass NULL to the messages paremeter, as that will prevent an expensive SUMMARIZE operation.
| int X400msOpenCheck | ( | int | type, | |
| const char * | oraddr, | |||
| const char * | dirname, | |||
| const char * | credentials, | |||
| const char * | pa, | |||
| const char * | ret_psw, | |||
| int * | messages, | |||
| struct X400msSession ** | spp | |||
| ) |
Open a session to a Message Store (P7) or MTA (P3) in synchronous mode, checking the password which the Message Store or MTA returns.
| type | [in] Connection type: X400_TYPE_MS, X400_TYPE_MTA_SUBMIT or X400_TYPE_MTA_BOTH | |
| oraddr | [in] String encoding of OR-Address to use when binding | |
| dirname | [in] String encoding of Directory name to use when binding | |
| credentials | [in] String giving the credentials for the session | |
| pa | [in] String encoding of MS or MTA Presentation Address to contact. | |
| ret_psw | [in] String for the expected password from the MS or MTA | |
| messages | [out] Pointer to integer to get number of messages, or NULL if the result of the Summarize is not required | |
| spp | [out] Pointer to receive pointer to opaque session data |
Both the credentials and ret_psw strings are passwords, for simple authentication. The ret_psw value (if non-NULL) specifies the password we expect to get back from the MS or MTA to which we are binding. The API will perform a check that the returned password matches the expected value and will return an error if they do not match.
Bear in mind that if you are binding only to submit a message, and don't need to know how many messages there are in the inbox, it's better to pass NULL to the messages paremeter, as that will prevent an expensive SUMMARIZE operation.
| void X400msSetConfigRequest | ( | int | val | ) |
Disable and enable configuration requests in MS Bind operations.
| val | [in] Boolean to turn on or off configuration requests |
| int X400msClose | ( | struct X400msSession * | sp | ) |
Close a X400 Session.
| sp | [in] Pointer to session data |
| int X400msList | ( | struct X400msSession * | sp, | |
| char * | since_time, | |||
| struct X400msListResult ** | lrp | |||
| ) |
List messages in the P7 Message Store.
| sp | [in] Pointer to session data | |
| since_time | [in] Optional UTC time string | |
| lrp | [out] Pointer to receive pointer to opaque list result |
| int X400msListEx | ( | struct X400msSession * | sp, | |
| char * | since_time, | |||
| int | entryclass, | |||
| struct X400msListResult ** | lrp | |||
| ) |
List messages in the P7 Message Store, specifying entryclass.
| sp | [in] Pointer to session data | |
| since_time | [in] Optional UTC time string | |
| entryclass | [in] Entry class to list within | |
| lrp | [out] Pointer to receive pointer to opaque list result |
| int X400msListExAux | ( | struct X400msSession * | sp, | |
| char * | since_time, | |||
| int | entryclass, | |||
| int | entrystatus, | |||
| struct X400msListResult ** | lrp | |||
| ) |
List messages in the P7 Message Store, specifying entryclass and entrystatus.
| sp | [in] Pointer to session data | |
| since_time | [in] Optional UTC time string | |
| entryclass | [in] Entry class to list within | |
| entrystatus | [in] Entry status of messages to list | |
| lrp | [out] Pointer to receive pointer to opaque list result |
| int X400msListGetIntParam | ( | struct X400msListResult * | lr, | |
| int | paramtype, | |||
| int | number, | |||
| int * | valp | |||
| ) |
Get an integer attribute value from an element of a ListResult.
| lr | [in] List result to access | |
| paramtype | [in] Type of parameter to get | |
| number | [in] Index of element in ListResult to access | |
| valp | [out] Pointer to receive attribute value |
| int X400msListGetStrParam | ( | struct X400msListResult * | lr, | |
| int | paramtype, | |||
| int | number, | |||
| char * | buffer, | |||
| size_t | buflen, | |||
| size_t * | paramlenp | |||
| ) |
Get a string attribute value from an element of a ListResult.
| lr | [in] List result to access | |
| paramtype | [in] Type of parameter to get | |
| number | [in] Index of element in ListResult to access | |
| buffer | [out] Buffer receive attribute value | |
| buflen | [in] Length of buffer | |
| paramlenp | [out] Pointer to receive length of value |
| void X400msListFree | ( | struct X400msListResult * | lr | ) |
Free the memory occupied by a ListResult.
| lr | [in] List result to free |
| int X400msMsgNew | ( | struct X400msSession * | sp, | |
| int | type, | |||
| struct X400msMessage ** | mpp | |||
| ) |
Creates new message.
| sp | [in] X400 session pointer | |
| type | [in] Type of message object | |
| mpp | [out] pointer to receive pointer to message object |
| int X400msMsgCountRecip | ( | struct X400msMessage * | mp, | |
| int | type, | |||
| int * | cp | |||
| ) |
Returns count of addresses of given type in message object.
| mp | [in] X400 MS message | |
| type | [in] Type of address to count | |
| cp | [out] pointer integer to receive count of addresses |
| int X400msMsgSend | ( | struct X400msMessage * | mp | ) |
Send message object.
| mp | [in] Message pointer |
| int X400msMsgDelete | ( | struct X400msMessage * | mp, | |
| int | retain | |||
| ) |
Delete message object.
| mp | [in] Message pointer | |
| retain | [in] If true, message is not deleted from Message Store |
| int X400msMsgAddStrParam | ( | struct X400msMessage * | mp, | |
| int | paramtype, | |||
| const char * | value, | |||
| size_t | length | |||
| ) |
Add string-valued parameter to the message.
| mp | [in] Message pointer | |
| paramtype | [in] Type of parameter | |
| value | [in] Value of parameter | |
| length | [in] Length of parameter, -1 if NUL terminated |
| int X400msMsgAddIntParam | ( | struct X400msMessage * | mp, | |
| int | paramtype, | |||
| int | value | |||
| ) |
Add integer-valued parameter to the message.
| mp | [in] Message pointer | |
| paramtype | [in] Type of parameter | |
| value | [in] Value of parameter |
| int X400msMsgAddAttachment | ( | struct X400msMessage * | mp, | |
| int | type, | |||
| const char * | string, | |||
| size_t | length | |||
| ) |
Add attachment to the message.
| mp | [in] Message pointer | |
| type | [in] Type of attachment | |
| string | [in] String value for attachment | |
| length | [in] Length of string |
| int X400msMsgAddBodypart | ( | struct X400msMessage * | mp, | |
| struct X400Bodypart * | bp | |||
| ) |
Add a body part object to a message.
| mp | [in] Message pointer | |
| bp | [in] Bodypart pointer |
| int X400msMsgAddMessageBodyWType | ( | struct X400msMessage * | mp, | |
| struct X400Message * | mbp, | |||
| int | type | |||
| ) |
Add a message body part object to a message.
| mp | [in] Message pointer | |
| mbp | [in] Message body part pointer | |
| type | [in] BodyPart type (E.G X400_T_MESSAGE) |
If the message object being created has an IPN content, then any envelope information is ignored.
| int X400msMsgAddMessageBody | ( | struct X400msMessage * | mp, | |
| struct X400Message * | mbp | |||
| ) |
| int X400msRecipNew | ( | struct X400msMessage * | mp, | |
| int | type, | |||
| struct X400Recipient ** | rpp | |||
| ) |
Add new recipient to a message.
| mp | [in] Message pointer | |
| type | [in] type of recipient | |
| rpp | [out] Pointer to place for pointer to recipient information |