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 
225  #define X400_DE_SECURITY_ERROR 12
226 
228  #define X400_DE_DELIVERY_CONTROL_VIOLATED 1
229 
231  #define X400_DE_UNSUPPORTED_CRITICAL_FUNCTION 13
232 
234  #define X400_DE_REMOTE_BIND_ERROR 15
235 
237 /* \} */
238 
239 
243  #define X400_SP_ASSEMBLY_INSTRUCTIONS_CONFLICT_WITH_SECURITY_SERVICES 0
244  #define X400_SP_AUTHENTICATION_PROBLEM 1
245  #define X400_SP_AUTHENTICATION_FAILURE_ON_SUBJECT_MESSAGE 2
246  #define X400_SP_CONFIDENTIALITY_ASSOCIATION_PROBLEM 3
247  #define X400_SP_DECRYPTION_FAILED 4
248  #define X400_SP_DECRYPTION_KEY_UNOBTAINABLE 5
249  #define X400_SP_FAILURE_OF_PROOF_OF_MESSAGE 6
250  #define X400_SP_FORBIDDEN_USER_SECURITY_LABEL_REGISTER 7
251  #define X400_SP_INCOMPATIBLE_CHANGE_WITH_ORIGINAL_SECURITY_CONTEXT 8
252  #define X400_SP_INTEGRITY_FAILURE_ON_SUBJECT_MESSAGE 9
253  #define X400_SP_INVALID_SECURITY_LABEL 10
254  #define X400_SP_INVALID_SECURITY_LABEL_UPDATE 11
255  #define X400_SP_KEY_FAILURE 12
256  #define X400_SP_MANDATORY_PARAMETER_ABSENCE 13
257  #define X400_SP_OPERATION_SECURITY_FAILURE 14
258  #define X400_SP_REDIRECTION_PROHIBITED 15
259  #define X400_SP_REFUSED_ALTERNATE_RECIPIENT_NAME 16
260  #define X400_SP_REPUDIATION_FAILURE_OF_MESSAGE 17
261  #define X400_SP_RESPONDER_CREDENTIALS_CHECKING_PROBLEM 18
262  #define X400_SP_SECURITY_CONTEXT_FAILURE 19
263  #define X400_SP_SECURITY_CONTEXT_PROBLEM 20
264  #define X400_SP_SECURITY_POLICY_VIOLATION 21
265  #define X400_SP_SECURITY_SERVICES_REFUSAL 22
266  #define X400_SP_TOKEN_DECRYPTION_FAILED 23
267  #define X400_SP_TOKEN_ERROR 24
268  #define X400_SP_UNABLE_TO_AGGREGATE_SECURITY_LABELS 25
269  #define X400_SP_UNAUTHORISED_DL_NAME 26
270  #define X400_SP_UNAUTHORISED_ENTRY_CLASS 27
271  #define X400_SP_UNAUTHORISED_ORIGINALLY_INTENDED_RECIPIENT_NAME 28
272  #define X400_SP_UNAUTHORISED_ORIGINATOR_NAME 29
273  #define X400_SP_UNAUTHORISED_RECIPIENT_NAME 30
274  #define X400_SP_UNAUTHORISED_SECURITY_LABEL_UPDATE 31
275  #define X400_SP_UNAUTHORISED_USER_NAME 32
276  #define X400_SP_UNKNOWN_SECURITY_LABEL 33
277  #define X400_SP_UNSUPPORTED_ALGORITHM_IDENTIFIER 34
278  #define X400_SP_UNSUPPORTED_SECURITY_POLICY 35
279 
280 /* \} */
281 
284 #define X400_TYPE_MS 0
285 
287 #define X400_TYPE_MTA_SUBMIT 1
288 
290 #define X400_TYPE_MTA_BOTH 2
291 
293 /* \} */
294 
297 #define X400_EVENT_READ 1
298 
300 #define X400_EVENT_WRITE 2
301 
303 #define X400_EVENT_ERROR 4
304 
306 #define X400_EVENT_ALL (X400_EVENT_READ | X400_EVENT_WRITE | X400_EVENT_ERROR)
307 
309 /* \} */
310 
313 #define MS_ENTRY_CLASS_STORED_MESSAGES 0
314 
316 #define MS_ENTRY_CLASS_SUBMITTED_MESSAGES 1
317 
319 /* \} */
320 
323 #define MS_ENTRY_STATUS_ANY -1
324 
326 #define MS_ENTRY_STATUS_NEW 0
327 
329 #define MS_ENTRY_STATUS_LISTED 1
330 
332 #define MS_ENTRY_STATUS_FETCHED 2
333 
335 #define MS_ENTRY_STATUS_NEW_OR_LISTED 3
336 
338 #define MS_ENTRY_STATUS_LISTED_OR_FETCHED 4
339 
341 /* \} */
342 
343 
344 #ifndef WANT_DEFINES_ONLY
345 
357 X400MS_CDECL const char *X400msError (int error);
358 
359 struct X400msSession;
360 struct X400msMessage;
361 struct X400msListResult;
362 
363 
371 typedef void X400msConnEstablishedCb(struct X400msSession *session,
372  int errorcode,
373  int alert);
374 
381 typedef void X400msConnDroppedCb(struct X400msSession *session,
382  int reason_code,
383  char *diagnostic);
384 
393 typedef void X400msMsgSubmittedCb(struct X400msSession *session,
394  struct X400msMessage *message,
395  int errorcode);
396 
407 typedef void X400msMsgFetchedCb(struct X400msSession *session,
408  struct X400msMessage *message,
409  int type,
410  int seqno,
411  int errorcode);
412 
421 typedef void X400msMsgDeletedCb(struct X400msSession *session,
422  int seqno,
423  int errorcode);
424 
433 typedef void X400msMsgWaitingCb(struct X400msSession *session,
434  int num_messages_waiting,
435  int errorcode);
436 
445 typedef void X400msListCb(struct X400msSession *session,
446  struct X400msListResult *lrp,
447  int errorcode);
448 
456 typedef void X400msRegisterCb(struct X400msSession *session,
457  int errorcode);
458 
464 typedef void X400msAlertCb(struct X400msSession *session);
465 
475 typedef int X400msManageCb(struct X400msSession *session,
476  int fd,
477  int event_mask);
524 X400MS_CDECL int X400msOpenAsync (int type,
525  const char *oraddr,
526  const char *dirname,
527  const char *credentials,
528  const char *pa,
529  const char *ret_psw,
530  X400msConnEstablishedCb *conupcb,
531  X400msConnDroppedCb *condowncb,
532  X400msMsgSubmittedCb *msgsubcb,
533  X400msMsgFetchedCb *msgfetchcb,
534  X400msMsgDeletedCb *msgdelcb,
535  X400msMsgWaitingCb *msgwaitcb,
536  X400msListCb *listcb,
537  X400msRegisterCb *registercb,
538  X400msAlertCb *alertcb,
539  X400msManageCb *managecb,
540  X400msManageCb *unmanagecb,
541  struct X400msSession **spp);
542 
587 X400MS_CDECL int X400msOpenAsyncSession (struct X400msSession *sp,
588  const char *addr,
589  const char *dn,
590  const char *credentials,
591  const char *pa,
592  const char *ret_psw,
593  X400msConnEstablishedCb *conupcb,
594  X400msConnDroppedCb *condowncb,
595  X400msMsgSubmittedCb *msgsubcb,
596  X400msMsgFetchedCb *msgfetchcb,
597  X400msMsgDeletedCb *msgdelcb,
598  X400msMsgWaitingCb *msgwaitcb,
599  X400msListCb *listcb,
600  X400msRegisterCb *registercb,
601  X400msAlertCb *alertcb,
602  X400msManageCb *managecb,
603  X400msManageCb *unmanagecb);
604 
611 X400MS_CDECL struct X400msSession *X400msNewAsyncSession(int type);
612 
618 X400MS_CDECL int X400msGetHandle(struct X400msSession *session);
619 
626 X400MS_CDECL void X400msSetUserPointer(struct X400msSession *session,
627  void *ptr);
628 
634 X400MS_CDECL void *X400msGetUserPointer(struct X400msSession *session);
635 
643 X400MS_CDECL int X400msGetGeneric(struct X400msMessage *mp,
644  struct X400Message **genp);
645 
671 X400MS_CDECL int X400msOpen(int type,
672  const char *oraddr,
673  const char *dirname,
674  const char *credentials,
675  const char *pa,
676  int *messages,
677  struct X400msSession **spp);
678 
710 X400MS_CDECL int X400msOpenCheck (int type,
711  const char *oraddr,
712  const char *dirname,
713  const char *credentials,
714  const char *pa,
715  const char *ret_psw,
716  int *messages,
717  struct X400msSession **spp);
718 
727 X400MS_CDECL void X400msSetConfigRequest(int val);
728 
729 
738 X400MS_CDECL void X400msCancelWait(void);
739 
748 X400MS_CDECL void X400msEnableWait(void);
749 
761 X400MS_CDECL void X400msCancelWaitSession(struct X400msSession *sp);
762 
773 X400MS_CDECL void X400msEnableWaitSession(struct X400msSession *sp);
774 
783 X400MS_CDECL int X400msClose (struct X400msSession *sp);
784 
785 
797 X400MS_CDECL int X400msList (struct X400msSession *sp,
798  char *since_time,
799  struct X400msListResult **lrp);
800 
813 X400MS_CDECL int X400msListEx (struct X400msSession *sp,
814  char *since_time,
815  int entryclass,
816  struct X400msListResult **lrp);
817 
818 
833 X400MS_CDECL int X400msListExAux (struct X400msSession *sp,
834  char *since_time,
835  int entryclass,
836  int entrystatus,
837  struct X400msListResult **lrp);
838 
854 X400MS_CDECL int X400msListExAuxPri (
855  struct X400msSession *sp,
856  char *since_time,
857  int entryclass,
858  int entrystatus,
859  int priority,
860  struct X400msListResult **lrp);
861 
877 X400MS_CDECL int X400msListExAuxPriBefore (
878  struct X400msSession *sp,
879  char *since_time,
880  char *before_time,
881  int entryclass,
882  int entrystatus,
883  int priority,
884  struct X400msListResult **lrp);
885 
886 
901 X400MS_CDECL int X400msListGetIntParam(struct X400msListResult *lr,
902  int paramtype,
903  int number,
904  int *valp);
905 
922 X400MS_CDECL int X400msListGetStrParam(struct X400msListResult *lr,
923  int paramtype,
924  int number,
925  char *buffer,
926  size_t buflen,
927  size_t *paramlenp);
928 
936 X400MS_CDECL void X400msListFree (struct X400msListResult *lr);
937 
951 X400MS_CDECL int X400msMsgNew (struct X400msSession *sp,
952  int type,
953  struct X400msMessage **mpp);
954 
964 X400MS_CDECL int X400msMsgCountRecip(struct X400msMessage *mp, int type, int *cp);
965 
972 X400MS_CDECL int X400msMsgSend (struct X400msMessage *mp);
973 
988 X400MS_CDECL int X400msMsgDelete (struct X400msMessage *mp, int retain);
989 
999 X400MS_CDECL int X400msMsgAddStrParam (struct X400msMessage *mp,
1000  int paramtype,
1001  const char *value,
1002  size_t length);
1003 
1012 X400MS_CDECL int X400msMsgAddIntParam (struct X400msMessage *mp,
1013  int paramtype,
1014  int value);
1015 
1016 
1026 X400MS_CDECL int X400msMsgAddAttachment (struct X400msMessage *mp,
1027  int type,
1028  const char *string,
1029  size_t length);
1030 
1031 
1035 X400MS_CDECL int X400msMsgAddBodypart (struct X400msMessage *mp,
1036  struct X400Bodypart *bp);
1037 
1038 
1052 X400MS_CDECL int X400msMsgAddMessageBodyWType (struct X400msMessage *mp,
1053  struct X400Message *mbp,
1054  int type);
1055 
1056 
1070 X400MS_CDECL int X400msMsgAddMessageBodyWType (struct X400msMessage *mp,
1071  struct X400Message *mbp,
1072  int type);
1076 X400MS_CDECL int X400msMsgAddMessageBody (struct X400msMessage *mp,
1077  struct X400Message *mbp);
1078 
1079 
1080 struct X400Recipient;
1081 
1112 X400MS_CDECL int X400msRecipNew (struct X400msMessage *mp,
1113  int type,
1114  struct X400Recipient **rpp);
1115 
1116 
1126 X400MS_CDECL int X400msRecipAddStrParam (struct X400Recipient *rp,
1127  int paramtype,
1128  const char *value,
1129  size_t length);
1130 
1139 X400MS_CDECL int X400msRecipAddIntParam (struct X400Recipient *rp,
1140  int paramtype,
1141  int value);
1142 
1143 
1155 X400MS_CDECL int X400msWait (struct X400msSession *sp,
1156  int seconds,
1157  int *count);
1158 
1170 X400MS_CDECL int X400msWaitNew (struct X400msSession *sp,
1171  int seconds,
1172  int *count);
1173 
1174 
1197 X400MS_CDECL int X400msMsgGet (struct X400msSession *sp,
1198  int number,
1199  struct X400msMessage **mpp,
1200  int *typep,
1201  int *seqp);
1202 
1226 X400MS_CDECL int X400msMsgGetEx (struct X400msSession *sp,
1227  int number,
1228  int entryclass,
1229  struct X400msMessage **mpp,
1230  int *typep,
1231  int *seqp);
1232 
1255 X400MS_CDECL int X400msMsgGetStart (
1256  struct X400msSession *sp,
1257  int number,
1258  struct X400msMessage **mpp,
1259  int *typep,
1260  int *seqp);
1261 
1285 X400MS_CDECL int X400msMsgGetStartEx (
1286  struct X400msSession *sp,
1287  int number,
1288  int entryclass,
1289  struct X400msMessage **mpp,
1290  int *typep,
1291  int *seqp);
1292 
1293 
1303 X400MS_CDECL int X400msMsgGetFinish (struct X400msMessage *mp,
1304  int errnum,
1305  int problem);
1306 
1307 
1318 X400MS_CDECL int X400msMsgGetStrParam (struct X400msMessage *mp,
1319  int paramtype,
1320  char *buffer,
1321  size_t buflen,
1322  size_t *paramlenp);
1323 
1332 X400MS_CDECL int X400msMsgGetIntParam (struct X400msMessage *mp,
1333  int paramtype,
1334  int *valp);
1335 
1350 X400MS_CDECL int X400msMsgGetAttachment (struct X400msMessage *mp,
1351  int number,
1352  int *typep,
1353  char *buffer,
1354  size_t buflen,
1355  size_t *lengthp);
1356 
1357 
1366 X400MS_CDECL int X400msMsgGetBodypart (struct X400msMessage *mp,
1367  int number,
1368  int *typep,
1369  struct X400Bodypart **bpp);
1370 
1371 
1380 X400MS_CDECL int X400msMsgGetMessageBody (struct X400msMessage *mp,
1381  int number,
1382  struct X400Message **mpp);
1383 
1394 X400MS_CDECL int X400msMsgGetCert(struct X400msMessage *mp,
1395  int certtype,
1396  struct X400Certificate **certp);
1397 
1419 X400MS_CDECL int X400msMakeIPN (struct X400msMessage *mp,
1420  int non_receipt_reason,
1421  struct X400msMessage **mpp);
1422 
1423 
1435 X400MS_CDECL int X400msRecipGet (struct X400msMessage *mp,
1436  int type,
1437  int number,
1438  struct X400Recipient **rpp);
1439 
1440 
1451 X400MS_CDECL int X400msRecipGetStrParam (struct X400Recipient *rp,
1452  int paramtype,
1453  char *buffer,
1454  size_t buflen,
1455  size_t *paramlenp);
1456 
1465 X400MS_CDECL int X400msRecipGetIntParam (struct X400Recipient *rp,
1466  int paramtype,
1467  int *valp);
1468 
1483 X400MS_CDECL int X400msSetIntDefault(struct X400msSession *sp,
1484  int paramtype,
1485  int value);
1486 
1502 X400MS_CDECL int X400msSetStrDefault(struct X400msSession *sp,
1503  int paramtype,
1504  const char *value,
1505  size_t length);
1506 
1519 X400MS_CDECL int X400msTestSecurityEnv(struct X400msSession *sp);
1520 
1521 struct X400msAutoActionParameter;
1522 
1536 X400MS_CDECL int
1537 X400msRegisterAutoAction (struct X400msSession *sp,
1538  int type,
1539  int id,
1540  struct X400msAutoActionParameter *aa_param);
1541 
1553 X400MS_CDECL int
1554 X400msDeregisterAutoAction (struct X400msSession *sp,
1555  int type,
1556  int id);
1557 
1562 X400MS_CDECL struct X400msAutoActionParameter *X400msNewAutoActionParameter(void);
1563 
1569 X400MS_CDECL void
1570 X400msFreeAutoActionParameter(struct X400msAutoActionParameter *aa_param);
1571 
1572 
1580 X400MS_CDECL int
1581 X400msAutoActionParameterAddRecip(struct X400msAutoActionParameter *aap,
1582  int reciptype,
1583  struct X400Recipient *recip);
1584 
1592 X400MS_CDECL int
1593 X400msAutoActionParameterAddIntParam(struct X400msAutoActionParameter *aap,
1594  int paramtype,
1595  int value);
1596 
1605 X400MS_CDECL int
1606 X400msAutoActionParameterAddStrParam(struct X400msAutoActionParameter *aap,
1607  int paramtype,
1608  const char *value,
1609  size_t length);
1615 X400MS_CDECL int
1616 X400msCheckConnection (struct X400msSession *sp);
1617 
1625 X400MS_CDECL int X400msDLExpHistGet (struct X400msMessage *mp,
1626  int entry,
1627  struct X400DLExpHist **hist);
1628 
1636 X400MS_CDECL int X400msDLExpHistNew (
1637  struct X400msMessage *mp,
1638  struct X400DLExpHist **histp
1639 );
1640 
1641 struct X400DLExpHist;
1642 
1643 
1651 X400MS_CDECL int X400msALINew(
1652  struct X400msMessage *mp,
1653  struct X400ALI **ali
1654 );
1655 
1663 X400MS_CDECL int X400msALIGet (
1664  struct X400msMessage *mp,
1665  int entry,
1666  struct X400ALI **info
1667 );
1668 
1669 struct X400ALI;
1670 
1671 
1680 X400MS_CDECL int X400msPSSNew(
1681  struct X400msMessage *mp,
1682  struct X400PSS **pss,
1683  int type
1684 );
1685 
1694 X400MS_CDECL int X400msPSSGet (
1695  struct X400msMessage *mp,
1696  int type,
1697  int entry,
1698  struct X400PSS **pss
1699 );
1700 
1701 struct X400PSS;
1702 
1703 
1710 X400MS_CDECL int X400msDistFieldNew(
1711  struct X400msMessage *mp,
1712  struct X400DistField **pss
1713 );
1714 
1722 X400MS_CDECL int X400msDistFieldGet (
1723  struct X400msMessage *mp,
1724  int entry,
1725  struct X400DistField **pss
1726 );
1727 
1728 struct X400DistField;
1729 
1730 struct X400OtherRecip;
1731 
1732 
1739 X400MS_CDECL int X400msOtherRecipNew(
1740  struct X400msMessage *mp,
1741  struct X400OtherRecip **otherrecip
1742 );
1743 
1751 X400MS_CDECL int X400msOtherRecipGet (
1752  struct X400msMessage *mp,
1753  int entry,
1754  struct X400OtherRecip **otherrecip
1755 );
1756 
1757 
1758 
1766 X400MS_CDECL int X400msRediHistGetEnv(struct X400msMessage *msg,
1767  int entry,
1768  struct X400RediHist **hist);
1769 
1770 
1771 
1780 X400MS_CDECL int X400msTraceInfoGet (
1781  struct X400msMessage *mp,
1782  int entry,
1783  struct X400TraceInfo **info,
1784  int type
1785 );
1786 struct X400TraceInfo;
1787 
1795 X400MS_CDECL int X400msInternalTraceInfoGet (
1796  struct X400msMessage *mp,
1797  int entry,
1798  struct X400InternalTraceInfo **info
1799 );
1800 struct X400InternalTraceInfo;
1801 
1802 
1810 X400MS_CDECL int X400msORandDLGet(struct X400msMessage *msg,
1811  int entry,
1812  struct X400ORandDL **or_and_dl);
1813 
1814 struct X400ORandDL;
1815 
1827 X400MS_CDECL int X400msGetContentOctets(struct X400msMessage *mp,
1828  char *buf,
1829  size_t buflen,
1830  size_t *lenp);
1831 
1832 
1843 X400MS_CDECL int X400msSetContentOctets(struct X400msMessage *mp,
1844  char *buf, size_t len);
1845 
1846 
1853 X400MS_CDECL int X400msACP127RespGet (struct X400msMessage *mp, struct X400ACP127Resp **respp);
1854 
1861 X400MS_CDECL int X400msACP127RespNew(struct X400msMessage *mp, struct X400ACP127Resp **respp);
1862 
1869 X400MS_CDECL struct X400ACP127Resp *X400msACP127RespDeepCopy(struct X400msMessage *mp,
1870  struct X400ACP127Resp *orig);
1881 X400MS_CDECL int X400msMsgGetRaw (struct X400msSession *sp,
1882  struct X400msMessage *mp,
1883  char *buffer,
1884  size_t buflen,
1885  size_t *buflenp);
1886 
1896 X400MS_CDECL int X400msMsgFromRaw(struct X400msSession *sp,
1897  char *buffer,
1898  size_t buflen,
1899  struct X400msMessage **mpp,
1900  int *typep);
1901 
1904 #endif /* WANT_DEFINES_ONLY */
1905 
1906 #endif /* _X400_MSAPI_H */
1907 
void X400msSetConfigRequest(int val)
Disable and enable configuration requests in MS Bind operations.
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 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.
X400 Object Interface.
int X400msDLExpHistGet(struct X400msMessage *mp, int entry, struct X400DLExpHist **hist)
Create a new DL Expansion History object from the message object.
void X400msSetUserPointer(struct X400msSession *session, void *ptr)
Set a user pointer value in a session object.
int X400msMsgSend(struct X400msMessage *mp)
Send message 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:381
int X400msALINew(struct X400msMessage *mp, struct X400ALI **ali)
Create a new Address List Indicator Object, and associate it with the existing message.
int X400msAutoActionParameterAddIntParam(struct X400msAutoActionParameter *aap, int paramtype, int value)
Add integer-valued parameter to the autoaction parameter.
int X400msAutoActionParameterAddRecip(struct X400msAutoActionParameter *aap, int reciptype, struct X400Recipient *recip)
Add a receipient to the autoaction parameter.
int X400msCheckConnection(struct X400msSession *sp)
Check that a connection is still active.
int X400msGetGeneric(struct X400msMessage *mp, struct X400Message **genp)
Generate an X400Message from an X400msMessage.
void * X400msGetUserPointer(struct X400msSession *session)
Get a user pointer value from a session object.
int X400msDLExpHistNew(struct X400msMessage *mp, struct X400DLExpHist **histp)
Create a new DL Expansion History object, and associate it with the existing message.
int X400msMsgAddAttachment(struct X400msMessage *mp, int type, const char *string, size_t length)
Add attachment to the message.
int X400msMsgGetBodypart(struct X400msMessage *mp, int number, int *typep, struct X400Bodypart **bpp)
Return a pointer to a body part object.
int X400msOpen(int type, const char *oraddr, const char *dirname, const char *credentials, const char *pa, int *messages, struct X400msSession **spp)
Open a session to a Message Store (P7) or MTA (P3) in synchronous mode.
int X400msORandDLGet(struct X400msMessage *msg, int entry, struct X400ORandDL **or_and_dl)
Get Originator and DL expansion history object.
struct X400msSession * X400msNewAsyncSession(int type)
Create a new X400msSession object of the specified type.
struct X400msAutoActionParameter * X400msNewAutoActionParameter(void)
Create a new (empty) autoaction parameter structure.
int X400msDistFieldNew(struct X400msMessage *mp, struct X400DistField **pss)
Create a new P772 Distribution Field object for a 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 X400msMsgAddBodypart(struct X400msMessage *mp, struct X400Bodypart *bp)
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.
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 X400msListGetIntParam(struct X400msListResult *lr, int paramtype, int number, int *valp)
Get an integer attribute value from an element of a ListResult.
int X400msOpenAsync(int type, const char *oraddr, const char *dirname, const char *credentials, const char *pa, const char *ret_psw, X400msConnEstablishedCb *conupcb, X400msConnDroppedCb *condowncb, X400msMsgSubmittedCb *msgsubcb, X400msMsgFetchedCb *msgfetchcb, X400msMsgDeletedCb *msgdelcb, X400msMsgWaitingCb *msgwaitcb, X400msListCb *listcb, X400msRegisterCb *registercb, X400msAlertCb *alertcb, X400msManageCb *managecb, X400msManageCb *unmanagecb, struct X400msSession **spp)
Initiate an asynchronous opening of a session to a Message Store (P7)
int X400msMsgAddMessageBodyWType(struct X400msMessage *mp, struct X400Message *mbp, int type)
Add a message body part object to a message.
void X400msCancelWaitSession(struct X400msSession *sp)
Signal the thread waiting in an X400msWait() function call for the specified MS Session to return.
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 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 X400msEnableWaitSession(struct X400msSession *sp)
Enable X400msWait() function to work normally again for an individual session.
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:433
struct X400ACP127Resp * X400msACP127RespDeepCopy(struct X400msMessage *mp, struct X400ACP127Resp *orig)
Copy an ACP127 Notification Response object.
int X400msClose(struct X400msSession *sp)
Close a X400 Session.
int X400msMsgAddIntParam(struct X400msMessage *mp, int paramtype, int value)
Add integer-valued parameter to the message.
int X400msDeregisterAutoAction(struct X400msSession *sp, int type, int id)
Deregister an autoaction from the Message Store.
int X400msRecipGetIntParam(struct X400Recipient *rp, int paramtype, int *valp)
Return a integer-valued parameter from the recipient object.
void X400msListFree(struct X400msListResult *lr)
Free the memory occupied by a ListResult.
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 X400msOtherRecipNew(struct X400msMessage *mp, struct X400OtherRecip **otherrecip)
Create a new P772 Other Recipient object for a message object.
int X400msRecipAddStrParam(struct X400Recipient *rp, int paramtype, const char *value, size_t length)
Add string-valued parameter to the message.
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 X400msRecipNew(struct X400msMessage *mp, int type, struct X400Recipient **rpp)
Add new recipient to a message.
int X400msACP127RespNew(struct X400msMessage *mp, struct X400ACP127Resp **respp)
Create an ACP127 Notification Response object.
int X400msTraceInfoGet(struct X400msMessage *mp, int entry, struct X400TraceInfo **info, int type)
Get a Trace Info object for a message object.
const char * X400msError(int error)
Obtain a string describing the meaning of the given error code.
int X400msMsgGetMessageBody(struct X400msMessage *mp, int number, struct X400Message **mpp)
Return a pointer to a message part object.
int X400msMsgNew(struct X400msSession *sp, int type, struct X400msMessage **mpp)
Creates new message.
void X400msRegisterCb(struct X400msSession *session, int errorcode)
A callback which will be invoked when a P7 Register operation completes asynchronously,...
Definition: x400_msapi.h:456
int X400msInternalTraceInfoGet(struct X400msMessage *mp, int entry, struct X400InternalTraceInfo **info)
Get an Internal Trace Info object for a message object.
int X400msList(struct X400msSession *sp, char *since_time, struct X400msListResult **lrp)
List messages in the P7 Message Store.
int X400msWait(struct X400msSession *sp, int seconds, int *count)
Wait for messages to be ready to be read.
void X400msAlertCb(struct X400msSession *session)
A callback which will be invoked when a P7 Alert invoke is received.
Definition: x400_msapi.h:464
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 X400msMsgFromRaw(struct X400msSession *sp, char *buffer, size_t buflen, struct X400msMessage **mpp, int *typep)
Reconstruct a message from a binary representation.
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 X400msRecipGet(struct X400msMessage *mp, int type, int number, struct X400Recipient **rpp)
Get recipient object from message.
int X400msRecipGetStrParam(struct X400Recipient *rp, int paramtype, char *buffer, size_t buflen, size_t *paramlenp)
Return a string-valued parameter from the recipient object.
int X400msALIGet(struct X400msMessage *mp, int entry, struct X400ALI **info)
Get a Address List Indicator Object for a message object.
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,...
int X400msMsgGetIntParam(struct X400msMessage *mp, int paramtype, int *valp)
Return a integer-valued parameter from the message object.
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...
int X400msMsgAddMessageBody(struct X400msMessage *mp, struct X400Message *mbp)
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 X400msMsgCountRecip(struct X400msMessage *mp, int type, int *cp)
Returns count of addresses of given type in message object.
int X400msSetIntDefault(struct X400msSession *sp, int paramtype, int value)
Set a default integer parameter value in a session.
int X400msPSSNew(struct X400msMessage *mp, struct X400PSS **pss, int type)
Create a new Printable String Syntax Object, and associate it with the existing message.
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:421
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:371
int X400msTestSecurityEnv(struct X400msSession *sp)
Test the default Security Environment.
int X400msDistFieldGet(struct X400msMessage *mp, int entry, struct X400DistField **pss)
Get a new P772 Distribution Field object for a message object.
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 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 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:475
int X400msPSSGet(struct X400msMessage *mp, int type, int entry, struct X400PSS **pss)
Get a Printable String Syntax Object for a message object.
int X400msMakeIPN(struct X400msMessage *mp, int non_receipt_reason, struct X400msMessage **mpp)
Make an IPN based on the subject IPM.
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,...
Definition: x400_msapi.h:445
int X400msListEx(struct X400msSession *sp, char *since_time, int entryclass, struct X400msListResult **lrp)
List messages in the P7 Message Store, specifying entryclass.
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 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 X400msMsgGetFinish(struct X400msMessage *mp, int errnum, int problem)
Generate delivery result or error for a message.
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:407
int X400msRegisterAutoAction(struct X400msSession *sp, int type, int id, struct X400msAutoActionParameter *aa_param)
Register an autoaction with the Message Store.
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 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 X400msMsgDelete(struct X400msMessage *mp, int retain)
Delete message object.
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:393
void X400msCancelWait(void)
Signal any threads waiting in X400msWait() function calls to return.