x400_msapi.h
Go to the documentation of this file.
1/* Copyright (c) 2003-2026, Isode Limited, London, England.
2 * All rights reserved.
3 *
4 * Acquisition and use of this software and related materials for any
5 * purpose requires a written licence agreement from Isode Limited,
6 * or a written licence from an organisation licenced by Isode Limited
7 * to grant such a licence.
8 *
9 */
10
11/*
12 *
13 * @VERSION@
14 */
15
16#ifndef _X400_MSAPI_H
17#define _X400_MSAPI_H
18
19#include "cdecl.h"
20#include "x400_api.h"
21
22#include <isode/asn1/MTA-types.h>
23
233#define X400_DE_SECURITY_ERROR 12
236#define X400_DE_DELIVERY_CONTROL_VIOLATED 1
239#define X400_DE_UNSUPPORTED_CRITICAL_FUNCTION 13
242#define X400_DE_REMOTE_BIND_ERROR 15
245/* \} */
246
250#define X400_SP_ASSEMBLY_INSTRUCTIONS_CONFLICT_WITH_SECURITY_SERVICES 0
251#define X400_SP_AUTHENTICATION_PROBLEM 1
252#define X400_SP_AUTHENTICATION_FAILURE_ON_SUBJECT_MESSAGE 2
253#define X400_SP_CONFIDENTIALITY_ASSOCIATION_PROBLEM 3
254#define X400_SP_DECRYPTION_FAILED 4
255#define X400_SP_DECRYPTION_KEY_UNOBTAINABLE 5
256#define X400_SP_FAILURE_OF_PROOF_OF_MESSAGE 6
257#define X400_SP_FORBIDDEN_USER_SECURITY_LABEL_REGISTER 7
258#define X400_SP_INCOMPATIBLE_CHANGE_WITH_ORIGINAL_SECURITY_CONTEXT 8
259#define X400_SP_INTEGRITY_FAILURE_ON_SUBJECT_MESSAGE 9
260#define X400_SP_INVALID_SECURITY_LABEL 10
261#define X400_SP_INVALID_SECURITY_LABEL_UPDATE 11
262#define X400_SP_KEY_FAILURE 12
263#define X400_SP_MANDATORY_PARAMETER_ABSENCE 13
264#define X400_SP_OPERATION_SECURITY_FAILURE 14
265#define X400_SP_REDIRECTION_PROHIBITED 15
266#define X400_SP_REFUSED_ALTERNATE_RECIPIENT_NAME 16
267#define X400_SP_REPUDIATION_FAILURE_OF_MESSAGE 17
268#define X400_SP_RESPONDER_CREDENTIALS_CHECKING_PROBLEM 18
269#define X400_SP_SECURITY_CONTEXT_FAILURE 19
270#define X400_SP_SECURITY_CONTEXT_PROBLEM 20
271#define X400_SP_SECURITY_POLICY_VIOLATION 21
272#define X400_SP_SECURITY_SERVICES_REFUSAL 22
273#define X400_SP_TOKEN_DECRYPTION_FAILED 23
274#define X400_SP_TOKEN_ERROR 24
275#define X400_SP_UNABLE_TO_AGGREGATE_SECURITY_LABELS 25
276#define X400_SP_UNAUTHORISED_DL_NAME 26
277#define X400_SP_UNAUTHORISED_ENTRY_CLASS 27
278#define X400_SP_UNAUTHORISED_ORIGINALLY_INTENDED_RECIPIENT_NAME 28
279#define X400_SP_UNAUTHORISED_ORIGINATOR_NAME 29
280#define X400_SP_UNAUTHORISED_RECIPIENT_NAME 30
281#define X400_SP_UNAUTHORISED_SECURITY_LABEL_UPDATE 31
282#define X400_SP_UNAUTHORISED_USER_NAME 32
283#define X400_SP_UNKNOWN_SECURITY_LABEL 33
284#define X400_SP_UNSUPPORTED_ALGORITHM_IDENTIFIER 34
285#define X400_SP_UNSUPPORTED_SECURITY_POLICY 35
286
287/* \} */
288
291#define X400_TYPE_MS 0
294#define X400_TYPE_MTA_SUBMIT 1
297#define X400_TYPE_MTA_BOTH 2
300/* \} */
301
304#define X400_EVENT_READ 1
307#define X400_EVENT_WRITE 2
310#define X400_EVENT_ERROR 4
313#define X400_EVENT_ALL (X400_EVENT_READ | X400_EVENT_WRITE | X400_EVENT_ERROR)
316/* \} */
317
320#define MS_ENTRY_CLASS_STORED_MESSAGES 0
323#define MS_ENTRY_CLASS_SUBMITTED_MESSAGES 1
326/* \} */
327
330#define MS_ENTRY_STATUS_ANY -1
333#define MS_ENTRY_STATUS_NEW 0
336#define MS_ENTRY_STATUS_LISTED 1
339#define MS_ENTRY_STATUS_FETCHED 2
342#define MS_ENTRY_STATUS_NEW_OR_LISTED 3
345#define MS_ENTRY_STATUS_LISTED_OR_FETCHED 4
348/* \} */
349
352#define MS_BIND_SIMPLE 0
355#define MS_BIND_STRONG_P3 1
358#define MS_BIND_STRONG_P7 2
361/* \} */
362
363#ifndef WANT_DEFINES_ONLY
364
376X400MS_CDECL const char* X400msError(int error);
377
378struct X400msSession;
379struct X400msMessage;
380struct X400msListResult;
381
389typedef void X400msConnEstablishedCb(struct X400msSession* session, int errorcode, int alert);
390
397typedef void X400msConnDroppedCb(struct X400msSession* session, int reason_code, char* diagnostic);
398
407typedef void X400msMsgSubmittedCb(struct X400msSession* session, struct X400msMessage* message, int errorcode);
408
419typedef void X400msMsgFetchedCb(struct X400msSession* session, struct X400msMessage* message, int type, int seqno, int errorcode);
420
429typedef void X400msMsgDeletedCb(struct X400msSession* session, int seqno, int errorcode);
430
439typedef void X400msMsgWaitingCb(struct X400msSession* session, int num_messages_waiting, int errorcode);
440
449typedef void X400msListCb(struct X400msSession* session, struct X400msListResult* lrp, int errorcode);
450
458typedef void X400msRegisterCb(struct X400msSession* session, int errorcode);
459
465typedef void X400msAlertCb(struct X400msSession* session);
466
476typedef int X400msManageCb(struct X400msSession* session, int fd, int event_mask);
523X400MS_CDECL int X400msOpenAsync(int type,
524 const char* oraddr,
525 const char* dirname,
526 const char* credentials,
527 const char* pa,
528 const char* ret_psw,
530 X400msConnDroppedCb* condowncb,
531 X400msMsgSubmittedCb* msgsubcb,
532 X400msMsgFetchedCb* msgfetchcb,
533 X400msMsgDeletedCb* msgdelcb,
534 X400msMsgWaitingCb* msgwaitcb,
535 X400msListCb* listcb,
536 X400msRegisterCb* registercb,
537 X400msAlertCb* alertcb,
538 X400msManageCb* managecb,
539 X400msManageCb* unmanagecb,
540 struct X400msSession** spp);
541
586X400MS_CDECL int X400msOpenAsyncSession(struct X400msSession* sp,
587 const char* addr,
588 const char* dn,
589 const char* credentials,
590 const char* pa,
591 const char* ret_psw,
593 X400msConnDroppedCb* condowncb,
594 X400msMsgSubmittedCb* msgsubcb,
595 X400msMsgFetchedCb* msgfetchcb,
596 X400msMsgDeletedCb* msgdelcb,
597 X400msMsgWaitingCb* msgwaitcb,
598 X400msListCb* listcb,
599 X400msRegisterCb* registercb,
600 X400msAlertCb* alertcb,
601 X400msManageCb* managecb,
602 X400msManageCb* unmanagecb);
603
610X400MS_CDECL struct X400msSession* X400msNewAsyncSession(int type);
611
617X400MS_CDECL int X400msGetHandle(struct X400msSession* session);
618
625X400MS_CDECL void X400msSetUserPointer(struct X400msSession* session, void* ptr);
626
632X400MS_CDECL void* X400msGetUserPointer(struct X400msSession* session);
633
641X400MS_CDECL int X400msGetGeneric(struct X400msMessage* mp, struct X400Message** genp);
642
668X400MS_CDECL int
669X400msOpen(int type, const char* oraddr, const char* dirname, const char* credentials, const char* pa, int* messages, struct X400msSession** spp);
670
702X400MS_CDECL int X400msOpenCheck(int type,
703 const char* oraddr,
704 const char* dirname,
705 const char* credentials,
706 const char* pa,
707 const char* ret_psw,
708 int* messages,
709 struct X400msSession** spp);
710
719X400MS_CDECL void X400msSetConfigRequest(int val);
720
729X400MS_CDECL void X400msCancelWait(void);
730
739X400MS_CDECL void X400msEnableWait(void);
740
752X400MS_CDECL void X400msCancelWaitSession(struct X400msSession* sp);
753
764X400MS_CDECL void X400msEnableWaitSession(struct X400msSession* sp);
765
774X400MS_CDECL int X400msClose(struct X400msSession* sp);
775
787X400MS_CDECL int X400msList(struct X400msSession* sp, char* since_time, struct X400msListResult** lrp);
788
801X400MS_CDECL int X400msListEx(struct X400msSession* sp, char* since_time, int entryclass, struct X400msListResult** lrp);
802
817X400MS_CDECL int X400msListExAux(struct X400msSession* sp, char* since_time, int entryclass, int entrystatus, struct X400msListResult** lrp);
818
834X400MS_CDECL int
835X400msListExAuxPri(struct X400msSession* sp, char* since_time, int entryclass, int entrystatus, int priority, struct X400msListResult** lrp);
836
852X400MS_CDECL int X400msListExAuxPriBefore(struct X400msSession* sp,
853 char* since_time,
854 char* before_time,
855 int entryclass,
856 int entrystatus,
857 int priority,
858 struct X400msListResult** lrp);
859
874X400MS_CDECL int X400msListGetIntParam(struct X400msListResult* lr, int paramtype, int number, int* valp);
875
892X400MS_CDECL int X400msListGetStrParam(struct X400msListResult* lr, int paramtype, int number, char* buffer, size_t buflen, size_t* paramlenp);
893
901X400MS_CDECL void X400msListFree(struct X400msListResult* lr);
902
916X400MS_CDECL int X400msMsgNew(struct X400msSession* sp, int type, struct X400msMessage** mpp);
917
927X400MS_CDECL int X400msMsgCountRecip(struct X400msMessage* mp, int type, int* cp);
928
935X400MS_CDECL int X400msMsgSend(struct X400msMessage* mp);
936
951X400MS_CDECL int X400msMsgDelete(struct X400msMessage* mp, int retain);
952
962X400MS_CDECL int X400msMsgAddStrParam(struct X400msMessage* mp, int paramtype, const char* value, size_t length);
963
972X400MS_CDECL int X400msMsgAddIntParam(struct X400msMessage* mp, int paramtype, int value);
973
983X400MS_CDECL int X400msMsgAddAttachment(struct X400msMessage* mp, int type, const char* string, size_t length);
984
988X400MS_CDECL int X400msMsgAddBodypart(struct X400msMessage* mp, struct X400Bodypart* bp);
989
1003X400MS_CDECL int X400msMsgAddMessageBodyWType(struct X400msMessage* mp, struct X400Message* mbp, int type);
1004
1018X400MS_CDECL int X400msMsgAddMessageBodyWType(struct X400msMessage* mp, struct X400Message* mbp, int type);
1022X400MS_CDECL int X400msMsgAddMessageBody(struct X400msMessage* mp, struct X400Message* mbp);
1023
1024struct X400Recipient;
1025
1056X400MS_CDECL int X400msRecipNew(struct X400msMessage* mp, int type, struct X400Recipient** rpp);
1057
1067X400MS_CDECL int X400msRecipAddStrParam(struct X400Recipient* rp, int paramtype, const char* value, size_t length);
1068
1077X400MS_CDECL int X400msRecipAddIntParam(struct X400Recipient* rp, int paramtype, int value);
1078
1090X400MS_CDECL int X400msWait(struct X400msSession* sp, int seconds, int* count);
1091
1103X400MS_CDECL int X400msWaitNew(struct X400msSession* sp, int seconds, int* count);
1104
1127X400MS_CDECL int X400msMsgGet(struct X400msSession* sp, int number, struct X400msMessage** mpp, int* typep, int* seqp);
1128
1152X400MS_CDECL int X400msMsgGetEx(struct X400msSession* sp, int number, int entryclass, struct X400msMessage** mpp, int* typep, int* seqp);
1153
1176X400MS_CDECL int X400msMsgGetStart(struct X400msSession* sp, int number, struct X400msMessage** mpp, int* typep, int* seqp);
1177
1201X400MS_CDECL int X400msMsgGetStartEx(struct X400msSession* sp, int number, int entryclass, struct X400msMessage** mpp, int* typep, int* seqp);
1202
1212X400MS_CDECL int X400msMsgGetFinish(struct X400msMessage* mp, int errnum, int problem);
1213
1224X400MS_CDECL int X400msMsgGetStrParam(struct X400msMessage* mp, int paramtype, char* buffer, size_t buflen, size_t* paramlenp);
1225
1234X400MS_CDECL int X400msMsgGetIntParam(struct X400msMessage* mp, int paramtype, int* valp);
1235
1250X400MS_CDECL int X400msMsgGetAttachment(struct X400msMessage* mp, int number, int* typep, char* buffer, size_t buflen, size_t* lengthp);
1251
1260X400MS_CDECL int X400msMsgGetBodypart(struct X400msMessage* mp, int number, int* typep, struct X400Bodypart** bpp);
1261
1270X400MS_CDECL int X400msMsgGetMessageBody(struct X400msMessage* mp, int number, struct X400Message** mpp);
1271
1282X400MS_CDECL int X400msMsgGetCert(struct X400msMessage* mp, int certtype, struct X400Certificate** certp);
1283
1305X400MS_CDECL int X400msMakeIPN(struct X400msMessage* mp, int non_receipt_reason, struct X400msMessage** mpp);
1306
1318X400MS_CDECL int X400msRecipGet(struct X400msMessage* mp, int type, int number, struct X400Recipient** rpp);
1319
1330X400MS_CDECL int X400msRecipGetStrParam(struct X400Recipient* rp, int paramtype, char* buffer, size_t buflen, size_t* paramlenp);
1331
1340X400MS_CDECL int X400msRecipGetIntParam(struct X400Recipient* rp, int paramtype, int* valp);
1341
1356X400MS_CDECL int X400msSetIntDefault(struct X400msSession* sp, int paramtype, int value);
1357
1373X400MS_CDECL int X400msSetStrDefault(struct X400msSession* sp, int paramtype, const char* value, size_t length);
1374
1387X400MS_CDECL int X400msTestSecurityEnv(struct X400msSession* sp);
1388
1389struct X400msAutoActionParameter;
1390
1404X400MS_CDECL int X400msRegisterAutoAction(struct X400msSession* sp, int type, int id, struct X400msAutoActionParameter* aa_param);
1405
1417X400MS_CDECL int X400msDeregisterAutoAction(struct X400msSession* sp, int type, int id);
1418
1423X400MS_CDECL struct X400msAutoActionParameter* X400msNewAutoActionParameter(void);
1424
1430X400MS_CDECL void X400msFreeAutoActionParameter(struct X400msAutoActionParameter* aa_param);
1431
1439X400MS_CDECL int X400msAutoActionParameterAddRecip(struct X400msAutoActionParameter* aap, int reciptype, struct X400Recipient* recip);
1440
1448X400MS_CDECL int X400msAutoActionParameterAddIntParam(struct X400msAutoActionParameter* aap, int paramtype, int value);
1449
1458X400MS_CDECL int X400msAutoActionParameterAddStrParam(struct X400msAutoActionParameter* aap, int paramtype, const char* value, size_t length);
1464X400MS_CDECL int X400msCheckConnection(struct X400msSession* sp);
1465
1473X400MS_CDECL int X400msDLExpHistGet(struct X400msMessage* mp, int entry, struct X400DLExpHist** hist);
1474
1482X400MS_CDECL int X400msDLExpHistNew(struct X400msMessage* mp, struct X400DLExpHist** histp);
1483
1484struct X400DLExpHist;
1485
1493X400MS_CDECL int X400msALINew(struct X400msMessage* mp, struct X400ALI** ali);
1494
1502X400MS_CDECL int X400msALIGet(struct X400msMessage* mp, int entry, struct X400ALI** info);
1503
1504struct X400ALI;
1505
1514X400MS_CDECL int X400msPSSNew(struct X400msMessage* mp, struct X400PSS** pss, int type);
1515
1524X400MS_CDECL int X400msPSSGet(struct X400msMessage* mp, int type, int entry, struct X400PSS** pss);
1525
1526struct X400PSS;
1527
1534X400MS_CDECL int X400msDistFieldNew(struct X400msMessage* mp, struct X400DistField** pss);
1535
1543X400MS_CDECL int X400msDistFieldGet(struct X400msMessage* mp, int entry, struct X400DistField** pss);
1544
1545struct X400DistField;
1546
1547struct X400OtherRecip;
1548
1555X400MS_CDECL int X400msOtherRecipNew(struct X400msMessage* mp, struct X400OtherRecip** otherrecip);
1556
1564X400MS_CDECL int X400msOtherRecipGet(struct X400msMessage* mp, int entry, struct X400OtherRecip** otherrecip);
1565
1573X400MS_CDECL int X400msRediHistGetEnv(struct X400msMessage* msg, int entry, struct X400RediHist** hist);
1574
1583X400MS_CDECL int X400msTraceInfoGet(struct X400msMessage* mp, int entry, struct X400TraceInfo** info, int type);
1584struct X400TraceInfo;
1585
1593X400MS_CDECL int X400msInternalTraceInfoGet(struct X400msMessage* mp, int entry, struct X400InternalTraceInfo** info);
1594struct X400InternalTraceInfo;
1595
1603X400MS_CDECL int X400msORandDLGet(struct X400msMessage* msg, int entry, struct X400ORandDL** or_and_dl);
1604
1605struct X400ORandDL;
1606
1618X400MS_CDECL int X400msGetContentOctets(struct X400msMessage* mp, char* buf, size_t buflen, size_t* lenp);
1619
1630X400MS_CDECL int X400msSetContentOctets(struct X400msMessage* mp, char* buf, size_t len);
1631
1638X400MS_CDECL int X400msACP127RespGet(struct X400msMessage* mp, struct X400ACP127Resp** respp);
1639
1646X400MS_CDECL int X400msACP127RespNew(struct X400msMessage* mp, struct X400ACP127Resp** respp);
1647
1654X400MS_CDECL struct X400ACP127Resp* X400msACP127RespDeepCopy(struct X400msMessage* mp, struct X400ACP127Resp* orig);
1665X400MS_CDECL int X400msMsgGetRaw(struct X400msSession* sp, struct X400msMessage* mp, char* buffer, size_t buflen, size_t* buflenp);
1666
1676X400MS_CDECL int X400msMsgFromRaw(struct X400msSession* sp, char* buffer, size_t buflen, struct X400msMessage** mpp, int* typep);
1677
1710X400MS_CDECL char* X400msBuildCredentials(int auth_type,
1711 const char* pass,
1712 const char* mtaPassword,
1713 const char* filename,
1714 const char* trustedCACertificatesDirectory,
1715 const char* orAddress,
1716 const char* mtaName,
1717 const char* gdi);
1718
1734X400MS_CDECL int X400msTokeniseCredentials(const char* credentials,
1735 int* auth_type,
1736 char** pass,
1737 char** mtaPassword,
1738 char** filename,
1739 char** trustedCACertificatesDirectory,
1740 char** orAddress,
1741 char** mtaName,
1742 char** gdi);
1743
1754X400MS_CDECL int constructStrongP3UA2MTACreds(const char* filename,
1755 const char* passphrase,
1756 const char* orAddress,
1757 const char* mtaName,
1758 const char* gdi,
1759 struct type_MTA_StrongCredentials* strong);
1760
1771X400MS_CDECL int
1772constructStrongP7UA2MSCreds(const char* filename, const char* passphrase, const char* orAddress, struct type_MTA_StrongCredentials* strong);
1773
1780X400MS_CDECL int verifyStrongP3MTA2UACreds(const char* credentials, struct type_MTA_StrongCredentials* strong);
1781
1790X400MS_CDECL int verifyStrongP7MS2UACreds(const char* credentials, struct type_MTA_StrongCredentials* strong);
1791
1794#endif /* WANT_DEFINES_ONLY */
1795
1796#endif /* _X400_MSAPI_H */
int X400msOtherRecipNew(struct X400msMessage *mp, struct X400OtherRecip **otherrecip)
Create a new P772 Other Recipient object for a message object.
int X400msMsgAddStrParam(struct X400msMessage *mp, int paramtype, const char *value, size_t length)
Add string-valued parameter to the message.
int X400msList(struct X400msSession *sp, char *since_time, struct X400msListResult **lrp)
List messages in the P7 Message Store.
void X400msCancelWait(void)
Signal any threads waiting in X400msWait() function calls to return.
int X400msGetHandle(struct X400msSession *session)
Get a handle suitable for use in a call to select()
void X400msListCb(struct X400msSession *session, struct X400msListResult *lrp, int errorcode)
A callback which will be invoked when a P7 List operation completes asynchronously,...
Definition x400_msapi.h:449
int X400msTraceInfoGet(struct X400msMessage *mp, int entry, struct X400TraceInfo **info, int type)
Get a Trace Info object for a message object.
int X400msMsgGetMessageBody(struct X400msMessage *mp, int number, struct X400Message **mpp)
Return a pointer to a message part object.
int X400msMsgFromRaw(struct X400msSession *sp, char *buffer, size_t buflen, struct X400msMessage **mpp, int *typep)
Reconstruct a message from a binary representation.
int X400msTokeniseCredentials(const char *credentials, int *auth_type, char **pass, char **mtaPassword, char **filename, char **trustedCACertificatesDirectory, char **orAddress, char **mtaName, char **gdi)
Tokenise X.400 credentials.
int X400msMsgGetStart(struct X400msSession *sp, int number, struct X400msMessage **mpp, int *typep, int *seqp)
Get message object for transfer out from MS or MTA via P3.
int X400msMsgAddBodypart(struct X400msMessage *mp, struct X400Bodypart *bp)
int X400msMsgGetAttachment(struct X400msMessage *mp, int number, int *typep, char *buffer, size_t buflen, size_t *lengthp)
Return the data of an attachment (=bodypart) from the message object.
int X400msMsgGetCert(struct X400msMessage *mp, int certtype, struct X400Certificate **certp)
Get certificate object from message This returns a certificate which was used to sign an object in th...
int X400msAutoActionParameterAddIntParam(struct X400msAutoActionParameter *aap, int paramtype, int value)
Add integer-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 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 objec...
int X400msInternalTraceInfoGet(struct X400msMessage *mp, int entry, struct X400InternalTraceInfo **info)
Get an Internal Trace Info object for a message object.
int X400msRecipGet(struct X400msMessage *mp, int type, int number, struct X400Recipient **rpp)
Get recipient object from message.
int X400msDLExpHistNew(struct X400msMessage *mp, struct X400DLExpHist **histp)
Create a new DL Expansion History object, and associate it with the existing message.
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.
int X400msRecipAddIntParam(struct X400Recipient *rp, int paramtype, int value)
Add integer-valued parameter to the message.
void X400msCancelWaitSession(struct X400msSession *sp)
Signal the thread waiting in an X400msWait() function call for the specified MS Session to return.
int X400msDistFieldGet(struct X400msMessage *mp, int entry, struct X400DistField **pss)
Get a new P772 Distribution Field object for a message object.
int X400msMsgAddIntParam(struct X400msMessage *mp, int paramtype, int value)
Add integer-valued parameter to the message.
int X400msMsgCountRecip(struct X400msMessage *mp, int type, int *cp)
Returns count of addresses of given type in message object.
int X400msPSSGet(struct X400msMessage *mp, int type, int entry, struct X400PSS **pss)
Get a Printable String Syntax Object for a message object.
void X400msFreeAutoActionParameter(struct X400msAutoActionParameter *aa_param)
Free an autoaction parameter.
int verifyStrongP3MTA2UACreds(const char *credentials, struct type_MTA_StrongCredentials *strong)
Check strong authentication credentials for P3 MTA to UA binds.
int X400msListGetIntParam(struct X400msListResult *lr, int paramtype, int number, int *valp)
Get an integer attribute value from an element of a ListResult.
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 X400msRediHistGetEnv(struct X400msMessage *msg, int entry, struct X400RediHist **hist)
Get the Redirection History object from a message envelope this is represented by 8....
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,...
Definition x400_msapi.h:419
void X400msMsgDeletedCb(struct X400msSession *session, int seqno, int errorcode)
A callback which will be invoked when a P7 Delete operation completes asynchronously,...
Definition x400_msapi.h:429
int X400msMakeIPN(struct X400msMessage *mp, int non_receipt_reason, struct X400msMessage **mpp)
Make an IPN based on the subject IPM.
int X400msORandDLGet(struct X400msMessage *msg, int entry, struct X400ORandDL **or_and_dl)
Get Originator and DL expansion history object.
int constructStrongP3UA2MTACreds(const char *filename, const char *passphrase, const char *orAddress, const char *mtaName, const char *gdi, struct type_MTA_StrongCredentials *strong)
Construct strong authentication credentials for P3 UA to MTA binds.
int X400msCheckConnection(struct X400msSession *sp)
Check that a connection is still active.
int X400msMsgGetRaw(struct X400msSession *sp, struct X400msMessage *mp, char *buffer, size_t buflen, size_t *buflenp)
Get a binary representation of a message which can be subsequently be used to reconstruct the message...
struct X400ACP127Resp * X400msACP127RespDeepCopy(struct X400msMessage *mp, struct X400ACP127Resp *orig)
Copy an ACP127 Notification Response object.
char * X400msBuildCredentials(int auth_type, const char *pass, const char *mtaPassword, const char *filename, const char *trustedCACertificatesDirectory, const char *orAddress, const char *mtaName, const char *gdi)
Build X.400 credentials of the type: For simple authentication. &#160;&#160;'SIMPLE\n<password>\n<MTA passw...
int X400msAutoActionParameterAddRecip(struct X400msAutoActionParameter *aap, int reciptype, struct X400Recipient *recip)
Add a receipient to the autoaction parameter.
void X400msConnDroppedCb(struct X400msSession *session, int reason_code, char *diagnostic)
A callback which will be invoked when a P7 connection is lost.
Definition x400_msapi.h:397
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 X400msRecipNew(struct X400msMessage *mp, int type, struct X400Recipient **rpp)
Add new recipient to a message.
int X400msWait(struct X400msSession *sp, int seconds, int *count)
Wait for messages to be ready to be read.
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)
void * X400msGetUserPointer(struct X400msSession *session)
Get a user pointer value from a session object.
void X400msAlertCb(struct X400msSession *session)
A callback which will be invoked when a P7 Alert invoke is received.
Definition x400_msapi.h:465
int X400msSetContentOctets(struct X400msMessage *mp, char *buf, size_t len)
Takes a byte stream containing the ASN.1 encoding of a P22 (or P772) content, decodes it and sets it ...
int X400msMsgGet(struct X400msSession *sp, int number, struct X400msMessage **mpp, int *typep, int *seqp)
Get message object for transfer out from MS or MTA via P3.
void X400msEnableWaitSession(struct X400msSession *sp)
Enable X400msWait() function to work normally again for an individual session.
const char * X400msError(int error)
Obtain a string describing the meaning of the given error code.
void X400msMsgSubmittedCb(struct X400msSession *session, struct X400msMessage *message, int errorcode)
A callback which will be invoked when a P7 Submission operation completes asynchronously,...
Definition x400_msapi.h:407
int X400msACP127RespNew(struct X400msMessage *mp, struct X400ACP127Resp **respp)
Create an ACP127 Notification Response object.
void X400msRegisterCb(struct X400msSession *session, int errorcode)
A callback which will be invoked when a P7 Register operation completes asynchronously,...
Definition x400_msapi.h:458
int X400msMsgGetEx(struct X400msSession *sp, int number, int entryclass, struct X400msMessage **mpp, int *typep, int *seqp)
Get message object for transfer out from MS or MTA via P3.
int X400msRecipAddStrParam(struct X400Recipient *rp, int paramtype, const char *value, size_t length)
Add string-valued parameter to the message.
int X400msDistFieldNew(struct X400msMessage *mp, struct X400DistField **pss)
Create a new P772 Distribution Field object for a message object.
int X400msListExAuxPriBefore(struct X400msSession *sp, char *since_time, char *before_time, int entryclass, int entrystatus, int priority, struct X400msListResult **lrp)
List messages in the P7 Message Store, specifying entryclass, entrystatus and priority,...
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 s...
Definition x400_msapi.h:389
int X400msRegisterAutoAction(struct X400msSession *sp, int type, int id, struct X400msAutoActionParameter *aa_param)
Register an autoaction with the Message Store.
int X400msOtherRecipGet(struct X400msMessage *mp, int entry, struct X400OtherRecip **otherrecip)
Get a new P772 Other Recipient object for a message object.
int X400msTestSecurityEnv(struct X400msSession *sp)
Test the default Security Environment.
int X400msListExAuxPri(struct X400msSession *sp, char *since_time, int entryclass, int entrystatus, int priority, struct X400msListResult **lrp)
List messages in the P7 Message Store, specifying entryclass entrystatus and priority.
void X400msListFree(struct X400msListResult *lr)
Free the memory occupied by a ListResult.
int X400msACP127RespGet(struct X400msMessage *mp, struct X400ACP127Resp **respp)
Get the ACP127 Notification Response object from a message.
int X400msSetIntDefault(struct X400msSession *sp, int paramtype, int value)
Set a default integer parameter value in a session.
struct X400msAutoActionParameter * X400msNewAutoActionParameter(void)
Create a new (empty) autoaction parameter structure.
int X400msMsgSend(struct X400msMessage *mp)
Send message object.
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 t...
int verifyStrongP7MS2UACreds(const char *credentials, struct type_MTA_StrongCredentials *strong)
Check strong authentication credentials for P7 MS to UA binds.
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 asy...
Definition x400_msapi.h:439
int X400msMsgAddMessageBody(struct X400msMessage *mp, struct X400Message *mbp)
int X400msGetGeneric(struct X400msMessage *mp, struct X400Message **genp)
Generate an X400Message from an X400msMessage.
int X400msRecipGetIntParam(struct X400Recipient *rp, int paramtype, int *valp)
Return a integer-valued parameter from the recipient object.
void X400msEnableWait(void)
Enable X400msWait() function to work normally again.
int X400msALINew(struct X400msMessage *mp, struct X400ALI **ali)
Create a new Address List Indicator Object, and associate it with the existing message.
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 X400msMsgDelete(struct X400msMessage *mp, int retain)
Delete message object.
int X400msMsgAddAttachment(struct X400msMessage *mp, int type, const char *string, size_t length)
Add attachment to the message.
int X400msWaitNew(struct X400msSession *sp, int seconds, int *count)
Wait for new messages to be ready to be read.
int X400msAutoActionParameterAddStrParam(struct X400msAutoActionParameter *aap, int paramtype, const char *value, size_t length)
Add string-valued parameter to the autoaction parameter.
int X400msALIGet(struct X400msMessage *mp, int entry, struct X400ALI **info)
Get a Address List Indicator Object for a message object.
int X400msMsgAddMessageBodyWType(struct X400msMessage *mp, struct X400Message *mbp, int type)
Add a message body part object to a message.
int X400msMsgGetFinish(struct X400msMessage *mp, int errnum, int problem)
Generate delivery result or error for a message.
void X400msSetConfigRequest(int val)
Disable and enable configuration requests in MS Bind operations.
int X400msMsgGetBodypart(struct X400msMessage *mp, int number, int *typep, struct X400Bodypart **bpp)
Return a pointer to a body part object.
int X400msMsgGetStartEx(struct X400msSession *sp, int number, int entryclass, struct X400msMessage **mpp, int *typep, int *seqp)
Get message object for transfer out from MS or MTA via P3.
int X400msMsgNew(struct X400msSession *sp, int type, struct X400msMessage **mpp)
Creates new message.
int X400msGetContentOctets(struct X400msMessage *mp, char *buf, size_t buflen, size_t *lenp)
Obtains the bytes containing the ASN.1 encoding of the Content of a message. The Content is obtained ...
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...
Definition x400_msapi.h:476
int X400msDeregisterAutoAction(struct X400msSession *sp, int type, int id)
Deregister an autoaction from the Message Store.
int X400msClose(struct X400msSession *sp)
Close a X400 Session.
int X400msSetStrDefault(struct X400msSession *sp, int paramtype, const char *value, size_t length)
Set a default string parameter value in a session.
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 constructStrongP7UA2MSCreds(const char *filename, const char *passphrase, const char *orAddress, struct type_MTA_StrongCredentials *strong)
Construct strong authentication credentials for P7 UA to MS binds.
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.
void X400msSetUserPointer(struct X400msSession *session, void *ptr)
Set a user pointer value in a session object.
int X400msMsgGetIntParam(struct X400msMessage *mp, int paramtype, int *valp)
Return a integer-valued parameter from the message object.
struct X400msSession * X400msNewAsyncSession(int type)
Create a new X400msSession object of the specified type.
int X400msListEx(struct X400msSession *sp, char *since_time, int entryclass, struct X400msListResult **lrp)
List messages in the P7 Message Store, specifying entryclass.
X400 Object Interface.

All rights reserved © 2002 - 2024 Isode Ltd.