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_api.h
Go to the documentation of this file.
1 /* Copyright (c) 2004-2009, 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_API_H
17 
18 #define X400_API_H
19 
20 #include "cdecl.h"
21 #include "x400_att.h"
22 
38 /* generic X400 recipient */
39 struct X400Recipient;
40 
41 /* generic X400 message */
42 struct X400Message;
43 
44 /* generic X400 Body Part (Attachment) */
45 struct X400Bodypart;
46 
47 /* object for Certificate associated with message */
48 struct X400Certificate;
49 
50 /* X400 attribute structure */
51 struct x400_attribute;
52 
53 /* X400 DL Expansion List History*/
54 struct X400DLExpHist;
55 
56 /* X400 Trace Information Object */
57 struct X400TraceInfo;
58 
59 /* X400 Internal Trace Information Object */
60 struct X400InternalTraceInfo;
61 
62 /* X400 Redirection History Object */
63 struct X400RediHist;
64 
65 /* X400 Address List indicator */
66 struct X400ALI;
67 
68 /* X400 Printable String Sequence */
69 struct X400PSS;
70 
71 /* X400 Distribution Field Object*/
72 struct X400DistField;
73 
74 /* X400 Other Recipient Indicator Object */
75 struct X400OtherRecip;
76 
77 /* X400 ACP127 Response Notification */
78 struct X400ACP127Resp;
79 
80 /* X400 Originator and DL history Object */
81 struct X400ORandDL;
82 
83 /* X400 Security Environment */
84 struct X400SecurityEnv;
85 
91 X400COMMON_CDECL int X400Initialize (char *myname);
92 
93 
106 X400COMMON_CDECL int X400MsgNew (int type,
107  struct X400Message **mpp);
108 
118 X400COMMON_CDECL int X400MsgCountRecip(struct X400Message *mp,
119  int recipient_type,
120  int *number);
121 
127 X400COMMON_CDECL int X400MsgFree (struct X400Message *mp);
128 
142 X400COMMON_CDECL int X400MsgAddAttachment (struct X400Message *mp,
143  int type,
144  const char *string,
145  size_t length);
146 
147 
154 X400COMMON_CDECL int X400MsgAddBodypart (struct X400Message *mp,
155  struct X400Bodypart *bp);
156 
159 X400COMMON_CDECL int X400MsgAddMessageBody (struct X400Message *mp,
160  struct X400Message *mbp);
161 
175 X400COMMON_CDECL int X400MsgAddMessageBodyWType (struct X400Message *mp,
176  struct X400Message *mbp,
177  int type);
178 
186 X400COMMON_CDECL int X400MsgAddIntParam (struct X400Message *mp,
187  int paramtype,
188  int value);
189 
199 X400COMMON_CDECL int X400MsgAddStrParam (struct X400Message *mp,
200  int paramtype,
201  const char *value,
202  size_t length);
203 
211 X400COMMON_CDECL int X400MsgAddRecip(struct X400Message *mp,
212  int reciptype,
213  struct X400Recipient *recip);
214 
222 X400COMMON_CDECL int X400MsgGetIntParam(struct X400Message *mp,
223  int paramtype,
224  int *valuep);
225 
235 X400COMMON_CDECL int X400MsgGetStrParam(struct X400Message *mp,
236  int paramtype,
237  char *buffer,
238  size_t buflen,
239  size_t *paramlenp);
240 
257 X400COMMON_CDECL int X400MsgGetAttachment (struct X400Message *mp,
258  int number,
259  int *typep,
260  char *buffer,
261  size_t buflen,
262  size_t *lengthp);
263 
278 X400COMMON_CDECL int X400MsgGetBodypart (struct X400Message *mp,
279  int number,
280  int *typep,
281  struct X400Bodypart **bpp);
282 
291 X400COMMON_CDECL int X400MsgGetMessageBody (struct X400Message *mp,
292  int number,
293  struct X400Message **mbpp);
294 
304 X400COMMON_CDECL int X400MsgGetRecip(struct X400Message *mp,
305  int recip_type,
306  int number,
307  struct X400Recipient **rpp);
308 
319 X400COMMON_CDECL int X400MsgGetCert(struct X400Message *mp,
320  int certtype,
321  struct X400Certificate **certp);
322 
323 
352 X400COMMON_CDECL int X400RecipNew (int type,
353  struct X400Recipient **rpp);
354 
355 
356 
362 X400COMMON_CDECL int X400RecipFree (struct X400Recipient *rpp);
363 
372 X400COMMON_CDECL int X400RecipAddIntParam (struct X400Recipient *rp,
373  int paramtype,
374  int value);
375 
384 X400COMMON_CDECL int X400RecipAddStrParam (struct X400Recipient *rp,
385  int paramtype,
386  const char *value,
387  size_t length);
388 
399 X400COMMON_CDECL int X400RecipGetStrParam (struct X400Recipient *rp,
400  int paramtype,
401  char *buffer,
402  size_t buflen,
403  size_t *paramlenp);
404 
412 X400COMMON_CDECL int X400RecipGetIntParam (struct X400Recipient *rp,
413  int paramtype,
414  int *valp);
415 
416 
417 
428 X400COMMON_CDECL int X400RecipGetCert(struct X400Recipient *rp,
429  int certtype,
430  struct X400Certificate **certp);
431 
432 
442 X400COMMON_CDECL int X400BodypartNew (int type,
443  struct X400Bodypart **bpp);
444 
445 
446 
452 X400COMMON_CDECL int X400BodypartFree (struct X400Bodypart *bpp);
453 
462 X400COMMON_CDECL int X400BodypartAddIntParam (struct X400Bodypart *bp,
463  int paramtype,
464  int value);
465 
474 X400COMMON_CDECL int X400BodypartAddStrParam (struct X400Bodypart *bp,
475  int paramtype,
476  const char *value,
477  size_t length);
478 
489 X400COMMON_CDECL int X400BodypartGetStrParam (struct X400Bodypart *bp,
490  int paramtype,
491  char *buffer,
492  size_t buflen,
493  size_t *paramlenp);
494 
502 X400COMMON_CDECL int X400BodypartGetIntParam (struct X400Bodypart *bp,
503  int paramtype,
504  int *valp);
505 
506 
507 
513 X400COMMON_CDECL int X400DefaultsNew (struct x400_attribute **ap);
514 
520 X400COMMON_CDECL int X400DefaultsFree (struct x400_attribute *ap);
521 
522 
531 X400COMMON_CDECL int X400SetStrDefault(struct x400_attribute *ap,
532  int paramtype,
533  const char *value,
534  size_t length);
535 
543 X400COMMON_CDECL int X400SetIntDefault(struct x400_attribute *ap,
544  int paramtype,
545  int value);
546 
552 X400COMMON_CDECL const char *X400Error(int error);
553 
561 X400COMMON_CDECL int X400DLExpHistGet (struct X400Message *mp,
562  int entry,
563  struct X400DLExpHist **hist);
564 
570 X400COMMON_CDECL int X400DLExpHistDelete (struct X400DLExpHist *hist);
571 
581 X400COMMON_CDECL int X400DLExpHistGetStrParam (struct X400DLExpHist *hist,
582  int paramtype,
583  char *buffer,
584  size_t buflen,
585  size_t *paramlenp);
586 
587 /* For backwards compatibility - function had wrong name originally */
588 #define X400DLGetStrParam X400DLExpHistGetStrParam
589 
595 X400COMMON_CDECL int X400DLExpHistNew (
596  struct X400DLExpHist **histp
597 );
598 
605 X400COMMON_CDECL int X400MsgAddDLExpHist(
606  struct X400Message *mp,
607  struct X400DLExpHist *histp
608 );
609 
610 
619 X400COMMON_CDECL int X400DLExpHistAddStrParam (
620  struct X400DLExpHist *hist,
621  int paramtype,
622  const char *value,
623  size_t length
624 );
625 
631 X400COMMON_CDECL struct X400DLExpHist *X400DLExpHistDeepCopy(struct X400DLExpHist *original);
632 
633 
642 X400COMMON_CDECL int X400TraceInfoGet(struct X400Message *mp,
643  int entry,
644  struct X400TraceInfo **info,
645  int trace_info_type);
646 
656 X400COMMON_CDECL int X400TraceInfoGetStrParam (struct X400TraceInfo *info,
657  int paramtype,
658  char *buffer,
659  size_t buflen ,
660  size_t *paramlenp);
668 X400COMMON_CDECL int X400TraceInfoGetIntParam (struct X400TraceInfo *info,
669  int paramtype,
670  int *valuep);
671 
672 
673 
681 X400COMMON_CDECL int X400TraceInfoNew(
682  struct X400Message *msg,
683  struct X400TraceInfo **info,
684  int type
685 );
686 
687 
695 X400COMMON_CDECL struct X400TraceInfo *X400TraceInfoDeepCopy(struct X400Message *mp,
696  struct X400TraceInfo *original,
697  int type);
698 
706 X400COMMON_CDECL int X400MsgAddTraceInfo(
707  struct X400Message *mp,
708  struct X400TraceInfo *info,
709  int type
710 );
711 
720 X400COMMON_CDECL int X400TraceInfoAddStrParam (
721  struct X400TraceInfo *info,
722  int paramtype,
723  const char *value,
724  size_t length
725 );
726 
727 
735 X400COMMON_CDECL int X400TraceInfoAddIntParam(
736  struct X400TraceInfo *info,
737  int paramtype,
738  int value
739 );
740 
741 
750 X400COMMON_CDECL int X400RediHistAddStrParam (
751  struct X400RediHist *hist,
752  int paramtype,
753  const char *value,
754  size_t length
755 );
756 
764 X400COMMON_CDECL int X400RediHistAddIntParam (
765  struct X400RediHist *hist,
766  int paramtype,
767  int value
768 );
769 
770 
780 X400COMMON_CDECL int X400RediHistGetStrParam (
781  struct X400RediHist *hist,
782  int paramtype,
783  char *value,
784  size_t length,
785  size_t *lengthp
786 );
787 
788 
796 X400COMMON_CDECL int X400RediHistGetIntParam (struct X400RediHist *info,
797  int paramtype,
798  int *valuep);
799 
807 X400COMMON_CDECL int X400RediHistGet(struct X400Recipient *recip,
808  int entry,
809  struct X400RediHist **hist);
810 
817 X400COMMON_CDECL int X400RediHistNew(
818  struct X400Recipient *recip,
819  struct X400RediHist **hist
820 );
821 
829 X400COMMON_CDECL int X400RediHistGetEnv(struct X400Message *msg,
830  int entry,
831  struct X400RediHist **hist);
832 
839 X400COMMON_CDECL int X400RediHistNewEnv(
840  struct X400Message *msg,
841  struct X400RediHist **hist
842 );
843 
844 
851 X400COMMON_CDECL struct X400RediHist *X400RediHistDeepCopyEnv(struct X400Message *msg,
852  struct X400RediHist *original);
853 
854 
861 X400COMMON_CDECL struct X400RediHist *X400RediHistDeepCopy(struct X400Recipient *recip,
862  struct X400RediHist *original);
863 
869 X400COMMON_CDECL const char * X400RediReason(
870  int redirection_reason
871 );
872 
873 
881 X400COMMON_CDECL int X400InternalTraceInfoGet(struct X400Message *mp,
882  int entry,
883  struct X400InternalTraceInfo **info);
884 
891 X400COMMON_CDECL struct X400InternalTraceInfo *X400InternalTraceInfoDeepCopy(
892  struct X400Message *mp,
893  struct X400InternalTraceInfo *original);
894 
901 X400COMMON_CDECL int X400InternalTraceInfoNew(
902  struct X400Message *msg,
903  struct X400InternalTraceInfo **info
904 );
905 
906 
913 X400COMMON_CDECL int X400MsgAddInternalTraceInfo(
914  struct X400Message *mp,
915  struct X400InternalTraceInfo *info
916 );
917 
927 X400COMMON_CDECL int X400InternalTraceInfoGetStrParam (struct X400InternalTraceInfo *info,
928  int paramtype,
929  char *buffer,
930  size_t buflen ,
931  size_t *paramlenp);
932 
940 X400COMMON_CDECL int X400InternalTraceInfoGetIntParam (struct X400InternalTraceInfo *info,
941  int paramtype,
942  int *valuep);
943 
952 X400COMMON_CDECL int X400InternalTraceInfoAddStrParam (
953  struct X400InternalTraceInfo *info,
954  int paramtype,
955  const char *value,
956  size_t length
957 );
958 
959 
967 X400COMMON_CDECL int X400InternalTraceInfoAddIntParam(
968  struct X400InternalTraceInfo *info,
969  int paramtype,
970  int value
971 );
972 
973 
974 
982 X400COMMON_CDECL int X400ALIGet(struct X400Message *mp,
983  int entry,
984  struct X400ALI **ali);
985 
992 X400COMMON_CDECL int X400ALINew(
993  struct X400Message *msg,
994  struct X400ALI **ali
995 );
996 
1003 X400COMMON_CDECL struct X400ALI *X400ALIDeepCopy(struct X400Message *mp,
1004  struct X400ALI *ali);
1005 
1015 X400COMMON_CDECL int X400ALIGetStrParam (struct X400ALI *ALI,
1016  int paramtype,
1017  char *buffer,
1018  size_t buflen ,
1019  size_t *paramlenp);
1020 
1028 X400COMMON_CDECL int X400ALIGetIntParam (struct X400ALI *ALI,
1029  int paramtype,
1030  int *valuep);
1031 
1040 X400COMMON_CDECL int X400ALIAddStrParam (
1041  struct X400ALI *info,
1042  int paramtype,
1043  const char *value,
1044  size_t length
1045 );
1046 
1047 
1055 X400COMMON_CDECL int X400ALIAddIntParam(
1056  struct X400ALI *info,
1057  int paramtype,
1058  int value
1059 );
1060 
1069 X400COMMON_CDECL int X400PSSGet(
1070  struct X400Message *mp,
1071  int type,
1072  int entry,
1073  struct X400PSS **pss
1074 );
1075 
1083 X400COMMON_CDECL struct X400PSS *X400PSSDeepCopy(struct X400Message *mp,
1084  struct X400PSS *pss,
1085  int type);
1086 
1094 X400COMMON_CDECL int X400PSSNew(
1095  struct X400Message *msg,
1096  struct X400PSS **pss,
1097  int type
1098 );
1099 
1108 X400COMMON_CDECL int X400PSSGetStrParam (
1109  struct X400PSS *pss,
1110  char *buffer,
1111  size_t buflen ,
1112  size_t *paramlenp
1113 );
1114 
1122 X400COMMON_CDECL int X400PSSAddStrParam (
1123  struct X400PSS *pss,
1124  const char *value,
1125  size_t length
1126 );
1134 X400COMMON_CDECL int X400DistFieldGet(
1135  struct X400Message *mp,
1136  int entry,
1137  struct X400DistField **distfield
1138 );
1139 
1146 X400COMMON_CDECL struct X400DistField *X400DistFieldDeepCopy(struct X400Message *mp,
1147  struct X400DistField *original);
1148 
1155 X400COMMON_CDECL int X400DistFieldNew(
1156  struct X400Message *msg,
1157  struct X400DistField **distfield
1158 );
1159 
1169 X400COMMON_CDECL int X400DistFieldGetStrParam (
1170  struct X400DistField *distfield,
1171  int type,
1172  char *buffer,
1173  size_t buflen ,
1174  size_t *paramlenp
1175 );
1176 
1185 X400COMMON_CDECL int X400DistFieldAddStrParam (
1186  struct X400DistField *distfield,
1187  int type,
1188  const char *value,
1189  size_t length
1190 );
1191 
1199 X400COMMON_CDECL int X400OtherRecipGet (
1200  struct X400Message *mp,
1201  int entry,
1202  struct X400OtherRecip **otherrecip
1203 );
1204 
1211 X400COMMON_CDECL struct X400OtherRecip *X400OtherRecipDeepCopy(struct X400Message *mp,
1212  struct X400OtherRecip *original);
1213 
1220 X400COMMON_CDECL int X400OtherRecipNew(
1221  struct X400Message *mp,
1222  struct X400OtherRecip **otherrecip
1223 );
1224 
1233 X400COMMON_CDECL int X400OtherRecipGetStrParam (
1234  struct X400OtherRecip *otherrecip,
1235  char *buffer,
1236  size_t buflen ,
1237  size_t *paramlenp
1238 );
1239 
1247 X400COMMON_CDECL int X400OtherRecipAddStrParam (
1248  struct X400OtherRecip *otherrecip,
1249  const char *value,
1250  size_t length
1251 );
1252 
1260 X400COMMON_CDECL int X400OtherRecipAddIntParam(
1261  struct X400OtherRecip *otherrecip,
1262  int value
1263 );
1264 
1265 
1272 X400COMMON_CDECL int X400OtherRecipGetIntParam(
1273  struct X400OtherRecip *otherrecip,
1274  int *value
1275 );
1276 
1277 
1278 
1279 
1286 X400COMMON_CDECL int X400ACP127RespGet(
1287  struct X400Message *mp,
1288  struct X400ACP127Resp **resp
1289 );
1290 
1297 X400COMMON_CDECL struct X400ACP127Resp *X400ACP127RespDeepCopy(struct X400Message *mp,
1298  struct X400ACP127Resp *original);
1299 
1306 X400COMMON_CDECL int X400ACP127RespNew(
1307  struct X400Message *mp,
1308  struct X400ACP127Resp **resp
1309 );
1310 
1320 X400COMMON_CDECL int X400ACP127RespGetStrParam (
1321  struct X400ACP127Resp *resp,
1322  int type,
1323  char *buffer,
1324  size_t buflen ,
1325  size_t *paramlenp
1326 );
1327 
1328 
1337 X400COMMON_CDECL int X400ACP127RespAddStrParam (
1338  struct X400ACP127Resp *resp,
1339  int type,
1340  const char *value,
1341  size_t length
1342 );
1343 
1350 X400COMMON_CDECL int X400ACP127RespAddIntParam(
1351  struct X400ACP127Resp *resp,
1352  int value
1353 );
1354 
1355 
1362 X400COMMON_CDECL int X400ACP127RespGetIntParam(
1363  struct X400ACP127Resp *resp,
1364  int *value
1365 );
1366 
1367 
1374 X400COMMON_CDECL int X400ACP127RespNewALI (
1375  struct X400ACP127Resp *resp,
1376  struct X400ALI **ali
1377 );
1378 
1386 X400COMMON_CDECL int X400ACP127RespGetALI (
1387  struct X400ACP127Resp *resp,
1388  struct X400ALI **ali,
1389  int entry
1390 );
1391 
1392 
1401 X400COMMON_CDECL int X400ORandDLAddStrParam (
1402  struct X400ORandDL *or_and_dl,
1403  int type,
1404  const char *value,
1405  size_t length
1406 );
1407 
1414 X400COMMON_CDECL struct X400ORandDL *X400ORandDLDeepCopy(struct X400Message *msg,
1415  struct X400ORandDL *orig);
1416 
1423 X400COMMON_CDECL int X400ORandDLNew(
1424  struct X400Message *msg,
1425  struct X400ORandDL **or_and_dl
1426 );
1427 
1435 X400COMMON_CDECL int X400MsgORandDLGet(
1436  struct X400Message *msg,
1437  int entry,
1438  struct X400ORandDL **or_and_dl
1439 );
1440 
1441 
1451 X400COMMON_CDECL int X400ORandDLGetStrParam (
1452  struct X400ORandDL *or_and_dl,
1453  int paramtype,
1454  char *buffer,
1455  size_t buflen ,
1456  size_t *paramlenp
1457 );
1458 
1469 X400COMMON_CDECL int X400CertGetStrParam (struct X400Certificate *cp,
1470  int paramtype,
1471  char *buffer,
1472  size_t buflen,
1473  size_t *paramlenp);
1474 
1482 X400COMMON_CDECL int X400CertGetIntParam (struct X400Certificate *cp,
1483  int paramtype,
1484  int *valp);
1485 
1486 
1498 X400COMMON_CDECL int X400GetContentOctets(struct X400Message *mp,
1499  char *buf,
1500  size_t buflen,
1501  size_t *lenp);
1502 
1503 
1514 X400COMMON_CDECL int X400SetContentOctets(struct X400Message *mp,
1515  char *buf, size_t len);
1516 
1532 X400COMMON_CDECL int X400SetupSecEnv(
1533  struct X400SecurityEnv **envp,
1534  struct x400_attribute *attrs,
1535  int allow_no_id
1536 );
1537 
1550 X400COMMON_CDECL int X400SetupMessageSecEnv(
1551  struct X400SecurityEnv **msgenvp,
1552  struct x400_attribute *msg_attrs,
1553  struct x400_attribute *default_attrs
1554 );
1555 
1569 X400COMMON_CDECL int X400SetupRecipSecenv (
1570  struct X400SecurityEnv **recipenvp,
1571  struct x400_attribute *recip_attrs,
1572  struct x400_attribute *msg_attrs,
1573  struct x400_attribute *default_attrs
1574 );
1575 
1576 /* \} */
1577 
1578 #endif
X400COMMON_CDECL struct X400InternalTraceInfo * X400InternalTraceInfoDeepCopy(struct X400Message *mp, struct X400InternalTraceInfo *original)
Copy an existing Internal Trace information object.
X400COMMON_CDECL int X400TraceInfoGetStrParam(struct X400TraceInfo *info, int paramtype, char *buffer, size_t buflen, size_t *paramlenp)
Get string parameter from Trace Information object.
X400COMMON_CDECL int X400ALIGet(struct X400Message *mp, int entry, struct X400ALI **ali)
Get the Address List Indicator information object from a message.
X400COMMON_CDECL struct X400PSS * X400PSSDeepCopy(struct X400Message *mp, struct X400PSS *pss, int type)
Copy a Printable String Sequence object.
X400COMMON_CDECL int X400MsgORandDLGet(struct X400Message *msg, int entry, struct X400ORandDL **or_and_dl)
Get Originator and DL expansion history object.
X400COMMON_CDECL int X400MsgGetAttachment(struct X400Message *mp, int number, int *typep, char *buffer, size_t buflen, size_t *lengthp)
Return data from a simple attachment.
X400COMMON_CDECL int X400MsgAddDLExpHist(struct X400Message *mp, struct X400DLExpHist *histp)
Associates a X400DLExpHist object with a X400Message object.
X400COMMON_CDECL int X400TraceInfoGetIntParam(struct X400TraceInfo *info, int paramtype, int *valuep)
Get int parameter from Trace Information object.
X400COMMON_CDECL int X400OtherRecipGetIntParam(struct X400OtherRecip *otherrecip, int *value)
Get integer parameter from the Other Recipient Indicator object.
X400COMMON_CDECL int X400DistFieldGet(struct X400Message *mp, int entry, struct X400DistField **distfield)
Get the Distribution Code extension Field object from a message.
X400COMMON_CDECL int X400RediHistGet(struct X400Recipient *recip, int entry, struct X400RediHist **hist)
Get the Redirection History object from a recipient.
X400COMMON_CDECL int X400RediHistGetIntParam(struct X400RediHist *info, int paramtype, int *valuep)
Get int parameter from Redirection History object.
X400COMMON_CDECL int X400BodypartFree(struct X400Bodypart *bpp)
Free a body part object.
X400COMMON_CDECL int X400SetupRecipSecenv(struct X400SecurityEnv **recipenvp, struct x400_attribute *recip_attrs, struct x400_attribute *msg_attrs, struct x400_attribute *default_attrs)
Test that the message security environment has been initialised with valid values, ie P12 filename and trusted CA certificate directory.
X400COMMON_CDECL int X400CertGetIntParam(struct X400Certificate *cp, int paramtype, int *valp)
Return a integer-valued parameter from the certificate object.
X400COMMON_CDECL int X400RediHistAddIntParam(struct X400RediHist *hist, int paramtype, int value)
Set an integer value in a Redirection History object.
X400COMMON_CDECL int X400MsgAddRecip(struct X400Message *mp, int reciptype, struct X400Recipient *recip)
Add a recipient object to the message.
X400 Symbolic Constants.
X400COMMON_CDECL int X400ACP127RespAddStrParam(struct X400ACP127Resp *resp, int type, const char *value, size_t length)
Add string-valued parameter to the ACP127 Notification Response object.
X400COMMON_CDECL struct X400RediHist * X400RediHistDeepCopy(struct X400Recipient *recip, struct X400RediHist *original)
Copy an existing Redirection History object into a recipient.
X400COMMON_CDECL int X400DLExpHistGet(struct X400Message *mp, int entry, struct X400DLExpHist **hist)
Create a new DL Expansion History object from the message object.
X400COMMON_CDECL int X400OtherRecipAddIntParam(struct X400OtherRecip *otherrecip, int value)
Add integer parameter to the Other Recipient Indicator object.
X400COMMON_CDECL int X400RediHistGetStrParam(struct X400RediHist *hist, int paramtype, char *value, size_t length, size_t *lengthp)
Get string-valued parameter from the X400RediHist object.
X400COMMON_CDECL struct X400DistField * X400DistFieldDeepCopy(struct X400Message *mp, struct X400DistField *original)
Copy a P772 Distribution Code extension Field object.
X400COMMON_CDECL int X400BodypartGetIntParam(struct X400Bodypart *bp, int paramtype, int *valp)
Return a integer-valued parameter from the body part object.
X400COMMON_CDECL int X400InternalTraceInfoNew(struct X400Message *msg, struct X400InternalTraceInfo **info)
Create a new Trace information object.
X400COMMON_CDECL int X400Initialize(char *myname)
Initialize X.400 API.
X400COMMON_CDECL int X400DistFieldGetStrParam(struct X400DistField *distfield, int type, char *buffer, size_t buflen, size_t *paramlenp)
Get string parameter from Distribution Code extension Field object.
X400COMMON_CDECL int X400ALIGetStrParam(struct X400ALI *ALI, int paramtype, char *buffer, size_t buflen, size_t *paramlenp)
Get string parameter from Address List Indicator object.
X400COMMON_CDECL int X400RediHistGetEnv(struct X400Message *msg, int entry, struct X400RediHist **hist)
Get the Redirection History object from a message envelope this is represented by 8...
X400COMMON_CDECL int X400ORandDLGetStrParam(struct X400ORandDL *or_and_dl, int paramtype, char *buffer, size_t buflen, size_t *paramlenp)
Get string parameter from ACP127 Response object.
X400COMMON_CDECL int X400PSSAddStrParam(struct X400PSS *pss, const char *value, size_t length)
Add string-valued parameter to the PSS info object.
X400COMMON_CDECL int X400RecipGetStrParam(struct X400Recipient *rp, int paramtype, char *buffer, size_t buflen, size_t *paramlenp)
Return a string-valued parameter from the recipient object.
X400COMMON_CDECL int X400TraceInfoAddIntParam(struct X400TraceInfo *info, int paramtype, int value)
Set an integer value in a Trace Info object.
X400COMMON_CDECL int X400DistFieldNew(struct X400Message *msg, struct X400DistField **distfield)
Create a P772 Distribution Code extension Field object.
X400COMMON_CDECL const char * X400Error(int error)
Return string for error code.
X400COMMON_CDECL int X400ALIAddStrParam(struct X400ALI *info, int paramtype, const char *value, size_t length)
Add string-valued parameter to the ALI info object.
X400COMMON_CDECL int X400MsgGetRecip(struct X400Message *mp, int recip_type, int number, struct X400Recipient **rpp)
Get recipient object from message.
X400COMMON_CDECL int X400GetContentOctets(struct X400Message *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 ...
X400COMMON_CDECL int X400ORandDLAddStrParam(struct X400ORandDL *or_and_dl, int type, const char *value, size_t length)
Add string parameter for a Originator and DL Expansion History object.
X400COMMON_CDECL int X400MsgGetStrParam(struct X400Message *mp, int paramtype, char *buffer, size_t buflen, size_t *paramlenp)
Return a string-valued parameter from the message object.
X400COMMON_CDECL int X400RecipAddIntParam(struct X400Recipient *rp, int paramtype, int value)
Add integer-valued parameter to the recipient.
X400COMMON_CDECL int X400ACP127RespGetALI(struct X400ACP127Resp *resp, struct X400ALI **ali, int entry)
Get an Address List Indicator object associated with the X400ACP127 object.
X400COMMON_CDECL int X400RecipGetIntParam(struct X400Recipient *rp, int paramtype, int *valp)
Return a integer-valued parameter from the recipient object.
X400COMMON_CDECL int X400DLExpHistGetStrParam(struct X400DLExpHist *hist, int paramtype, char *buffer, size_t buflen, size_t *paramlenp)
Return a string parameter from the DL Expansion History object.
X400COMMON_CDECL int X400OtherRecipGet(struct X400Message *mp, int entry, struct X400OtherRecip **otherrecip)
Get a new P772 Other Recipient object for a message object.
X400COMMON_CDECL struct X400OtherRecip * X400OtherRecipDeepCopy(struct X400Message *mp, struct X400OtherRecip *original)
Copy a P772 Other Recipient object.
X400COMMON_CDECL int X400MsgGetIntParam(struct X400Message *mp, int paramtype, int *valuep)
Return a integer-valued parameter from the message object.
X400COMMON_CDECL int X400InternalTraceInfoGetIntParam(struct X400InternalTraceInfo *info, int paramtype, int *valuep)
Get int parameter from Internal Trace Information object.
X400COMMON_CDECL struct X400TraceInfo * X400TraceInfoDeepCopy(struct X400Message *mp, struct X400TraceInfo *original, int type)
Copy an existing Trace information object.
X400COMMON_CDECL int X400MsgAddMessageBody(struct X400Message *mp, struct X400Message *mbp)
X400COMMON_CDECL int X400MsgCountRecip(struct X400Message *mp, int recipient_type, int *number)
Returns count of addresses of given type in message object.
X400COMMON_CDECL int X400DistFieldAddStrParam(struct X400DistField *distfield, int type, const char *value, size_t length)
Add string-valued parameter to the DistField info object.
X400COMMON_CDECL int X400ALIAddIntParam(struct X400ALI *info, int paramtype, int value)
Set an integer value in an Address List Indicator object.
X400COMMON_CDECL int X400ORandDLNew(struct X400Message *msg, struct X400ORandDL **or_and_dl)
Create new Originator and DL Expansion history object.
X400COMMON_CDECL int X400MsgAddTraceInfo(struct X400Message *mp, struct X400TraceInfo *info, int type)
Create a new Trace information object.
X400COMMON_CDECL int X400ACP127RespNew(struct X400Message *mp, struct X400ACP127Resp **resp)
Create an ACP127 Notification Response object.
X400COMMON_CDECL int X400PSSGetStrParam(struct X400PSS *pss, char *buffer, size_t buflen, size_t *paramlenp)
Get string parameter from Printable String Sequence object.
X400COMMON_CDECL int X400DLExpHistNew(struct X400DLExpHist **histp)
Create a new X400DLExpHist object.
X400COMMON_CDECL int X400InternalTraceInfoGet(struct X400Message *mp, int entry, struct X400InternalTraceInfo **info)
Get the Trace information object from a message.
X400COMMON_CDECL struct X400ALI * X400ALIDeepCopy(struct X400Message *mp, struct X400ALI *ali)
Copy an Address List Indicator object.
X400COMMON_CDECL int X400MsgFree(struct X400Message *mp)
Frees a message.
X400COMMON_CDECL int X400RecipGetCert(struct X400Recipient *rp, int certtype, struct X400Certificate **certp)
Get certificate object from recipient This returns a certificate which was used to sign an object in ...
X400COMMON_CDECL int X400BodypartGetStrParam(struct X400Bodypart *bp, int paramtype, char *buffer, size_t buflen, size_t *paramlenp)
Return a string-valued parameter from the body part object.
X400COMMON_CDECL int X400InternalTraceInfoAddStrParam(struct X400InternalTraceInfo *info, int paramtype, const char *value, size_t length)
Add string-valued parameter to the Internal Trace info object.
X400COMMON_CDECL int X400TraceInfoGet(struct X400Message *mp, int entry, struct X400TraceInfo **info, int trace_info_type)
Get the Trace information object from a message.
X400COMMON_CDECL int X400SetupSecEnv(struct X400SecurityEnv **envp, struct x400_attribute *attrs, int allow_no_id)
Test that the default (sessions) security environment has been initialised with valid values...
X400COMMON_CDECL int X400SetStrDefault(struct x400_attribute *ap, int paramtype, const char *value, size_t length)
Set a string value in a defaults object.
X400COMMON_CDECL int X400BodypartNew(int type, struct X400Bodypart **bpp)
Create a new body part object.
X400COMMON_CDECL struct X400ACP127Resp * X400ACP127RespDeepCopy(struct X400Message *mp, struct X400ACP127Resp *original)
Copy an ACP127 Notification Response object.
X400COMMON_CDECL int X400TraceInfoNew(struct X400Message *msg, struct X400TraceInfo **info, int type)
Create a new Trace information object.
X400COMMON_CDECL int X400ALIGetIntParam(struct X400ALI *ALI, int paramtype, int *valuep)
Get int parameter from Address List Indicator object.
X400COMMON_CDECL int X400MsgNew(int type, struct X400Message **mpp)
Creates new message.
X400COMMON_CDECL int X400OtherRecipAddStrParam(struct X400OtherRecip *otherrecip, const char *value, size_t length)
Add string-valued parameter to the Other Recipient Indicator object.
X400COMMON_CDECL int X400ACP127RespGetIntParam(struct X400ACP127Resp *resp, int *value)
Get integer parameter from the ACP127 Notification Response object.
X400COMMON_CDECL int X400MsgAddIntParam(struct X400Message *mp, int paramtype, int value)
Add integer-valued parameter to the message.
X400COMMON_CDECL int X400MsgGetBodypart(struct X400Message *mp, int number, int *typep, struct X400Bodypart **bpp)
Return a pointer to a body part object.
X400COMMON_CDECL int X400RecipFree(struct X400Recipient *rpp)
Free a recipient object.
X400COMMON_CDECL int X400MsgAddAttachment(struct X400Message *mp, int type, const char *string, size_t length)
Add an attachment to the message.
X400COMMON_CDECL int X400ACP127RespAddIntParam(struct X400ACP127Resp *resp, int value)
Add integer parameter to the ACP127 Notification Response object.
X400COMMON_CDECL int X400TraceInfoAddStrParam(struct X400TraceInfo *info, int paramtype, const char *value, size_t length)
Add string-valued parameter to the X400TraceInfo object.
X400COMMON_CDECL int X400InternalTraceInfoGetStrParam(struct X400InternalTraceInfo *info, int paramtype, char *buffer, size_t buflen, size_t *paramlenp)
Get string parameter from Internal Trace Information object.
X400COMMON_CDECL int X400DefaultsFree(struct x400_attribute *ap)
Free a defaults object.
X400COMMON_CDECL int X400ACP127RespGet(struct X400Message *mp, struct X400ACP127Resp **resp)
Get the ACP127 Notification Response object from a message.
X400COMMON_CDECL int X400DLExpHistDelete(struct X400DLExpHist *hist)
Delete the DL Expansion History object.
X400COMMON_CDECL int X400RediHistNewEnv(struct X400Message *msg, struct X400RediHist **hist)
Create a new Redirection History object for a message envelope this is represented by 8...
X400COMMON_CDECL int X400MsgGetMessageBody(struct X400Message *mp, int number, struct X400Message **mbpp)
Return a pointer to a body part object.
X400COMMON_CDECL int X400BodypartAddStrParam(struct X400Bodypart *bp, int paramtype, const char *value, size_t length)
Add string-valued parameter to the body part.
X400COMMON_CDECL int X400BodypartAddIntParam(struct X400Bodypart *bp, int paramtype, int value)
Add integer-valued parameter to the body part.
X400COMMON_CDECL int X400CertGetStrParam(struct X400Certificate *cp, int paramtype, char *buffer, size_t buflen, size_t *paramlenp)
Return a string-valued parameter from the certificate object.
X400COMMON_CDECL int X400MsgAddBodypart(struct X400Message *mp, struct X400Bodypart *bp)
Add a body part object to a message.
X400COMMON_CDECL int X400ACP127RespNewALI(struct X400ACP127Resp *resp, struct X400ALI **ali)
Create new Address List Indicator object associated with the X400ACP127 Resp.
X400COMMON_CDECL int X400InternalTraceInfoAddIntParam(struct X400InternalTraceInfo *info, int paramtype, int value)
Set an integer value in an Internal Trace Info object.
X400COMMON_CDECL const char * X400RediReason(int redirection_reason)
Return a human readable string based on a redirection reason.
X400COMMON_CDECL int X400RecipNew(int type, struct X400Recipient **rpp)
Create a new recipient object.
X400COMMON_CDECL int X400MsgAddInternalTraceInfo(struct X400Message *mp, struct X400InternalTraceInfo *info)
Create a new Trace information object.
X400COMMON_CDECL int X400SetContentOctets(struct X400Message *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 ...
X400COMMON_CDECL int X400RediHistAddStrParam(struct X400RediHist *hist, int paramtype, const char *value, size_t length)
Add string-valued parameter to the X400RediHist object.
X400COMMON_CDECL struct X400RediHist * X400RediHistDeepCopyEnv(struct X400Message *msg, struct X400RediHist *original)
Copy an existing Redirection History object into a message.
X400COMMON_CDECL int X400MsgGetCert(struct X400Message *mp, int certtype, struct X400Certificate **certp)
Get certificate object from message This returns a certificate which was used to sign an object in th...
X400COMMON_CDECL int X400RediHistNew(struct X400Recipient *recip, struct X400RediHist **hist)
Create a new Redirection History object.
X400COMMON_CDECL int X400MsgAddStrParam(struct X400Message *mp, int paramtype, const char *value, size_t length)
Add string-valued parameter to the message.
X400COMMON_CDECL int X400OtherRecipGetStrParam(struct X400OtherRecip *otherrecip, char *buffer, size_t buflen, size_t *paramlenp)
Get string parameter from Other Recipient object.
X400COMMON_CDECL int X400ALINew(struct X400Message *msg, struct X400ALI **ali)
Create an Address List Indicator object.
X400COMMON_CDECL struct X400ORandDL * X400ORandDLDeepCopy(struct X400Message *msg, struct X400ORandDL *orig)
Copy Originator and DL Expansion history object.
X400COMMON_CDECL int X400SetIntDefault(struct x400_attribute *ap, int paramtype, int value)
Set an integer value in a defaults object.
X400COMMON_CDECL struct X400DLExpHist * X400DLExpHistDeepCopy(struct X400DLExpHist *original)
Copy an existing DL Expansion History object.
X400COMMON_CDECL int X400OtherRecipNew(struct X400Message *mp, struct X400OtherRecip **otherrecip)
Create a new P772 Other Recipient object for a message object.
X400COMMON_CDECL int X400MsgAddMessageBodyWType(struct X400Message *mp, struct X400Message *mbp, int type)
Add a message body part object to a message.
X400COMMON_CDECL int X400PSSGet(struct X400Message *mp, int type, int entry, struct X400PSS **pss)
Get the Printable String Sequence object from a message.
X400COMMON_CDECL int X400RecipAddStrParam(struct X400Recipient *rp, int paramtype, const char *value, size_t length)
Add string-valued parameter to the recipient.
X400COMMON_CDECL int X400ACP127RespGetStrParam(struct X400ACP127Resp *resp, int type, char *buffer, size_t buflen, size_t *paramlenp)
Get string parameter from ACP127 Notification Response object.
X400COMMON_CDECL int X400DLExpHistAddStrParam(struct X400DLExpHist *hist, int paramtype, const char *value, size_t length)
Add string-valued parameter to the X400DLExpHist object.
X400COMMON_CDECL int X400PSSNew(struct X400Message *msg, struct X400PSS **pss, int type)
Create a Printable String Sequence object.
X400COMMON_CDECL int X400SetupMessageSecEnv(struct X400SecurityEnv **msgenvp, struct x400_attribute *msg_attrs, struct x400_attribute *default_attrs)
Test that the message security environment has been initialised with valid values, ie P12 filename and trusted CA certificate directory.
X400COMMON_CDECL int X400DefaultsNew(struct x400_attribute **ap)
Return a new defaults object.