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 
101 X400COMMON_CDECL int X400InitializeLogging (const char *myname, const char *xmlfile);
102 
115 X400COMMON_CDECL int X400MsgNew (int type,
116  struct X400Message **mpp);
117 
127 X400COMMON_CDECL int X400MsgCountRecip(struct X400Message *mp,
128  int recipient_type,
129  int *number);
130 
136 X400COMMON_CDECL int X400MsgFree (struct X400Message *mp);
137 
151 X400COMMON_CDECL int X400MsgAddAttachment (struct X400Message *mp,
152  int type,
153  const char *string,
154  size_t length);
155 
156 
163 X400COMMON_CDECL int X400MsgAddBodypart (struct X400Message *mp,
164  struct X400Bodypart *bp);
165 
168 X400COMMON_CDECL int X400MsgAddMessageBody (struct X400Message *mp,
169  struct X400Message *mbp);
170 
184 X400COMMON_CDECL int X400MsgAddMessageBodyWType (struct X400Message *mp,
185  struct X400Message *mbp,
186  int type);
187 
195 X400COMMON_CDECL int X400MsgAddIntParam (struct X400Message *mp,
196  int paramtype,
197  int value);
198 
208 X400COMMON_CDECL int X400MsgAddStrParam (struct X400Message *mp,
209  int paramtype,
210  const char *value,
211  size_t length);
212 
220 X400COMMON_CDECL int X400MsgAddRecip(struct X400Message *mp,
221  int reciptype,
222  struct X400Recipient *recip);
223 
231 X400COMMON_CDECL int X400MsgGetIntParam(struct X400Message *mp,
232  int paramtype,
233  int *valuep);
234 
244 X400COMMON_CDECL int X400MsgGetStrParam(struct X400Message *mp,
245  int paramtype,
246  char *buffer,
247  size_t buflen,
248  size_t *paramlenp);
249 
266 X400COMMON_CDECL int X400MsgGetAttachment (struct X400Message *mp,
267  int number,
268  int *typep,
269  char *buffer,
270  size_t buflen,
271  size_t *lengthp);
272 
287 X400COMMON_CDECL int X400MsgGetBodypart (struct X400Message *mp,
288  int number,
289  int *typep,
290  struct X400Bodypart **bpp);
291 
300 X400COMMON_CDECL int X400MsgGetMessageBody (struct X400Message *mp,
301  int number,
302  struct X400Message **mbpp);
303 
313 X400COMMON_CDECL int X400MsgGetRecip(struct X400Message *mp,
314  int recip_type,
315  int number,
316  struct X400Recipient **rpp);
317 
328 X400COMMON_CDECL int X400MsgGetCert(struct X400Message *mp,
329  int certtype,
330  struct X400Certificate **certp);
331 
332 
361 X400COMMON_CDECL int X400RecipNew (int type,
362  struct X400Recipient **rpp);
363 
364 
365 
371 X400COMMON_CDECL int X400RecipFree (struct X400Recipient *rpp);
372 
381 X400COMMON_CDECL int X400RecipAddIntParam (struct X400Recipient *rp,
382  int paramtype,
383  int value);
384 
393 X400COMMON_CDECL int X400RecipAddStrParam (struct X400Recipient *rp,
394  int paramtype,
395  const char *value,
396  size_t length);
397 
408 X400COMMON_CDECL int X400RecipGetStrParam (struct X400Recipient *rp,
409  int paramtype,
410  char *buffer,
411  size_t buflen,
412  size_t *paramlenp);
413 
421 X400COMMON_CDECL int X400RecipGetIntParam (struct X400Recipient *rp,
422  int paramtype,
423  int *valp);
424 
425 
426 
437 X400COMMON_CDECL int X400RecipGetCert(struct X400Recipient *rp,
438  int certtype,
439  struct X400Certificate **certp);
440 
441 
451 X400COMMON_CDECL int X400BodypartNew (int type,
452  struct X400Bodypart **bpp);
453 
454 
455 
461 X400COMMON_CDECL int X400BodypartFree (struct X400Bodypart *bpp);
462 
471 X400COMMON_CDECL int X400BodypartAddIntParam (struct X400Bodypart *bp,
472  int paramtype,
473  int value);
474 
483 X400COMMON_CDECL int X400BodypartAddStrParam (struct X400Bodypart *bp,
484  int paramtype,
485  const char *value,
486  size_t length);
487 
498 X400COMMON_CDECL int X400BodypartGetStrParam (struct X400Bodypart *bp,
499  int paramtype,
500  char *buffer,
501  size_t buflen,
502  size_t *paramlenp);
503 
511 X400COMMON_CDECL int X400BodypartGetIntParam (struct X400Bodypart *bp,
512  int paramtype,
513  int *valp);
514 
515 
516 
522 X400COMMON_CDECL int X400DefaultsNew (struct x400_attribute **ap);
523 
529 X400COMMON_CDECL int X400DefaultsFree (struct x400_attribute *ap);
530 
531 
540 X400COMMON_CDECL int X400SetStrDefault(struct x400_attribute *ap,
541  int paramtype,
542  const char *value,
543  size_t length);
544 
552 X400COMMON_CDECL int X400SetIntDefault(struct x400_attribute *ap,
553  int paramtype,
554  int value);
555 
561 X400COMMON_CDECL const char *X400Error(int error);
562 
570 X400COMMON_CDECL int X400DLExpHistGet (struct X400Message *mp,
571  int entry,
572  struct X400DLExpHist **hist);
573 
579 X400COMMON_CDECL int X400DLExpHistDelete (struct X400DLExpHist *hist);
580 
590 X400COMMON_CDECL int X400DLExpHistGetStrParam (struct X400DLExpHist *hist,
591  int paramtype,
592  char *buffer,
593  size_t buflen,
594  size_t *paramlenp);
595 
596 /* For backwards compatibility - function had wrong name originally */
597 #define X400DLGetStrParam X400DLExpHistGetStrParam
598 
604 X400COMMON_CDECL int X400DLExpHistNew (
605  struct X400DLExpHist **histp
606 );
607 
614 X400COMMON_CDECL int X400MsgAddDLExpHist(
615  struct X400Message *mp,
616  struct X400DLExpHist *histp
617 );
618 
619 
628 X400COMMON_CDECL int X400DLExpHistAddStrParam (
629  struct X400DLExpHist *hist,
630  int paramtype,
631  const char *value,
632  size_t length
633 );
634 
640 X400COMMON_CDECL struct X400DLExpHist *X400DLExpHistDeepCopy(struct X400DLExpHist *original);
641 
642 
651 X400COMMON_CDECL int X400TraceInfoGet(struct X400Message *mp,
652  int entry,
653  struct X400TraceInfo **info,
654  int trace_info_type);
655 
665 X400COMMON_CDECL int X400TraceInfoGetStrParam (struct X400TraceInfo *info,
666  int paramtype,
667  char *buffer,
668  size_t buflen ,
669  size_t *paramlenp);
677 X400COMMON_CDECL int X400TraceInfoGetIntParam (struct X400TraceInfo *info,
678  int paramtype,
679  int *valuep);
680 
681 
682 
690 X400COMMON_CDECL int X400TraceInfoNew(
691  struct X400Message *msg,
692  struct X400TraceInfo **info,
693  int type
694 );
695 
696 
704 X400COMMON_CDECL struct X400TraceInfo *X400TraceInfoDeepCopy(struct X400Message *mp,
705  struct X400TraceInfo *original,
706  int type);
707 
715 X400COMMON_CDECL int X400MsgAddTraceInfo(
716  struct X400Message *mp,
717  struct X400TraceInfo *info,
718  int type
719 );
720 
729 X400COMMON_CDECL int X400TraceInfoAddStrParam (
730  struct X400TraceInfo *info,
731  int paramtype,
732  const char *value,
733  size_t length
734 );
735 
736 
744 X400COMMON_CDECL int X400TraceInfoAddIntParam(
745  struct X400TraceInfo *info,
746  int paramtype,
747  int value
748 );
749 
750 
759 X400COMMON_CDECL int X400RediHistAddStrParam (
760  struct X400RediHist *hist,
761  int paramtype,
762  const char *value,
763  size_t length
764 );
765 
773 X400COMMON_CDECL int X400RediHistAddIntParam (
774  struct X400RediHist *hist,
775  int paramtype,
776  int value
777 );
778 
779 
789 X400COMMON_CDECL int X400RediHistGetStrParam (
790  struct X400RediHist *hist,
791  int paramtype,
792  char *value,
793  size_t length,
794  size_t *lengthp
795 );
796 
797 
805 X400COMMON_CDECL int X400RediHistGetIntParam (struct X400RediHist *info,
806  int paramtype,
807  int *valuep);
808 
816 X400COMMON_CDECL int X400RediHistGet(struct X400Recipient *recip,
817  int entry,
818  struct X400RediHist **hist);
819 
826 X400COMMON_CDECL int X400RediHistNew(
827  struct X400Recipient *recip,
828  struct X400RediHist **hist
829 );
830 
838 X400COMMON_CDECL int X400RediHistGetEnv(struct X400Message *msg,
839  int entry,
840  struct X400RediHist **hist);
841 
848 X400COMMON_CDECL int X400RediHistNewEnv(
849  struct X400Message *msg,
850  struct X400RediHist **hist
851 );
852 
853 
860 X400COMMON_CDECL struct X400RediHist *X400RediHistDeepCopyEnv(struct X400Message *msg,
861  struct X400RediHist *original);
862 
863 
870 X400COMMON_CDECL struct X400RediHist *X400RediHistDeepCopy(struct X400Recipient *recip,
871  struct X400RediHist *original);
872 
878 X400COMMON_CDECL const char * X400RediReason(
879  int redirection_reason
880 );
881 
882 
890 X400COMMON_CDECL int X400InternalTraceInfoGet(struct X400Message *mp,
891  int entry,
892  struct X400InternalTraceInfo **info);
893 
900 X400COMMON_CDECL struct X400InternalTraceInfo *X400InternalTraceInfoDeepCopy(
901  struct X400Message *mp,
902  struct X400InternalTraceInfo *original);
903 
910 X400COMMON_CDECL int X400InternalTraceInfoNew(
911  struct X400Message *msg,
912  struct X400InternalTraceInfo **info
913 );
914 
915 
922 X400COMMON_CDECL int X400MsgAddInternalTraceInfo(
923  struct X400Message *mp,
924  struct X400InternalTraceInfo *info
925 );
926 
936 X400COMMON_CDECL int X400InternalTraceInfoGetStrParam (struct X400InternalTraceInfo *info,
937  int paramtype,
938  char *buffer,
939  size_t buflen ,
940  size_t *paramlenp);
941 
949 X400COMMON_CDECL int X400InternalTraceInfoGetIntParam (struct X400InternalTraceInfo *info,
950  int paramtype,
951  int *valuep);
952 
961 X400COMMON_CDECL int X400InternalTraceInfoAddStrParam (
962  struct X400InternalTraceInfo *info,
963  int paramtype,
964  const char *value,
965  size_t length
966 );
967 
968 
976 X400COMMON_CDECL int X400InternalTraceInfoAddIntParam(
977  struct X400InternalTraceInfo *info,
978  int paramtype,
979  int value
980 );
981 
982 
983 
991 X400COMMON_CDECL int X400ALIGet(struct X400Message *mp,
992  int entry,
993  struct X400ALI **ali);
994 
1001 X400COMMON_CDECL int X400ALINew(
1002  struct X400Message *msg,
1003  struct X400ALI **ali
1004 );
1005 
1012 X400COMMON_CDECL struct X400ALI *X400ALIDeepCopy(struct X400Message *mp,
1013  struct X400ALI *ali);
1014 
1024 X400COMMON_CDECL int X400ALIGetStrParam (struct X400ALI *ALI,
1025  int paramtype,
1026  char *buffer,
1027  size_t buflen ,
1028  size_t *paramlenp);
1029 
1037 X400COMMON_CDECL int X400ALIGetIntParam (struct X400ALI *ALI,
1038  int paramtype,
1039  int *valuep);
1040 
1049 X400COMMON_CDECL int X400ALIAddStrParam (
1050  struct X400ALI *info,
1051  int paramtype,
1052  const char *value,
1053  size_t length
1054 );
1055 
1056 
1064 X400COMMON_CDECL int X400ALIAddIntParam(
1065  struct X400ALI *info,
1066  int paramtype,
1067  int value
1068 );
1069 
1078 X400COMMON_CDECL int X400PSSGet(
1079  struct X400Message *mp,
1080  int type,
1081  int entry,
1082  struct X400PSS **pss
1083 );
1084 
1092 X400COMMON_CDECL struct X400PSS *X400PSSDeepCopy(struct X400Message *mp,
1093  struct X400PSS *pss,
1094  int type);
1095 
1103 X400COMMON_CDECL int X400PSSNew(
1104  struct X400Message *msg,
1105  struct X400PSS **pss,
1106  int type
1107 );
1108 
1117 X400COMMON_CDECL int X400PSSGetStrParam (
1118  struct X400PSS *pss,
1119  char *buffer,
1120  size_t buflen ,
1121  size_t *paramlenp
1122 );
1123 
1131 X400COMMON_CDECL int X400PSSAddStrParam (
1132  struct X400PSS *pss,
1133  const char *value,
1134  size_t length
1135 );
1143 X400COMMON_CDECL int X400DistFieldGet(
1144  struct X400Message *mp,
1145  int entry,
1146  struct X400DistField **distfield
1147 );
1148 
1155 X400COMMON_CDECL struct X400DistField *X400DistFieldDeepCopy(struct X400Message *mp,
1156  struct X400DistField *original);
1157 
1164 X400COMMON_CDECL int X400DistFieldNew(
1165  struct X400Message *msg,
1166  struct X400DistField **distfield
1167 );
1168 
1178 X400COMMON_CDECL int X400DistFieldGetStrParam (
1179  struct X400DistField *distfield,
1180  int type,
1181  char *buffer,
1182  size_t buflen ,
1183  size_t *paramlenp
1184 );
1185 
1194 X400COMMON_CDECL int X400DistFieldAddStrParam (
1195  struct X400DistField *distfield,
1196  int type,
1197  const char *value,
1198  size_t length
1199 );
1200 
1208 X400COMMON_CDECL int X400OtherRecipGet (
1209  struct X400Message *mp,
1210  int entry,
1211  struct X400OtherRecip **otherrecip
1212 );
1213 
1220 X400COMMON_CDECL struct X400OtherRecip *X400OtherRecipDeepCopy(struct X400Message *mp,
1221  struct X400OtherRecip *original);
1222 
1229 X400COMMON_CDECL int X400OtherRecipNew(
1230  struct X400Message *mp,
1231  struct X400OtherRecip **otherrecip
1232 );
1233 
1242 X400COMMON_CDECL int X400OtherRecipGetStrParam (
1243  struct X400OtherRecip *otherrecip,
1244  char *buffer,
1245  size_t buflen ,
1246  size_t *paramlenp
1247 );
1248 
1256 X400COMMON_CDECL int X400OtherRecipAddStrParam (
1257  struct X400OtherRecip *otherrecip,
1258  const char *value,
1259  size_t length
1260 );
1261 
1269 X400COMMON_CDECL int X400OtherRecipAddIntParam(
1270  struct X400OtherRecip *otherrecip,
1271  int value
1272 );
1273 
1274 
1281 X400COMMON_CDECL int X400OtherRecipGetIntParam(
1282  struct X400OtherRecip *otherrecip,
1283  int *value
1284 );
1285 
1286 
1287 
1288 
1295 X400COMMON_CDECL int X400ACP127RespGet(
1296  struct X400Message *mp,
1297  struct X400ACP127Resp **resp
1298 );
1299 
1306 X400COMMON_CDECL struct X400ACP127Resp *X400ACP127RespDeepCopy(struct X400Message *mp,
1307  struct X400ACP127Resp *original);
1308 
1315 X400COMMON_CDECL int X400ACP127RespNew(
1316  struct X400Message *mp,
1317  struct X400ACP127Resp **resp
1318 );
1319 
1329 X400COMMON_CDECL int X400ACP127RespGetStrParam (
1330  struct X400ACP127Resp *resp,
1331  int type,
1332  char *buffer,
1333  size_t buflen ,
1334  size_t *paramlenp
1335 );
1336 
1337 
1346 X400COMMON_CDECL int X400ACP127RespAddStrParam (
1347  struct X400ACP127Resp *resp,
1348  int type,
1349  const char *value,
1350  size_t length
1351 );
1352 
1359 X400COMMON_CDECL int X400ACP127RespAddIntParam(
1360  struct X400ACP127Resp *resp,
1361  int value
1362 );
1363 
1364 
1371 X400COMMON_CDECL int X400ACP127RespGetIntParam(
1372  struct X400ACP127Resp *resp,
1373  int *value
1374 );
1375 
1376 
1383 X400COMMON_CDECL int X400ACP127RespNewALI (
1384  struct X400ACP127Resp *resp,
1385  struct X400ALI **ali
1386 );
1387 
1395 X400COMMON_CDECL int X400ACP127RespGetALI (
1396  struct X400ACP127Resp *resp,
1397  struct X400ALI **ali,
1398  int entry
1399 );
1400 
1401 
1410 X400COMMON_CDECL int X400ORandDLAddStrParam (
1411  struct X400ORandDL *or_and_dl,
1412  int type,
1413  const char *value,
1414  size_t length
1415 );
1416 
1423 X400COMMON_CDECL struct X400ORandDL *X400ORandDLDeepCopy(struct X400Message *msg,
1424  struct X400ORandDL *orig);
1425 
1432 X400COMMON_CDECL int X400ORandDLNew(
1433  struct X400Message *msg,
1434  struct X400ORandDL **or_and_dl
1435 );
1436 
1444 X400COMMON_CDECL int X400MsgORandDLGet(
1445  struct X400Message *msg,
1446  int entry,
1447  struct X400ORandDL **or_and_dl
1448 );
1449 
1450 
1460 X400COMMON_CDECL int X400ORandDLGetStrParam (
1461  struct X400ORandDL *or_and_dl,
1462  int paramtype,
1463  char *buffer,
1464  size_t buflen ,
1465  size_t *paramlenp
1466 );
1467 
1478 X400COMMON_CDECL int X400CertGetStrParam (struct X400Certificate *cp,
1479  int paramtype,
1480  char *buffer,
1481  size_t buflen,
1482  size_t *paramlenp);
1483 
1491 X400COMMON_CDECL int X400CertGetIntParam (struct X400Certificate *cp,
1492  int paramtype,
1493  int *valp);
1494 
1495 
1507 X400COMMON_CDECL int X400GetContentOctets(struct X400Message *mp,
1508  char *buf,
1509  size_t buflen,
1510  size_t *lenp);
1511 
1512 
1523 X400COMMON_CDECL int X400SetContentOctets(struct X400Message *mp,
1524  char *buf, size_t len);
1525 
1541 X400COMMON_CDECL int X400SetupSecEnv(
1542  struct X400SecurityEnv **envp,
1543  struct x400_attribute *attrs,
1544  int allow_no_id
1545 );
1546 
1559 X400COMMON_CDECL int X400SetupMessageSecEnv(
1560  struct X400SecurityEnv **msgenvp,
1561  struct x400_attribute *msg_attrs,
1562  struct x400_attribute *default_attrs
1563 );
1564 
1578 X400COMMON_CDECL int X400SetupRecipSecenv (
1579  struct X400SecurityEnv **recipenvp,
1580  struct x400_attribute *recip_attrs,
1581  struct x400_attribute *msg_attrs,
1582  struct x400_attribute *default_attrs
1583 );
1584 
1585 /* \} */
1586 
1587 #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 X400InitializeLogging(const char *myname, const char *xmlfile)
Initialize X.400 API logging. If just the name of the logging configuration file is provided...
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.