Summary: Isode provides a number of APIs which allow integrators and product developers to build components that access the Isode Messaging server products or other products supporting the same protocols.
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 
233 X400MS_CDECL const char *X400msError (int error);
234 
235 struct X400msSession;
236 struct X400msMessage;
237 struct X400msListResult;
238 
239 
247 typedef void X400msConnEstablishedCb(struct X400msSession *session,
248  int errorcode,
249  int alert);
250 
257 typedef void X400msConnDroppedCb(struct X400msSession *session,
258  int reason_code,
259  char *diagnostic);
260 
269 typedef void X400msMsgSubmittedCb(struct X400msSession *session,
270  struct X400msMessage *message,
271  int errorcode);
272 
283 typedef void X400msMsgFetchedCb(struct X400msSession *session,
284  struct X400msMessage *message,
285  int type,
286  int seqno,
287  int errorcode);
288 
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);
456 X400MS_CDECL int X400msOpenAsync (int type,
457  const char *oraddr,
458  const char *dirname,
459  const char *credentials,
460  const char *pa,
461  const char *ret_psw,
462  X400msConnEstablishedCb *conupcb,
463  X400msConnDroppedCb *condowncb,
464  X400msMsgSubmittedCb *msgsubcb,
465  X400msMsgFetchedCb *msgfetchcb,
466  X400msMsgDeletedCb *msgdelcb,
467  X400msMsgWaitingCb *msgwaitcb,
468  X400msListCb *listcb,
469  X400msRegisterCb *registercb,
470  X400msAlertCb *alertcb,
471  X400msManageCb *managecb,
472  X400msManageCb *unmanagecb,
473  struct X400msSession **spp);
474 
515 X400MS_CDECL int X400msOpenAsyncSession (struct X400msSession *sp,
516  const char *addr,
517  const char *dn,
518  const char *credentials,
519  const char *pa,
520  const char *ret_psw,
521  X400msConnEstablishedCb *conupcb,
522  X400msConnDroppedCb *condowncb,
523  X400msMsgSubmittedCb *msgsubcb,
524  X400msMsgFetchedCb *msgfetchcb,
525  X400msMsgDeletedCb *msgdelcb,
526  X400msMsgWaitingCb *msgwaitcb,
527  X400msListCb *listcb,
528  X400msRegisterCb *registercb,
529  X400msAlertCb *alertcb,
530  X400msManageCb *managecb,
531  X400msManageCb *unmanagecb);
532 
539 X400MS_CDECL struct X400msSession *X400msNewAsyncSession(int type);
540 
546 X400MS_CDECL int X400msGetHandle(struct X400msSession *session);
547 
554 X400MS_CDECL void X400msSetUserPointer(struct X400msSession *session,
555  void *ptr);
556 
562 X400MS_CDECL void *X400msGetUserPointer(struct X400msSession *session);
563 
571 X400MS_CDECL int X400msGetGeneric(struct X400msMessage *mp,
572  struct X400Message **genp);
573 
595 X400MS_CDECL int X400msOpen(int type,
596  const char *oraddr,
597  const char *dirname,
598  const char *credentials,
599  const char *pa,
600  int *messages,
601  struct X400msSession **spp);
602 
630 X400MS_CDECL int X400msOpenCheck (int type,
631  const char *oraddr,
632  const char *dirname,
633  const char *credentials,
634  const char *pa,
635  const char *ret_psw,
636  int *messages,
637  struct X400msSession **spp);
638 
647 X400MS_CDECL void X400msSetConfigRequest(int val);
648 
649 
658 X400MS_CDECL void X400msCancelWait(void);
659 
668 X400MS_CDECL void X400msEnableWait(void);
669 
678 X400MS_CDECL int X400msClose (struct X400msSession *sp);
679 
680 
692 X400MS_CDECL int X400msList (struct X400msSession *sp,
693  char *since_time,
694  struct X400msListResult **lrp);
695 
708 X400MS_CDECL int X400msListEx (struct X400msSession *sp,
709  char *since_time,
710  int entryclass,
711  struct X400msListResult **lrp);
712 
713 
728 X400MS_CDECL int X400msListExAux (struct X400msSession *sp,
729  char *since_time,
730  int entryclass,
731  int entrystatus,
732  struct X400msListResult **lrp);
733 
749 X400MS_CDECL int X400msListExAuxPri (
750  struct X400msSession *sp,
751  char *since_time,
752  int entryclass,
753  int entrystatus,
754  int priority,
755  struct X400msListResult **lrp);
756 
772 X400MS_CDECL int X400msListExAuxPriBefore (
773  struct X400msSession *sp,
774  char *since_time,
775  char *before_time,
776  int entryclass,
777  int entrystatus,
778  int priority,
779  struct X400msListResult **lrp);
780 
781 
796 X400MS_CDECL int X400msListGetIntParam(struct X400msListResult *lr,
797  int paramtype,
798  int number,
799  int *valp);
800 
817 X400MS_CDECL int X400msListGetStrParam(struct X400msListResult *lr,
818  int paramtype,
819  int number,
820  char *buffer,
821  size_t buflen,
822  size_t *paramlenp);
823 
831 X400MS_CDECL void X400msListFree (struct X400msListResult *lr);
832 
846 X400MS_CDECL int X400msMsgNew (struct X400msSession *sp,
847  int type,
848  struct X400msMessage **mpp);
849 
859 X400MS_CDECL int X400msMsgCountRecip(struct X400msMessage *mp, int type, int *cp);
860 
867 X400MS_CDECL int X400msMsgSend (struct X400msMessage *mp);
868 
883 X400MS_CDECL int X400msMsgDelete (struct X400msMessage *mp, int retain);
884 
894 X400MS_CDECL int X400msMsgAddStrParam (struct X400msMessage *mp,
895  int paramtype,
896  const char *value,
897  size_t length);
898 
907 X400MS_CDECL int X400msMsgAddIntParam (struct X400msMessage *mp,
908  int paramtype,
909  int value);
910 
911 
921 X400MS_CDECL int X400msMsgAddAttachment (struct X400msMessage *mp,
922  int type,
923  const char *string,
924  size_t length);
925 
926 
930 X400MS_CDECL int X400msMsgAddBodypart (struct X400msMessage *mp,
931  struct X400Bodypart *bp);
932 
933 
947 X400MS_CDECL int X400msMsgAddMessageBodyWType (struct X400msMessage *mp,
948  struct X400Message *mbp,
949  int type);
950 
951 
965 X400MS_CDECL int X400msMsgAddMessageBodyWType (struct X400msMessage *mp,
966  struct X400Message *mbp,
967  int type);
971 X400MS_CDECL int X400msMsgAddMessageBody (struct X400msMessage *mp,
972  struct X400Message *mbp);
973 
974 
975 struct X400Recipient;
976 
1007 X400MS_CDECL int X400msRecipNew (struct X400msMessage *mp,
1008  int type,
1009  struct X400Recipient **rpp);
1010 
1011 
1021 X400MS_CDECL int X400msRecipAddStrParam (struct X400Recipient *rp,
1022  int paramtype,
1023  const char *value,
1024  size_t length);
1025 
1034 X400MS_CDECL int X400msRecipAddIntParam (struct X400Recipient *rp,
1035  int paramtype,
1036  int value);
1037 
1038 
1050 X400MS_CDECL int X400msWait (struct X400msSession *sp,
1051  int seconds,
1052  int *count);
1053 
1065 X400MS_CDECL int X400msWaitNew (struct X400msSession *sp,
1066  int seconds,
1067  int *count);
1068 
1069 
1092 X400MS_CDECL int X400msMsgGet (struct X400msSession *sp,
1093  int number,
1094  struct X400msMessage **mpp,
1095  int *typep,
1096  int *seqp);
1097 
1121 X400MS_CDECL int X400msMsgGetEx (struct X400msSession *sp,
1122  int number,
1123  int entryclass,
1124  struct X400msMessage **mpp,
1125  int *typep,
1126  int *seqp);
1127 
1150 X400MS_CDECL int X400msMsgGetStart (
1151  struct X400msSession *sp,
1152  int number,
1153  struct X400msMessage **mpp,
1154  int *typep,
1155  int *seqp);
1156 
1180 X400MS_CDECL int X400msMsgGetStartEx (
1181  struct X400msSession *sp,
1182  int number,
1183  int entryclass,
1184  struct X400msMessage **mpp,
1185  int *typep,
1186  int *seqp);
1187 
1191  #define X400_DE_SECURITY_ERROR 12
1192 
1194  #define X400_DE_DELIVERY_CONTROL_VIOLATED 1
1195 
1197  #define X400_DE_UNSUPPORTED_CRITICAL_FUNCTION 13
1198 
1200  #define X400_DE_REMOTE_BIND_ERROR 15
1201 
1203 /* \} */
1204 
1214 X400MS_CDECL int X400msMsgGetFinish (struct X400msMessage *mp,
1215  int errnum,
1216  int problem);
1217 
1218 
1229 X400MS_CDECL int X400msMsgGetStrParam (struct X400msMessage *mp,
1230  int paramtype,
1231  char *buffer,
1232  size_t buflen,
1233  size_t *paramlenp);
1234 
1243 X400MS_CDECL int X400msMsgGetIntParam (struct X400msMessage *mp,
1244  int paramtype,
1245  int *valp);
1246 
1261 X400MS_CDECL int X400msMsgGetAttachment (struct X400msMessage *mp,
1262  int number,
1263  int *typep,
1264  char *buffer,
1265  size_t buflen,
1266  size_t *lengthp);
1267 
1268 
1277 X400MS_CDECL int X400msMsgGetBodypart (struct X400msMessage *mp,
1278  int number,
1279  int *typep,
1280  struct X400Bodypart **bpp);
1281 
1282 
1291 X400MS_CDECL int X400msMsgGetMessageBody (struct X400msMessage *mp,
1292  int number,
1293  struct X400Message **mpp);
1294 
1305 X400MS_CDECL int X400msMsgGetCert(struct X400msMessage *mp,
1306  int certtype,
1307  struct X400Certificate **certp);
1308 
1332 X400MS_CDECL int X400msMakeIPN (struct X400msMessage *mp,
1333  int non_receipt_reason,
1334  struct X400msMessage **mpp);
1335 
1336 
1348 X400MS_CDECL int X400msRecipGet (struct X400msMessage *mp,
1349  int type,
1350  int number,
1351  struct X400Recipient **rpp);
1352 
1353 
1364 X400MS_CDECL int X400msRecipGetStrParam (struct X400Recipient *rp,
1365  int paramtype,
1366  char *buffer,
1367  size_t buflen,
1368  size_t *paramlenp);
1369 
1378 X400MS_CDECL int X400msRecipGetIntParam (struct X400Recipient *rp,
1379  int paramtype,
1380  int *valp);
1381 
1396 X400MS_CDECL int X400msSetIntDefault(struct X400msSession *sp,
1397  int paramtype,
1398  int value);
1399 
1415 X400MS_CDECL int X400msSetStrDefault(struct X400msSession *sp,
1416  int paramtype,
1417  const char *value,
1418  size_t length);
1419 
1432 X400MS_CDECL int X400msTestSecurityEnv(struct X400msSession *sp);
1433 
1434 struct X400msAutoActionParameter;
1435 
1449 X400MS_CDECL int
1450 X400msRegisterAutoAction (struct X400msSession *sp,
1451  int type,
1452  int id,
1453  struct X400msAutoActionParameter *aa_param);
1454 
1466 X400MS_CDECL int
1467 X400msDeregisterAutoAction (struct X400msSession *sp,
1468  int type,
1469  int id);
1470 
1475 X400MS_CDECL struct X400msAutoActionParameter *X400msNewAutoActionParameter(void);
1476 
1482 X400MS_CDECL void
1483 X400msFreeAutoActionParameter(struct X400msAutoActionParameter *aa_param);
1484 
1485 
1493 X400MS_CDECL int
1494 X400msAutoActionParameterAddRecip(struct X400msAutoActionParameter *aap,
1495  int reciptype,
1496  struct X400Recipient *recip);
1497 
1505 X400MS_CDECL int
1506 X400msAutoActionParameterAddIntParam(struct X400msAutoActionParameter *aap,
1507  int paramtype,
1508  int value);
1509 
1518 X400MS_CDECL int
1519 X400msAutoActionParameterAddStrParam(struct X400msAutoActionParameter *aap,
1520  int paramtype,
1521  const char *value,
1522  size_t length);
1528 X400MS_CDECL int
1529 X400msCheckConnection (struct X400msSession *sp);
1530 
1538 X400MS_CDECL int X400msDLExpHistGet (struct X400msMessage *mp,
1539  int entry,
1540  struct X400DLExpHist **hist);
1541 
1549 X400MS_CDECL int X400msDLExpHistNew (
1550  struct X400msMessage *mp,
1551  struct X400DLExpHist **histp
1552 );
1553 
1554 struct X400DLExpHist;
1555 
1556 
1564 X400MS_CDECL int X400msALINew(
1565  struct X400msMessage *mp,
1566  struct X400ALI **ali
1567 );
1568 
1576 X400MS_CDECL int X400msALIGet (
1577  struct X400msMessage *mp,
1578  int entry,
1579  struct X400ALI **info
1580 );
1581 
1582 struct X400ALI;
1583 
1584 
1593 X400MS_CDECL int X400msPSSNew(
1594  struct X400msMessage *mp,
1595  struct X400PSS **pss,
1596  int type
1597 );
1598 
1607 X400MS_CDECL int X400msPSSGet (
1608  struct X400msMessage *mp,
1609  int type,
1610  int entry,
1611  struct X400PSS **pss
1612 );
1613 
1614 struct X400PSS;
1615 
1616 
1623 X400MS_CDECL int X400msDistFieldNew(
1624  struct X400msMessage *mp,
1625  struct X400DistField **pss
1626 );
1627 
1635 X400MS_CDECL int X400msDistFieldGet (
1636  struct X400msMessage *mp,
1637  int entry,
1638  struct X400DistField **pss
1639 );
1640 
1641 struct X400DistField;
1642 
1643 struct X400OtherRecip;
1644 
1645 
1652 X400MS_CDECL int X400msOtherRecipNew(
1653  struct X400msMessage *mp,
1654  struct X400OtherRecip **otherrecip
1655 );
1656 
1664 X400MS_CDECL int X400msOtherRecipGet (
1665  struct X400msMessage *mp,
1666  int entry,
1667  struct X400OtherRecip **otherrecip
1668 );
1669 
1670 
1671 
1679 X400MS_CDECL int X400msRediHistGetEnv(struct X400msMessage *msg,
1680  int entry,
1681  struct X400RediHist **hist);
1682 
1683 
1684 
1693 X400MS_CDECL int X400msTraceInfoGet (
1694  struct X400msMessage *mp,
1695  int entry,
1696  struct X400TraceInfo **info,
1697  int type
1698 );
1699 struct X400TraceInfo;
1700 
1708 X400MS_CDECL int X400msInternalTraceInfoGet (
1709  struct X400msMessage *mp,
1710  int entry,
1711  struct X400InternalTraceInfo **info
1712 );
1713 struct X400InternalTraceInfo;
1714 
1715 
1723 X400MS_CDECL int X400msORandDLGet(struct X400msMessage *msg,
1724  int entry,
1725  struct X400ORandDL **or_and_dl);
1726 
1727 struct X400ORandDL;
1728 
1740 X400MS_CDECL int X400msGetContentOctets(struct X400msMessage *mp,
1741  char *buf,
1742  size_t buflen,
1743  size_t *lenp);
1744 
1745 
1756 X400MS_CDECL int X400msSetContentOctets(struct X400msMessage *mp,
1757  char *buf, size_t len);
1758 
1759 
1766 X400MS_CDECL int X400msACP127RespGet (struct X400msMessage *mp, struct X400ACP127Resp **respp);
1767 
1774 X400MS_CDECL int X400msACP127RespNew(struct X400msMessage *mp, struct X400ACP127Resp **respp);
1775 
1782 X400MS_CDECL struct X400ACP127Resp *X400msACP127RespDeepCopy(struct X400msMessage *mp,
1783  struct X400ACP127Resp *orig);
1784 
1785 
1788 #endif /* _X400_MSAPI_H */
1789 
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 and entrystatus.
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:283
int X400msMsgGetStartEx(struct X400msSession *sp, int number, int entryclass, struct X400msMessage **mpp, int *typep, int *seqp)
Get message object for transfer out from MTA.
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 MTA.
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:247
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)
Get recipient object from message.
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 and entrystatus.
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:257
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 MTA.
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:269
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 MTA.
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.