x400_msapi.h
Go to the documentation of this file.
1 /* Copyright (c) 2003-2017, 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 
232 X400MS_CDECL const char *X400msError (int error);
233 
234 struct X400msSession;
235 struct X400msMessage;
236 struct X400msListResult;
237 
238 
246 typedef void X400msConnEstablishedCb(struct X400msSession *session,
247  int errorcode,
248  int alert);
249 
256 typedef void X400msConnDroppedCb(struct X400msSession *session,
257  int reason_code,
258  char *diagnostic);
259 
268 typedef void X400msMsgSubmittedCb(struct X400msSession *session,
269  struct X400msMessage *message,
270  int errorcode);
271 
282 typedef void X400msMsgFetchedCb(struct X400msSession *session,
283  struct X400msMessage *message,
284  int type,
285  int seqno,
286  int errorcode);
287 
296 typedef void X400msMsgDeletedCb(struct X400msSession *session,
297  int seqno,
298  int errorcode);
299 
308 typedef void X400msMsgWaitingCb(struct X400msSession *session,
309  int num_messages_waiting,
310  int errorcode);
311 
320 typedef void X400msListCb(struct X400msSession *session,
321  struct X400msListResult *lrp,
322  int errorcode);
323 
331 typedef void X400msRegisterCb(struct X400msSession *session,
332  int errorcode);
333 
339 typedef void X400msAlertCb(struct X400msSession *session);
340 
343 #define X400_TYPE_MS 0
344 
346 #define X400_TYPE_MTA_SUBMIT 1
347 
349 #define X400_TYPE_MTA_BOTH 2
350 
352 /* \} */
353 
356 #define X400_EVENT_READ 1
357 
359 #define X400_EVENT_WRITE 2
360 
362 #define X400_EVENT_ERROR 4
363 
365 #define X400_EVENT_ALL (X400_EVENT_READ | X400_EVENT_WRITE | X400_EVENT_ERROR)
366 
368 /* \} */
369 
372 #define MS_ENTRY_CLASS_STORED_MESSAGES 0
373 
375 #define MS_ENTRY_CLASS_SUBMITTED_MESSAGES 1
376 
378 /* \} */
379 
382 #define MS_ENTRY_STATUS_ANY -1
383 
385 #define MS_ENTRY_STATUS_NEW 0
386 
388 #define MS_ENTRY_STATUS_LISTED 1
389 
391 #define MS_ENTRY_STATUS_FETCHED 2
392 
394 #define MS_ENTRY_STATUS_NEW_OR_LISTED 3
395 
397 #define MS_ENTRY_STATUS_LISTED_OR_FETCHED 4
398 
400 /* \} */
401 
411 typedef int X400msManageCb(struct X400msSession *session,
412  int fd,
413  int event_mask);
460 X400MS_CDECL int X400msOpenAsync (int type,
461  const char *oraddr,
462  const char *dirname,
463  const char *credentials,
464  const char *pa,
465  const char *ret_psw,
466  X400msConnEstablishedCb *conupcb,
467  X400msConnDroppedCb *condowncb,
468  X400msMsgSubmittedCb *msgsubcb,
469  X400msMsgFetchedCb *msgfetchcb,
470  X400msMsgDeletedCb *msgdelcb,
471  X400msMsgWaitingCb *msgwaitcb,
472  X400msListCb *listcb,
473  X400msRegisterCb *registercb,
474  X400msAlertCb *alertcb,
475  X400msManageCb *managecb,
476  X400msManageCb *unmanagecb,
477  struct X400msSession **spp);
478 
523 X400MS_CDECL int X400msOpenAsyncSession (struct X400msSession *sp,
524  const char *addr,
525  const char *dn,
526  const char *credentials,
527  const char *pa,
528  const char *ret_psw,
529  X400msConnEstablishedCb *conupcb,
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 
547 X400MS_CDECL struct X400msSession *X400msNewAsyncSession(int type);
548 
554 X400MS_CDECL int X400msGetHandle(struct X400msSession *session);
555 
562 X400MS_CDECL void X400msSetUserPointer(struct X400msSession *session,
563  void *ptr);
564 
570 X400MS_CDECL void *X400msGetUserPointer(struct X400msSession *session);
571 
579 X400MS_CDECL int X400msGetGeneric(struct X400msMessage *mp,
580  struct X400Message **genp);
581 
607 X400MS_CDECL int X400msOpen(int type,
608  const char *oraddr,
609  const char *dirname,
610  const char *credentials,
611  const char *pa,
612  int *messages,
613  struct X400msSession **spp);
614 
646 X400MS_CDECL int X400msOpenCheck (int type,
647  const char *oraddr,
648  const char *dirname,
649  const char *credentials,
650  const char *pa,
651  const char *ret_psw,
652  int *messages,
653  struct X400msSession **spp);
654 
663 X400MS_CDECL void X400msSetConfigRequest(int val);
664 
665 
674 X400MS_CDECL void X400msCancelWait(void);
675 
684 X400MS_CDECL void X400msEnableWait(void);
685 
694 X400MS_CDECL int X400msClose (struct X400msSession *sp);
695 
696 
708 X400MS_CDECL int X400msList (struct X400msSession *sp,
709  char *since_time,
710  struct X400msListResult **lrp);
711 
724 X400MS_CDECL int X400msListEx (struct X400msSession *sp,
725  char *since_time,
726  int entryclass,
727  struct X400msListResult **lrp);
728 
729 
744 X400MS_CDECL int X400msListExAux (struct X400msSession *sp,
745  char *since_time,
746  int entryclass,
747  int entrystatus,
748  struct X400msListResult **lrp);
749 
765 X400MS_CDECL int X400msListExAuxPri (
766  struct X400msSession *sp,
767  char *since_time,
768  int entryclass,
769  int entrystatus,
770  int priority,
771  struct X400msListResult **lrp);
772 
788 X400MS_CDECL int X400msListExAuxPriBefore (
789  struct X400msSession *sp,
790  char *since_time,
791  char *before_time,
792  int entryclass,
793  int entrystatus,
794  int priority,
795  struct X400msListResult **lrp);
796 
797 
812 X400MS_CDECL int X400msListGetIntParam(struct X400msListResult *lr,
813  int paramtype,
814  int number,
815  int *valp);
816 
833 X400MS_CDECL int X400msListGetStrParam(struct X400msListResult *lr,
834  int paramtype,
835  int number,
836  char *buffer,
837  size_t buflen,
838  size_t *paramlenp);
839 
847 X400MS_CDECL void X400msListFree (struct X400msListResult *lr);
848 
862 X400MS_CDECL int X400msMsgNew (struct X400msSession *sp,
863  int type,
864  struct X400msMessage **mpp);
865 
875 X400MS_CDECL int X400msMsgCountRecip(struct X400msMessage *mp, int type, int *cp);
876 
883 X400MS_CDECL int X400msMsgSend (struct X400msMessage *mp);
884 
899 X400MS_CDECL int X400msMsgDelete (struct X400msMessage *mp, int retain);
900 
910 X400MS_CDECL int X400msMsgAddStrParam (struct X400msMessage *mp,
911  int paramtype,
912  const char *value,
913  size_t length);
914 
923 X400MS_CDECL int X400msMsgAddIntParam (struct X400msMessage *mp,
924  int paramtype,
925  int value);
926 
927 
937 X400MS_CDECL int X400msMsgAddAttachment (struct X400msMessage *mp,
938  int type,
939  const char *string,
940  size_t length);
941 
942 
946 X400MS_CDECL int X400msMsgAddBodypart (struct X400msMessage *mp,
947  struct X400Bodypart *bp);
948 
949 
963 X400MS_CDECL int X400msMsgAddMessageBodyWType (struct X400msMessage *mp,
964  struct X400Message *mbp,
965  int type);
966 
967 
981 X400MS_CDECL int X400msMsgAddMessageBodyWType (struct X400msMessage *mp,
982  struct X400Message *mbp,
983  int type);
987 X400MS_CDECL int X400msMsgAddMessageBody (struct X400msMessage *mp,
988  struct X400Message *mbp);
989 
990 
991 struct X400Recipient;
992 
1023 X400MS_CDECL int X400msRecipNew (struct X400msMessage *mp,
1024  int type,
1025  struct X400Recipient **rpp);
1026 
1027 
1037 X400MS_CDECL int X400msRecipAddStrParam (struct X400Recipient *rp,
1038  int paramtype,
1039  const char *value,
1040  size_t length);
1041 
1050 X400MS_CDECL int X400msRecipAddIntParam (struct X400Recipient *rp,
1051  int paramtype,
1052  int value);
1053 
1054 
1066 X400MS_CDECL int X400msWait (struct X400msSession *sp,
1067  int seconds,
1068  int *count);
1069 
1081 X400MS_CDECL int X400msWaitNew (struct X400msSession *sp,
1082  int seconds,
1083  int *count);
1084 
1085 
1108 X400MS_CDECL int X400msMsgGet (struct X400msSession *sp,
1109  int number,
1110  struct X400msMessage **mpp,
1111  int *typep,
1112  int *seqp);
1113 
1137 X400MS_CDECL int X400msMsgGetEx (struct X400msSession *sp,
1138  int number,
1139  int entryclass,
1140  struct X400msMessage **mpp,
1141  int *typep,
1142  int *seqp);
1143 
1166 X400MS_CDECL int X400msMsgGetStart (
1167  struct X400msSession *sp,
1168  int number,
1169  struct X400msMessage **mpp,
1170  int *typep,
1171  int *seqp);
1172 
1196 X400MS_CDECL int X400msMsgGetStartEx (
1197  struct X400msSession *sp,
1198  int number,
1199  int entryclass,
1200  struct X400msMessage **mpp,
1201  int *typep,
1202  int *seqp);
1203 
1207  #define X400_DE_SECURITY_ERROR 12
1208 
1210  #define X400_DE_DELIVERY_CONTROL_VIOLATED 1
1211 
1213  #define X400_DE_UNSUPPORTED_CRITICAL_FUNCTION 13
1214 
1216  #define X400_DE_REMOTE_BIND_ERROR 15
1217 
1219 /* \} */
1220 
1221 
1225  #define X400_SP_ASSEMBLY_INSTRUCTIONS_CONFLICT_WITH_SECURITY_SERVICES 0
1226  #define X400_SP_AUTHENTICATION_PROBLEM 1
1227  #define X400_SP_AUTHENTICATION_FAILURE_ON_SUBJECT_MESSAGE 2
1228  #define X400_SP_CONFIDENTIALITY_ASSOCIATION_PROBLEM 3
1229  #define X400_SP_DECRYPTION_FAILED 4
1230  #define X400_SP_DECRYPTION_KEY_UNOBTAINABLE 5
1231  #define X400_SP_FAILURE_OF_PROOF_OF_MESSAGE 6
1232  #define X400_SP_FORBIDDEN_USER_SECURITY_LABEL_REGISTER 7
1233  #define X400_SP_INCOMPATIBLE_CHANGE_WITH_ORIGINAL_SECURITY_CONTEXT 8
1234  #define X400_SP_INTEGRITY_FAILURE_ON_SUBJECT_MESSAGE 9
1235  #define X400_SP_INVALID_SECURITY_LABEL 10
1236  #define X400_SP_INVALID_SECURITY_LABEL_UPDATE 11
1237  #define X400_SP_KEY_FAILURE 12
1238  #define X400_SP_MANDATORY_PARAMETER_ABSENCE 13
1239  #define X400_SP_OPERATION_SECURITY_FAILURE 14
1240  #define X400_SP_REDIRECTION_PROHIBITED 15
1241  #define X400_SP_REFUSED_ALTERNATE_RECIPIENT_NAME 16
1242  #define X400_SP_REPUDIATION_FAILURE_OF_MESSAGE 17
1243  #define X400_SP_RESPONDER_CREDENTIALS_CHECKING_PROBLEM 18
1244  #define X400_SP_SECURITY_CONTEXT_FAILURE 19
1245  #define X400_SP_SECURITY_CONTEXT_PROBLEM 20
1246  #define X400_SP_SECURITY_POLICY_VIOLATION 21
1247  #define X400_SP_SECURITY_SERVICES_REFUSAL 22
1248  #define X400_SP_TOKEN_DECRYPTION_FAILED 23
1249  #define X400_SP_TOKEN_ERROR 24
1250  #define X400_SP_UNABLE_TO_AGGREGATE_SECURITY_LABELS 25
1251  #define X400_SP_UNAUTHORISED_DL_NAME 26
1252  #define X400_SP_UNAUTHORISED_ENTRY_CLASS 27
1253  #define X400_SP_UNAUTHORISED_ORIGINALLY_INTENDED_RECIPIENT_NAME 28
1254  #define X400_SP_UNAUTHORISED_ORIGINATOR_NAME 29
1255  #define X400_SP_UNAUTHORISED_RECIPIENT_NAME 30
1256  #define X400_SP_UNAUTHORISED_SECURITY_LABEL_UPDATE 31
1257  #define X400_SP_UNAUTHORISED_USER_NAME 32
1258  #define X400_SP_UNKNOWN_SECURITY_LABEL 33
1259  #define X400_SP_UNSUPPORTED_ALGORITHM_IDENTIFIER 34
1260  #define X400_SP_UNSUPPORTED_SECURITY_POLICY 35
1261 
1262 /* \} */
1263 
1264 
1274 X400MS_CDECL int X400msMsgGetFinish (struct X400msMessage *mp,
1275  int errnum,
1276  int problem);
1277 
1278 
1289 X400MS_CDECL int X400msMsgGetStrParam (struct X400msMessage *mp,
1290  int paramtype,
1291  char *buffer,
1292  size_t buflen,
1293  size_t *paramlenp);
1294 
1303 X400MS_CDECL int X400msMsgGetIntParam (struct X400msMessage *mp,
1304  int paramtype,
1305  int *valp);
1306 
1321 X400MS_CDECL int X400msMsgGetAttachment (struct X400msMessage *mp,
1322  int number,
1323  int *typep,
1324  char *buffer,
1325  size_t buflen,
1326  size_t *lengthp);
1327 
1328 
1337 X400MS_CDECL int X400msMsgGetBodypart (struct X400msMessage *mp,
1338  int number,
1339  int *typep,
1340  struct X400Bodypart **bpp);
1341 
1342 
1351 X400MS_CDECL int X400msMsgGetMessageBody (struct X400msMessage *mp,
1352  int number,
1353  struct X400Message **mpp);
1354 
1365 X400MS_CDECL int X400msMsgGetCert(struct X400msMessage *mp,
1366  int certtype,
1367  struct X400Certificate **certp);
1368 
1390 X400MS_CDECL int X400msMakeIPN (struct X400msMessage *mp,
1391  int non_receipt_reason,
1392  struct X400msMessage **mpp);
1393 
1394 
1406 X400MS_CDECL int X400msRecipGet (struct X400msMessage *mp,
1407  int type,
1408  int number,
1409  struct X400Recipient **rpp);
1410 
1411 
1422 X400MS_CDECL int X400msRecipGetStrParam (struct X400Recipient *rp,
1423  int paramtype,
1424  char *buffer,
1425  size_t buflen,
1426  size_t *paramlenp);
1427 
1436 X400MS_CDECL int X400msRecipGetIntParam (struct X400Recipient *rp,
1437  int paramtype,
1438  int *valp);
1439 
1454 X400MS_CDECL int X400msSetIntDefault(struct X400msSession *sp,
1455  int paramtype,
1456  int value);
1457 
1473 X400MS_CDECL int X400msSetStrDefault(struct X400msSession *sp,
1474  int paramtype,
1475  const char *value,
1476  size_t length);
1477 
1490 X400MS_CDECL int X400msTestSecurityEnv(struct X400msSession *sp);
1491 
1492 struct X400msAutoActionParameter;
1493 
1507 X400MS_CDECL int
1508 X400msRegisterAutoAction (struct X400msSession *sp,
1509  int type,
1510  int id,
1511  struct X400msAutoActionParameter *aa_param);
1512 
1524 X400MS_CDECL int
1525 X400msDeregisterAutoAction (struct X400msSession *sp,
1526  int type,
1527  int id);
1528 
1533 X400MS_CDECL struct X400msAutoActionParameter *X400msNewAutoActionParameter(void);
1534 
1540 X400MS_CDECL void
1541 X400msFreeAutoActionParameter(struct X400msAutoActionParameter *aa_param);
1542 
1543 
1551 X400MS_CDECL int
1552 X400msAutoActionParameterAddRecip(struct X400msAutoActionParameter *aap,
1553  int reciptype,
1554  struct X400Recipient *recip);
1555 
1563 X400MS_CDECL int
1564 X400msAutoActionParameterAddIntParam(struct X400msAutoActionParameter *aap,
1565  int paramtype,
1566  int value);
1567 
1576 X400MS_CDECL int
1577 X400msAutoActionParameterAddStrParam(struct X400msAutoActionParameter *aap,
1578  int paramtype,
1579  const char *value,
1580  size_t length);
1586 X400MS_CDECL int
1587 X400msCheckConnection (struct X400msSession *sp);
1588 
1596 X400MS_CDECL int X400msDLExpHistGet (struct X400msMessage *mp,
1597  int entry,
1598  struct X400DLExpHist **hist);
1599 
1607 X400MS_CDECL int X400msDLExpHistNew (
1608  struct X400msMessage *mp,
1609  struct X400DLExpHist **histp
1610 );
1611 
1612 struct X400DLExpHist;
1613 
1614 
1622 X400MS_CDECL int X400msALINew(
1623  struct X400msMessage *mp,
1624  struct X400ALI **ali
1625 );
1626 
1634 X400MS_CDECL int X400msALIGet (
1635  struct X400msMessage *mp,
1636  int entry,
1637  struct X400ALI **info
1638 );
1639 
1640 struct X400ALI;
1641 
1642 
1651 X400MS_CDECL int X400msPSSNew(
1652  struct X400msMessage *mp,
1653  struct X400PSS **pss,
1654  int type
1655 );
1656 
1665 X400MS_CDECL int X400msPSSGet (
1666  struct X400msMessage *mp,
1667  int type,
1668  int entry,
1669  struct X400PSS **pss
1670 );
1671 
1672 struct X400PSS;
1673 
1674 
1681 X400MS_CDECL int X400msDistFieldNew(
1682  struct X400msMessage *mp,
1683  struct X400DistField **pss
1684 );
1685 
1693 X400MS_CDECL int X400msDistFieldGet (
1694  struct X400msMessage *mp,
1695  int entry,
1696  struct X400DistField **pss
1697 );
1698 
1699 struct X400DistField;
1700 
1701 struct X400OtherRecip;
1702 
1703 
1710 X400MS_CDECL int X400msOtherRecipNew(
1711  struct X400msMessage *mp,
1712  struct X400OtherRecip **otherrecip
1713 );
1714 
1722 X400MS_CDECL int X400msOtherRecipGet (
1723  struct X400msMessage *mp,
1724  int entry,
1725  struct X400OtherRecip **otherrecip
1726 );
1727 
1728 
1729 
1737 X400MS_CDECL int X400msRediHistGetEnv(struct X400msMessage *msg,
1738  int entry,
1739  struct X400RediHist **hist);
1740 
1741 
1742 
1751 X400MS_CDECL int X400msTraceInfoGet (
1752  struct X400msMessage *mp,
1753  int entry,
1754  struct X400TraceInfo **info,
1755  int type
1756 );
1757 struct X400TraceInfo;
1758 
1766 X400MS_CDECL int X400msInternalTraceInfoGet (
1767  struct X400msMessage *mp,
1768  int entry,
1769  struct X400InternalTraceInfo **info
1770 );
1771 struct X400InternalTraceInfo;
1772 
1773 
1781 X400MS_CDECL int X400msORandDLGet(struct X400msMessage *msg,
1782  int entry,
1783  struct X400ORandDL **or_and_dl);
1784 
1785 struct X400ORandDL;
1786 
1798 X400MS_CDECL int X400msGetContentOctets(struct X400msMessage *mp,
1799  char *buf,
1800  size_t buflen,
1801  size_t *lenp);
1802 
1803 
1814 X400MS_CDECL int X400msSetContentOctets(struct X400msMessage *mp,
1815  char *buf, size_t len);
1816 
1817 
1824 X400MS_CDECL int X400msACP127RespGet (struct X400msMessage *mp, struct X400ACP127Resp **respp);
1825 
1832 X400MS_CDECL int X400msACP127RespNew(struct X400msMessage *mp, struct X400ACP127Resp **respp);
1833 
1840 X400MS_CDECL struct X400ACP127Resp *X400msACP127RespDeepCopy(struct X400msMessage *mp,
1841  struct X400ACP127Resp *orig);
1842 
1843 
1846 #endif /* _X400_MSAPI_H */
1847 
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.
Definition: x400_msapi.h:296
void X400msAlertCb(struct X400msSession *session)
A callback which will be invoked when a P7 Alert invoke is received.
Definition: x400_msapi.h:339
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 ...
void X400msFreeAutoActionParameter(struct X400msAutoActionParameter *aa_param)
Free an autoaction parameter.
struct X400msAutoActionParameter * X400msNewAutoActionParameter(void)
Create a new (empty) autoaction parameter structure.
int X400msRegisterAutoAction(struct X400msSession *sp, int type, int id, struct X400msAutoActionParameter *aa_param)
Register an autoaction with the Message Store.
int X400msDLExpHistGet(struct X400msMessage *mp, int entry, struct X400DLExpHist **hist)
Create a new DL Expansion History object from the message object.
int X400msSetStrDefault(struct X400msSession *sp, int paramtype, const char *value, size_t length)
Set a default string parameter value in a session.
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.
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:308
int X400msInternalTraceInfoGet(struct X400msMessage *mp, int entry, struct X400InternalTraceInfo **info)
Get an Internal Trace Info object for a message object.
int X400msGetGeneric(struct X400msMessage *mp, struct X400Message **genp)
Generate an X400Message from an X400msMessage.
int X400msAutoActionParameterAddStrParam(struct X400msAutoActionParameter *aap, int paramtype, const char *value, size_t length)
Add string-valued parameter to the autoaction parameter.
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, with before time.
int X400msMsgGetIntParam(struct X400msMessage *mp, int paramtype, int *valp)
Return a integer-valued parameter 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 X400msMsgAddStrParam(struct X400msMessage *mp, int paramtype, const char *value, size_t length)
Add string-valued parameter to the message.
int X400msMsgAddMessageBody(struct X400msMessage *mp, struct X400Message *mbp)
void X400msCancelWait(void)
Signal any threads waiting in X400msWait() function calls to return.
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.
Definition: x400_msapi.h:282
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.
void X400msSetConfigRequest(int val)
Disable and enable configuration requests in MS Bind operations.
int X400msORandDLGet(struct X400msMessage *msg, int entry, struct X400ORandDL **or_and_dl)
Get Originator and DL expansion history object.
int X400msTestSecurityEnv(struct X400msSession *sp)
Test the default Security Environment.
int X400msWaitNew(struct X400msSession *sp, int seconds, int *count)
Wait for new messages to be ready to be read.
int X400msRecipAddIntParam(struct X400Recipient *rp, int paramtype, int value)
Add integer-valued parameter to the message.
int X400msMsgAddBodypart(struct X400msMessage *mp, struct X400Bodypart *bp)
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.
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 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 X400msMsgAddMessageBodyWType(struct X400msMessage *mp, struct X400Message *mbp, int type)
Add a message body part object to a message.
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:246
void * X400msGetUserPointer(struct X400msSession *session)
Get a user pointer value from a session 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 X400msDLExpHistNew(struct X400msMessage *mp, struct X400DLExpHist **histp)
Create a new DL Expansion History object, and associate it with the existing message.
int X400msListEx(struct X400msSession *sp, char *since_time, int entryclass, struct X400msListResult **lrp)
List messages in the P7 Message Store, specifying entryclass.
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)
const char * X400msError(int error)
Obtain a string describing the meaning of the given error code.
int X400msMsgGetBodypart(struct X400msMessage *mp, int number, int *typep, struct X400Bodypart **bpp)
Return a pointer to a body part object.
int X400msMsgNew(struct X400msSession *sp, int type, struct X400msMessage **mpp)
Creates new message.
int X400msClose(struct X400msSession *sp)
Close a X400 Session.
int X400msDeregisterAutoAction(struct X400msSession *sp, int type, int id)
Deregister an autoaction from the Message Store.
int X400msCheckConnection(struct X400msSession *sp)
Check that a connection is still active.
void X400msListFree(struct X400msListResult *lr)
Free the memory occupied by a ListResult.
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 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:411
int X400msMakeIPN(struct X400msMessage *mp, int non_receipt_reason, struct X400msMessage **mpp)
Make an IPN based on the subject IPM.
int X400msMsgAddAttachment(struct X400msMessage *mp, int type, const char *string, size_t length)
Add attachment to the message.
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.
int X400msRecipGet(struct X400msMessage *mp, int type, int number, struct X400Recipient **rpp)
Get recipient object from message.
int X400msRecipAddStrParam(struct X400Recipient *rp, int paramtype, const char *value, size_t length)
Add string-valued parameter to the message.
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 X400msMsgCountRecip(struct X400msMessage *mp, int type, int *cp)
Returns count of addresses of given type in message object.
int X400msACP127RespNew(struct X400msMessage *mp, struct X400ACP127Resp **respp)
Create an ACP127 Notification Response object.
int X400msALIGet(struct X400msMessage *mp, int entry, struct X400ALI **info)
Get a Address List Indicator Object for a message object.
void X400msSetUserPointer(struct X400msSession *session, void *ptr)
Set a user pointer value in a session 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...
struct X400ACP127Resp * X400msACP127RespDeepCopy(struct X400msMessage *mp, struct X400ACP127Resp *orig)
Copy 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, whether the completion is successful or unsuccessful.
Definition: x400_msapi.h:331
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 X400msMsgGetMessageBody(struct X400msMessage *mp, int number, struct X400Message **mpp)
Return a pointer to a message part object.
int X400msAutoActionParameterAddRecip(struct X400msAutoActionParameter *aap, int reciptype, struct X400Recipient *recip)
Add a receipient to the autoaction parameter.
int X400msRecipGetIntParam(struct X400Recipient *rp, int paramtype, int *valp)
Return a integer-valued parameter from the recipient object.
int X400msOtherRecipNew(struct X400msMessage *mp, struct X400OtherRecip **otherrecip)
Create a new P772 Other Recipient 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 X400msMsgSend(struct X400msMessage *mp)
Send message object.
int X400msRecipGetStrParam(struct X400Recipient *rp, int paramtype, char *buffer, size_t buflen, size_t *paramlenp)
Return a string-valued parameter from the recipient object.
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:256
int X400msALINew(struct X400msMessage *mp, struct X400ALI **ali)
Create a new Address List Indicator Object, and associate it with the existing message.
int X400msRecipNew(struct X400msMessage *mp, int type, struct X400Recipient **rpp)
Add new recipient to a message.
X400 Object Interface.
int X400msList(struct X400msSession *sp, char *since_time, struct X400msListResult **lrp)
List messages in the P7 Message Store.
int X400msTraceInfoGet(struct X400msMessage *mp, int entry, struct X400TraceInfo **info, int type)
Get a Trace Info object for a message object.
int X400msSetIntDefault(struct X400msSession *sp, int paramtype, int value)
Set a default integer parameter value in a session.
int X400msListGetIntParam(struct X400msListResult *lr, int paramtype, int number, int *valp)
Get an integer attribute value from an element of a ListResult.
struct X400msSession * X400msNewAsyncSession(int type)
Create a new X400msSession object of the specified type.
void X400msEnableWait(void)
Enable X400msWait() function to work normally again.
int X400msGetHandle(struct X400msSession *session)
Get a handle suitable for use in a call to select()
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.
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.
Definition: x400_msapi.h:268
int X400msDistFieldNew(struct X400msMessage *mp, struct X400DistField **pss)
Create a new P772 Distribution Field object for a message object.
int X400msWait(struct X400msSession *sp, int seconds, int *count)
Wait for messages to be ready to be read.
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 X400msPSSGet(struct X400msMessage *mp, int type, int entry, struct X400PSS **pss)
Get a Printable String Syntax 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.
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.
Definition: x400_msapi.h:320
int X400msACP127RespGet(struct X400msMessage *mp, struct X400ACP127Resp **respp)
Get the ACP127 Notification Response object from a message.
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 X400msMsgGetFinish(struct X400msMessage *mp, int errnum, int problem)
Generate delivery result or error for a message.
int X400msMsgAddIntParam(struct X400msMessage *mp, int paramtype, int value)
Add integer-valued parameter to the message.
int X400msRediHistGetEnv(struct X400msMessage *msg, int entry, struct X400RediHist **hist)
Get the Redirection History object from a message envelope this is represented by 8...
int X400msAutoActionParameterAddIntParam(struct X400msAutoActionParameter *aap, int paramtype, int value)
Add integer-valued parameter to the autoaction parameter.
int X400msMsgDelete(struct X400msMessage *mp, int retain)
Delete message object.