Summary: Isode provides a number of APIs which allow integrators and product developers to build components that allow client programs to connect to, query and modify data in the directory.
dsapi.h
Go to the documentation of this file.
1 /* Emacs mode: -*- C -*- */
2 
3 /*
4  * Copyright (c) 2004-2017, Isode Limited, London, England.
5  * All rights reserved.
6  *
7  * Acquisition and use of this software and related materials for any
8  * purpose requires a written licence agreement from Isode
9  * Limited, or a written licence from an organisation licenced by Isode
10  * Limited to grant such a licence.
11  *
12  */
13 
14 /*
15  * dsapi.h
16  *
17  * Simple directory API directory operations.
18  *
19  */
20 
21 /*
22  *
23  *
24  * @VERSION@
25  */
26 
27 #ifndef ISODE_DSAPI_H
28 #define ISODE_DSAPI_H
29 
30 #include <isode/ds/dsapi/dsapi_cdecl.h>
38 
359 LIBDSAPI_CDECL
361  void
362 );
363 
377 LIBDSAPI_CDECL
379  int
380 );
381 
402 LIBDSAPI_CDECL
404  const char *path
405 );
406 
429 LIBDSAPI_CDECL
430 void DS_UninitializeSecurity (void);
431 
450 LIBDSAPI_CDECL
451 int DS_Version (
452  void
453 );
454 
501 LIBDSAPI_CDECL
503  const char *address,
504  int force_tls,
505  DS_Session **session_p
506 );
507 
524 LIBDSAPI_CDECL
526  DS_Session *session,
527  DS_CommonArgs *common_args,
528  DS_Indication **indication_p
529 );
530 
544 LIBDSAPI_CDECL
546  const char *address,
547  DS_Session **session_p
548 ) DSAPI_DEPRECATED;
549 
567 LIBDSAPI_CDECL
569  DS_Session *session,
570  const DS_DN *dn,
571  const char *password,
572  DS_CommonArgs *common_args,
573  DS_Indication **indication_p
574 );
575 
592 LIBDSAPI_CDECL
594  const char *address,
595  const DS_DN *dn,
596  const char *password,
597  DS_Session **session_p
598 ) DSAPI_DEPRECATED;
599 
620 LIBDSAPI_CDECL
622  DS_Session *session,
623  const DS_DN *dsa_dn,
624  const DS_DN *dn,
625  const char *password,
626  DS_CommonArgs *common_args,
627  DS_Indication **indication_p
628 );
629 
650 LIBDSAPI_CDECL
652  const char *address,
653  const DS_DN *dsa_dn,
654  const DS_DN *dn,
655  const char *password,
656  DS_Session **session_p
657 ) DSAPI_DEPRECATED;
658 
691 LIBDSAPI_CDECL
692 const char ** DS_SaslMechList(void);
693 
694 LIBDSAPI_CDECL
695 DS_Status DS_BindSASLSync (
696  DS_Session *session,
697  const char *mechanism,
698  const char *userid,
699  const char *secret,
700  DS_CommonArgs *common_args,
701  DS_Indication **indication_p
702 );
703 
723 LIBDSAPI_CDECL
725  const char *address,
726  const char *mechanism,
727  const char *userid,
728  const char *secret,
729  DS_Session **session_p
730 ) DSAPI_DEPRECATED;
731 
747 LIBDSAPI_CDECL
749  DS_Session *session,
750  const DS_BindParams *bind_params,
751  DS_CommonArgs *common_args,
752  DS_Indication **indication_p);
753 
760 LIBDSAPI_CDECL
761 void DS_UnbindSync (
762  DS_Session **session_p
763 );
764 
787 LIBDSAPI_CDECL
789  const DS_Session *session_p,
790  DSSessionState *state_p
791 );
792 
854 LIBDSAPI_CDECL
856  const DS_Session *session_p,
857  DS_AttrValList **av_list_p,
858  int *identity_check_result
859 );
860 
861 
886 LIBDSAPI_CDECL
888  DS_Session *session,
889  int allow_unknown
890 );
891 
892 
902 LIBDSAPI_CDECL
904  DS_Session *session,
905  int *allow_unknown_p
906 );
907 
908 
961 LIBDSAPI_CDECL
963  DS_Session *session,
964  const DS_DN *dn,
965  const char *attr_selection[],
966  DS_CommonArgs *common_args,
967  DS_Indication **indication_p
968 );
969 
1015 LIBDSAPI_CDECL
1017  DS_Session *session,
1018  const DS_DN *base_dn,
1019  const char *filter,
1020  DSSearchScope search_scope,
1021  const char *attr_selection[],
1022  DS_CommonArgs *common_args,
1023  DS_Indication **indication_p
1024 );
1025 
1048 LIBDSAPI_CDECL
1050  DS_Session *session,
1051  DS_Indication *di
1052 );
1053 
1064 LIBDSAPI_CDECL
1066  DS_Session *session,
1067  const DS_Entry *entry,
1068  const DS_CommonArgs *common_args,
1069  DS_Indication **indication_p
1070 );
1071 
1083 LIBDSAPI_CDECL
1085  DS_Session *session,
1086  const DS_DN *dn,
1087  const DS_AttrList *attrs,
1088  const DS_CommonArgs *common_args,
1089  DS_Indication **indication_p
1090 );
1091 
1102 LIBDSAPI_CDECL
1104  DS_Session *session,
1105  const DS_DN *dn,
1106  const DS_CommonArgs *common_args,
1107  DS_Indication **indication_p
1108 );
1109 
1120 LIBDSAPI_CDECL
1122  DS_Session *session,
1123  const DS_Entry *entry,
1124  const DS_CommonArgs *common_args,
1125  DS_Indication **indication_p
1126 );
1127 
1139 LIBDSAPI_CDECL
1141  DS_Session *session,
1142  const DS_DN *dn,
1143  const DS_AttrList *changes,
1144  const DS_CommonArgs *common_args,
1145  DS_Indication **indication_p
1146 );
1147 
1160 LIBDSAPI_CDECL
1162  DS_Session *session,
1163  const DS_DN *old_dn,
1164  const DS_DN *new_dn,
1165  int delete_old_rdn,
1166  const DS_CommonArgs *common_args,
1167  DS_Indication **indication_p
1168 );
1169 
1198 LIBDSAPI_CDECL
1200  DS_Session *session,
1201  const DS_DN *dn,
1202  const DS_Attr *attr,
1203  const DS_CommonArgs *common_args,
1204  DS_Indication **indication_p
1205 );
1206 
1261 LIBDSAPI_CDECL
1263  DS_Session *session,
1264  const DS_DN *dn,
1265  const char *attr_selection[],
1266  DS_CommonArgs *common_args,
1267  int *ret_op_id
1268 );
1269 
1278 LIBDSAPI_CDECL
1280  DS_Session *session,
1281  DS_Indication **indication_p
1282 );
1283 
1295 LIBDSAPI_CDECL
1297  DS_Session *session,
1298  unsigned char *txn_id,
1299  size_t txn_id_len,
1300  char commit,
1301  DS_Indication **indication_p
1302 );
1303 
1320 LIBDSAPI_CDECL
1322  DS_Session *session,
1323  int op_id,
1324  DS_Indication **indication_p
1325 );
1326 
1340 LIBDSAPI_CDECL
1342  DS_Session *session,
1343  int op_id
1344 );
1345 
1373 LIBDSAPI_CDECL
1375  DS_Indication *indication,
1376  DS_ErrorType *type_p
1377 );
1378 
1395 LIBDSAPI_CDECL
1397  DS_Indication *indication,
1398  DS_ErrorType *type_p,
1399  DS_ErrorValue *value_p
1400 );
1401 
1429 LIBDSAPI_CDECL
1431  DS_Indication *indication,
1432  int *sign_error_p
1433 );
1434 
1435 
1447 LIBDSAPI_CDECL
1449  DS_Indication *indication,
1450  DSLimitProblem *limit_p
1451 );
1452 
1467 LIBDSAPI_CDECL
1469  DS_Indication *indication,
1470  int *ret_num_p
1471 );
1472 
1488 LIBDSAPI_CDECL
1490  DS_Indication *indication,
1491  const DS_EntryList **entry_list_p
1492 );
1493 
1527 LIBDSAPI_CDECL
1529  DS_Indication *indication
1530 );
1531 
1532 
1550 LIBDSAPI_CDECL
1552  DS_Indication *indication,
1553  int *matched
1554 );
1555 
1573 LIBDSAPI_CDECL
1575  DS_Indication *indication,
1576  unsigned char **txn_id,
1577  size_t *txn_id_len
1578 );
1579 
1595 LIBDSAPI_CDECL
1597  DS_Indication *indication,
1598  int *fail_msg_id
1599 );
1600 
1630 LIBDSAPI_CDECL
1632  const DS_Indication *indication,
1633  const DS_ReferralList **referral_list_p
1634 );
1635 
1660 LIBDSAPI_CDECL
1662  const DS_Indication *indication,
1663  const DS_ReferralList **referral_list_p
1664 );
1665 
1685 LIBDSAPI_CDECL
1687  const DS_Indication *indication,
1688  int *time_before_expiration_p
1689 );
1690 
1713 LIBDSAPI_CDECL
1715  const DS_Indication *indication,
1716  int *grace_authentications_remaining_p
1717 );
1718 
1737 LIBDSAPI_CDECL
1739  const DS_Indication *indication,
1740  DS_PasswordPolicyError *error_p
1741 );
1742 
1760 LIBDSAPI_CDECL
1762  const DS_Indication *indication,
1763  const char **error_text_p
1764 );
1765 
1782 LIBDSAPI_CDECL
1784  const DS_Indication *indication,
1785  int *more_pages
1786 );
1787 
1793 LIBDSAPI_CDECL
1794 void DS_Indication_Delete (
1795  DS_Indication *indication
1796 );
1797 
1804 #endif /* ISODE_DSAPI_H */
DS_Status DS_NextPageSync(DS_Session *session, DS_Indication *di)
Request the next page of a paged results search.
struct DS_Session DS_Session
Definition: dsapi_types.h:44
DS_Status DS_Initialize(void)
Initialize the Simple Directory API.
DS_Status DS_Indication_GetSignatureError(DS_Indication *indication, int *sign_error_p)
Determine whether signature verification failed for a signed operation.
DS_Status DS_GetAllowUnknownAttrs(DS_Session *session, int *allow_unknown_p)
Get the values of the flag that allows unknown attributes to be read over LDAP.
DS_Status DS_ReadAsync(DS_Session *session, const DS_DN *dn, const char *attr_selection[], DS_CommonArgs *common_args, int *ret_op_id)
Invoke an asynchronous directory read entry operation.
DS_Status DS_Indication_GetCompareResult(DS_Indication *indication, int *matched)
Return a flag indicating whether a compare operation found a match.
const char ** DS_SaslMechList(void)
Perform a synchronous directory bind using SASL.
struct DS_DN DS_DN
Definition: dsapi_types.h:103
DS_Status DS_ModifySyncByDN(DS_Session *session, const DS_DN *dn, const DS_AttrList *changes, const DS_CommonArgs *common_args, DS_Indication **indication_p)
Perform a synchronous directory modify operation.
void DS_Indication_Delete(DS_Indication *indication)
Free a DS_Indication structure.
DS_Status DS_Indication_GetEntryCount(DS_Indication *indication, int *ret_num_p)
Return a count of the set of entries contained in the operation outcome.
DS_Status DS_Cancel(DS_Session *session, int op_id)
Cancel a previously issued asynchronous operation.
DS_Status DS_Indication_GetEntryList(DS_Indication *indication, const DS_EntryList **entry_list_p)
Return the set of entries contained in the operation outcome.
int DS_Version(void)
Return the DSAPI library version.
DS_ErrorValue
Definition: dsapi_const.h:190
Directory client API methods for handling directory entries.
DS_Status DS_ReadSync(DS_Session *session, const DS_DN *dn, const char *attr_selection[], DS_CommonArgs *common_args, DS_Indication **indication_p)
Perform a synchronous directory read entry operation.
struct DS_Entry DS_Entry
Definition: dsapi_types.h:81
DS_ErrorType
Definition: dsapi_const.h:138
DS_Status DS_BindSync_Simple(const char *address, const DS_DN *dn, const char *password, DS_Session **session_p) DSAPI_DEPRECATED
Perform a synchronous directory bind using simple credentials.
DS_Entry * DS_Indication_GetFirstEntry(DS_Indication *indication)
Return the first entry from an Indication.
DS_Status DS_Indication_HasMoreResults(const DS_Indication *indication, int *more_pages)
Check if there are more pages for a paged results search.
struct DS_Referral DS_ReferralList
Definition: dsapi_types.h:152
DS_Status DS_AddSyncByDN(DS_Session *session, const DS_DN *dn, const DS_AttrList *attrs, const DS_CommonArgs *common_args, DS_Indication **indication_p)
Perform a synchronous directory add operation.
struct DS_Entry DS_EntryList
Definition: dsapi_types.h:145
void DS_UnbindSync(DS_Session **session_p)
Perform a synchronous directory unbind.
DS_Status DS_Indication_GetLimitProblem(DS_Indication *indication, DSLimitProblem *limit_p)
Get any limit problem associated with a search result.
DS_Status DS_BindSync_Anonymous(const char *address, DS_Session **session_p) DSAPI_DEPRECATED
Perform an anonymous synchronous directory bind.
DS_Status DS_InitializeWithLog(int)
Initialize the Simple Directory API.
DS_Status DS_Indication_GetReferrals(const DS_Indication *indication, const DS_ReferralList **referral_list_p)
Return information about an operation for which the directory returned a referral.
DS_Status DS_ModifySync(DS_Session *session, const DS_Entry *entry, const DS_CommonArgs *common_args, DS_Indication **indication_p)
Perform a synchronous directory modify operation.
DS_Status DS_Indication_GetContinuationReferences(const DS_Indication *indication, const DS_ReferralList **referral_list_p)
Return the set of continuation references resulting from a search operation.
DS_Status DS_Indication_GetExtraErrorText(const DS_Indication *indication, const char **error_text_p)
Determine the supplementary text string returned by the directory.
DS_Status DS_BindSync_Strong(const char *address, const DS_DN *dsa_dn, const DS_DN *dn, const char *password, DS_Session **session_p) DSAPI_DEPRECATED
Perform a synchronous directory bind using strong credentials.
DS_Status DS_InitializeSecurity(const char *path)
Initialize the security environment.
struct DS_BindParams DS_BindParams
Definition: dsapi_types.h:51
Simple directory API methods for handling entries, attributes and values.
DS_Status DS_Indication_GetErrorCodes(DS_Indication *indication, DS_ErrorType *type_p, DS_ErrorValue *value_p)
Get the directory (operation) error type and value codes.
DS_Status DS_Indication_GetPasswordPolicyGraceWarning(const DS_Indication *indication, int *grace_authentications_remaining_p)
Return the number of grace authentications left for the current account&#39;s password.
void DS_UninitializeSecurity(void)
Disable strong operations and release any resources associated with the security environment.
DS_Status DS_BindSync_SASL(const char *address, const char *mechanism, const char *userid, const char *secret, DS_Session **session_p) DSAPI_DEPRECATED
Perform a synchronous directory bind using SASL.
DS_Status DS_BindSimpleSync(DS_Session *session, const DS_DN *dn, const char *password, DS_CommonArgs *common_args, DS_Indication **indication_p)
Perform a synchronous directory bind using simple credentials.
DS_Status DS_BindWithParameters(DS_Session *session, const DS_BindParams *bind_params, DS_CommonArgs *common_args, DS_Indication **indication_p)
Bind using a set of bind parameters.
DSSearchScope
Definition: dsapi_types.h:180
DS_Status DS_Poll(DS_Session *session, int op_id, DS_Indication **indication_p)
Poll for an asynchronous operation indication.
DS_Status DS_Session_New(const char *address, int force_tls, DS_Session **session_p)
Create an unbound directory session, validating the specified address.
DS_Status DS_GetSessionState(const DS_Session *session_p, DSSessionState *state_p)
Get the current session state.
DS_Status DS_TxnStartSync(DS_Session *session, DS_Indication **indication_p)
Perform a synchronous directory transaction start operation.
DSLimitProblem
Definition: dsapi_types.h:189
DS_Status DS_Indication_GetTxnEndResult(DS_Indication *indication, int *fail_msg_id)
Return the result of a transaction end request. On success error the message ID of the update request...
struct DS_Attr DS_Attr
Definition: dsapi_types.h:75
DS_Status DS_BindStrongSync(DS_Session *session, const DS_DN *dsa_dn, const DS_DN *dn, const char *password, DS_CommonArgs *common_args, DS_Indication **indication_p)
Perform a synchronous directory bind using strong credentials.
struct DS_AttrVal DS_AttrValList
Definition: dsapi_types.h:133
DS_Status DS_GetSessionCertificates(const DS_Session *session_p, DS_AttrValList **av_list_p, int *identity_check_result)
Get and/or verify certificates that were sent by a server during a strong bind operation.
struct DS_Indication DS_Indication
Definition: dsapi_types.h:121
DS_Status DS_RenameSync(DS_Session *session, const DS_DN *old_dn, const DS_DN *new_dn, int delete_old_rdn, const DS_CommonArgs *common_args, DS_Indication **indication_p)
Perform a synchronous directory rename operation.
DS_Status DS_AddSync(DS_Session *session, const DS_Entry *entry, const DS_CommonArgs *common_args, DS_Indication **indication_p)
Perform a synchronous directory add operation.
DS_Status DS_BindAnonymousSync(DS_Session *session, DS_CommonArgs *common_args, DS_Indication **indication_p)
Perform an anonymous synchronous directory bind.
Handling of the directory common arguments.
DSSessionState
Definition: dsapi_types.h:237
API methods for reading and writing LDIF files.
DS_Status DS_Indication_GetPasswordPolicyErrorCode(const DS_Indication *indication, DS_PasswordPolicyError *error_p)
Return the error code relating to the current account&#39;s password.
DS_PasswordPolicyError
Definition: dsapi_const.h:411
Symbolic constants used in the Directory Service API.
DS_Status DS_TxnEndSync(DS_Session *session, unsigned char *txn_id, size_t txn_id_len, char commit, DS_Indication **indication_p)
Perform a synchronous directory transaction start (commit) operation.
Directory client API methods for handling directory names.
DS_Status DS_SearchSync(DS_Session *session, const DS_DN *base_dn, const char *filter, DSSearchScope search_scope, const char *attr_selection[], DS_CommonArgs *common_args, DS_Indication **indication_p)
Perform a synchronous directory search operation.
DS_Status
Definition: dsapi_const.h:66
DS_Status DS_CompareSync(DS_Session *session, const DS_DN *dn, const DS_Attr *attr, const DS_CommonArgs *common_args, DS_Indication **indication_p)
Perform a synchronous directory compare operation.
DS_Status DS_AllowUnknownAttrs(DS_Session *session, int allow_unknown)
Turn on or off the flag that allows unknown attributes to be read over LDAP.
struct DS_CommonArgs DS_CommonArgs
Definition: dsapi_types.h:158
Directory client API methods for handling referral and continuation reference information.
DS_Status DS_Indication_GetPasswordPolicyExpiryWarning(const DS_Indication *indication, int *time_before_expiration_p)
Return the expiry time of the current account&#39;s password.
DS_Status DS_DeleteSync(DS_Session *session, const DS_DN *dn, const DS_CommonArgs *common_args, DS_Indication **indication_p)
Perform a synchronous directory delete operation.
struct DS_Attr DS_AttrList
Definition: dsapi_types.h:127
DS_Status DS_Indication_GetTxnStartResult(DS_Indication *indication, unsigned char **txn_id, size_t *txn_id_len)
Return the result of a transaction start request. On success the result is an identifier in the form ...
DS_Status DS_Indication_GetStatus(DS_Indication *indication, DS_ErrorType *type_p)
Get the directory (operation) error type.