dsapi.h

Go to the documentation of this file.
00001 /* Emacs mode: -*- C -*- */
00002 
00003 /* 
00004  * Copyright (c) 2004-2008, Isode Limited, London, England.
00005  * All rights reserved.
00006  *
00007  * Acquisition and use of this software and related materials for any
00008  * purpose requires a written licence agreement from Isode
00009  * Limited, or a written licence from an organisation licenced by Isode
00010  * Limited to grant such a licence.
00011  *
00012  */
00013 
00014 /*
00015  * dsapi.h
00016  *
00017  * Simple directory API directory operations.
00018  *
00019  */
00020 
00021 /* 
00022  * $RCSfile: dsapi.h,v $ $Revision: 1.43 $ $State: Exp $
00023  *
00024  * $Log: dsapi.h,v $
00025  * Revision 1.43  2007/11/02 10:59:35  cjr
00026  * T071031D - Add DS_BindSync_SASL.
00027  *
00028  * Revision 1.42  2007/08/28 15:00:54  cjr
00029  * T070821L - Add password policy queries.
00030  *
00031  * Revision 1.41  2007/08/06 14:49:25  jp
00032  * T070802F - Add support for 'unknown' attribute-types
00033  *
00034  * Revision 1.40  2007/07/18 10:41:02  nh
00035  * T070711F - Added support for referrals; fixed prototype for DS_UninitializeSecurity
00036  *
00037  * Revision 1.39  2007/07/17 14:12:01  dbw
00038  * T070717G - Turn declaration into prototype
00039  *
00040  * Revision 1.38  2007/05/15 14:38:49  nh
00041  * T070514H - Add prototype for DS_UnitializeSecurity().  Fix some typos
00042  *
00043  * Revision 1.37  2007/05/15 13:18:25  dbw
00044  * T070515D - Update/Add copyright
00045  *
00046  * Revision 1.36  2007/04/30 09:51:34  nh
00047  * T070427L - Added new function DS_Indication_GetSignatureError
00048  *
00049  * Revision 1.35  2007/04/17 09:10:17  nh
00050  * T070413L - Update doc for DS_SearchSync/DS_E_SIGNEDOPFAILED
00051  *
00052  * Revision 1.34  2007/04/11 10:20:46  dsm
00053  * T070411C - Add DS_AddSyncByDN and DS_ModifySyncByDN.
00054  *
00055  * Revision 1.33  2006/11/20 15:16:12  jp
00056  * T061115G - Doc clarifications
00057  *
00058  * Revision 1.32  2006/11/10 13:40:31  cjr
00059  * T061110D - Add \since annotations to functions added since 1.0.
00060  *
00061  * Revision 1.31  2006/11/03 11:55:48  jp
00062  * T061103C - Include dsapi_ldif.h
00063  *
00064  * Revision 1.30  2006/10/31 11:14:50  nh
00065  * T061026B - Add declarations for DS_CompareSync and DS_Indication_GetCompareResult
00066  *
00067  * Revision 1.29  2006/10/06 14:26:57  cjr
00068  * T061006F - Add DS_InitializeSecurity().
00069  *
00070  * Revision 1.28  2006/09/25 10:48:25  cjr
00071  * T060925D - Replace front page documentation. Fix error in DS_E_BADFILTER. Add
00072  *            missing end groups.
00073  *
00074  * Revision 1.27  2006/09/15 16:21:01  nh
00075  * T060915F - Update comments for DS_SearchSync
00076  *
00077  * Revision 1.26  2006/09/12 15:54:21  nh
00078  * T060912E - Upate comments to indicate DS_E_BADFILTER can be returned from DS_SearchSync
00079  *
00080  * Revision 1.25  2006/08/23 12:51:24  nh
00081  * T060823D - Document that BADPARAM can also be caused by invalid use of signed ops
00082  *
00083  * Revision 1.24  2006/07/05 13:46:14  cjr
00084  * T060705E - Note LDAPS support, and LDAP/LDAPS support in
00085  *            DS_BindSync_Strong().
00086  *
00087  * Revision 1.23  2006/06/14 12:53:43  nh
00088  * T060614A - Fix a couple of doxygen warnings
00089  *
00090  * Revision 1.22  2006/03/27 15:23:23  cjr
00091  * T060327D - Add DS_Indication_GetLimitProblem().
00092  *
00093  * Revision 1.21  2006/03/14 14:48:43  cjr
00094  * T060314E - Restore open braces, and balance them.
00095  *
00096  * Revision 1.20  2006/01/23 16:15:55  brs
00097  * T060123D - Remove some open braces.
00098  *
00099  * Revision 1.19  2006/01/10 15:56:03  cjr
00100  * Add slash
00101  *
00102  * Revision 1.18  2006/01/10 15:48:34  cjr
00103  * T060110A - Add DS_Indication_GetErrorCodes()
00104  *
00105  * Revision 1.17  2005/09/15 16:16:34  cjr
00106  * T050714A.T1 - Reference example code.
00107  *
00108  * Revision 1.16  2005/09/09 15:31:57  cjr
00109  * T050909H - Update API version to 2, and add DS_BindSync_Strong(). Note the
00110  *            support for LDAP URLs in other Bind methods.
00111  *
00112  * Revision 1.15  2005/07/12 15:46:51  cjr
00113  * T050712F - Permit NULL parameters.
00114  *
00115  * Revision 1.14  2005/07/04 12:23:41  cjr
00116  * T050704A - Change result types to DS_Status.
00117  *
00118  * Revision 1.13  2005/06/30 15:48:11  cjr
00119  * T050630H - Add DS_RenameSync()
00120  *
00121  * Revision 1.12  2005/06/30 14:33:22  cjr
00122  * T050630F - Add DS_ModifySync()
00123  *
00124  * Revision 1.11  2005/06/29 15:56:59  cjr
00125  * T050629C - Add DS_AddSync() and DS_DeleteSync().
00126  *
00127  * Revision 1.10  2005/05/25 16:06:45  dbw
00128  * T050525C - Add or update copyright for 2005
00129  *
00130  * Revision 1.9  2005/05/19 11:24:25  dsm
00131  * T050516P - Remove references to Isode internal header files.
00132  *
00133  * Revision 1.8  2005/05/16 13:46:06  cjr
00134  * T050516M - Add DS_Version() and documentation.
00135  *
00136  * Revision 1.7  2005/04/05 09:30:38  cjr
00137  * T050405A - Move dsapi to under apps/ds.
00138  *
00139  * Revision 1.6  2005/03/22 16:38:42  cjr
00140  * T050322E - Add DS_Cancel.
00141  *
00142  * Revision 1.5  2005/02/25 12:47:30  cjr
00143  * T050223E - Improve documentation
00144  *
00145  * Revision 1.4  2005/02/18 14:29:03  cjr
00146  * T050218A - Remove extra endgroup.
00147  *
00148  * Revision 1.3  2005/02/15 15:19:44  cjr
00149  * T050215E - Removed \fn commands. Added attr_selection documentation to
00150  *            DS_ReadSync.
00151  *
00152  * Revision 1.2  2005/02/15 12:47:19  cjr
00153  * T050215A - Add DS_Initialize, describe attr_selection better. Remove
00154  *            punctuation from headings.
00155  *
00156  * Revision 1.1  2005/01/24 17:19:53  dsm
00157  * T050124B - Initial revision.
00158  *
00159  *
00160  */
00161 
00162 #ifndef ISODE_DSAPI_H
00163 #define ISODE_DSAPI_H
00164 
00165 #include <isode/ds/dsapi/dsapi_cdecl.h>
00166 #include <isode/ds/dsapi/dsapi_attr.h>
00167 #include <isode/ds/dsapi/dsapi_entry.h>
00168 #include <isode/ds/dsapi/dsapi_referral.h>
00169 #include <isode/ds/dsapi/dsapi_name.h>
00170 #include <isode/ds/dsapi/dsapi_const.h>
00171 #include <isode/ds/dsapi/dsapi_common_args.h>
00172 #include <isode/ds/dsapi/dsapi_ldif.h>
00173 
00493 LIBDSAPI_CDECL
00494 DS_Status DS_Initialize (
00495     void
00496 );
00497 
00517 LIBDSAPI_CDECL
00518 void DS_InitializeSecurity (
00519     const char *path
00520 );
00521 
00544 LIBDSAPI_CDECL
00545 void DS_UninitializeSecurity (void);
00546 
00565 LIBDSAPI_CDECL
00566 int DS_Version (
00567     void
00568 );
00569 
00610 LIBDSAPI_CDECL
00611 DS_Status DS_Session_New (
00612     const char  *address,
00613     int          force_tls,
00614     DS_Session **session_p
00615 );
00616 
00633 LIBDSAPI_CDECL
00634 DS_Status DS_BindAnonymousSync (
00635     DS_Session     *session,
00636     DS_CommonArgs  *common_args,
00637     DS_Indication **indication_p
00638 );
00639 
00653 LIBDSAPI_CDECL
00654 DS_Status DS_BindSync_Anonymous (
00655     const char  *address,
00656     DS_Session **session_p
00657 );
00658 
00676 LIBDSAPI_CDECL
00677 DS_Status DS_BindSimpleSync (
00678     DS_Session     *session,
00679     const DS_DN    *dn,
00680     const char     *password,
00681     DS_CommonArgs  *common_args,
00682     DS_Indication **indication_p
00683 );
00684 
00701 LIBDSAPI_CDECL
00702 DS_Status DS_BindSync_Simple (
00703     const char   *address,
00704     const DS_DN  *dn,
00705     const char   *password,
00706     DS_Session  **session_p
00707 );
00708 
00729 LIBDSAPI_CDECL
00730 DS_Status DS_BindStrongSync (
00731     DS_Session     *session,
00732     const DS_DN    *dsa_dn,
00733     const DS_DN    *dn,
00734     const char     *password,
00735     DS_CommonArgs  *common_args,
00736     DS_Indication **indication_p
00737 );
00738 
00759 LIBDSAPI_CDECL
00760 DS_Status DS_BindSync_Strong (
00761     const char   *address,
00762     const DS_DN  *dsa_dn,
00763     const DS_DN  *dn,
00764     const char   *password,
00765     DS_Session  **session_p
00766 );
00767 
00789 LIBDSAPI_CDECL
00790 DS_Status DS_BindSASLSync (
00791     DS_Session     *session,
00792     const char     *mechanism,
00793     const char     *userid,
00794     const char     *secret,
00795     DS_CommonArgs  *common_args,
00796     DS_Indication **indication_p
00797 );
00798 
00818 LIBDSAPI_CDECL
00819 DS_Status DS_BindSync_SASL (
00820     const char  *address,
00821     const char  *mechanism,
00822     const char  *userid,
00823     const char  *secret,
00824     DS_Session **session_p
00825 );
00826 
00833 LIBDSAPI_CDECL
00834 void DS_UnbindSync (
00835     DS_Session **session_p
00836 );
00837 
00862 LIBDSAPI_CDECL
00863 DS_Status DS_AllowUnknownAttrs (
00864     DS_Session *session,
00865     int allow_unknown
00866 );
00867 
00868 
00878 LIBDSAPI_CDECL
00879 DS_Status DS_GetAllowUnknownAttrs (
00880     DS_Session *session,
00881     int *allow_unknown_p
00882 );
00883 
00884 
00943 LIBDSAPI_CDECL
00944 DS_Status DS_ReadSync (
00945     DS_Session     *session,
00946     const DS_DN    *dn,
00947     const char     *attr_selection[],
00948     DS_CommonArgs  *common_args,
00949     DS_Indication **indication_p
00950 );
00951 
00995 LIBDSAPI_CDECL
00996 DS_Status DS_SearchSync (
00997     DS_Session     *session,
00998     const DS_DN    *base_dn,
00999     const char     *filter,
01000     DSSearchScope   search_scope,
01001     const char     *attr_selection[],
01002     DS_CommonArgs  *common_args,
01003     DS_Indication **indication_p
01004 );
01005 
01016 LIBDSAPI_CDECL
01017 DS_Status DS_AddSync (
01018     DS_Session           *session,
01019     const DS_Entry       *entry,
01020     const DS_CommonArgs  *common_args,
01021     DS_Indication       **indication_p
01022 );
01023     
01035 LIBDSAPI_CDECL
01036 DS_Status DS_AddSyncByDN (
01037     DS_Session           *session,
01038     const DS_DN          *dn,
01039     const DS_AttrList    *attrs,
01040     const DS_CommonArgs  *common_args,
01041     DS_Indication       **indication_p
01042 );
01043 
01054 LIBDSAPI_CDECL
01055 DS_Status DS_DeleteSync (
01056     DS_Session           *session,
01057     const DS_DN          *dn,
01058     const DS_CommonArgs  *common_args,
01059     DS_Indication       **indication_p
01060 );
01061     
01072 LIBDSAPI_CDECL
01073 DS_Status DS_ModifySync (
01074     DS_Session           *session,
01075     const DS_Entry       *entry,
01076     const DS_CommonArgs  *common_args,
01077     DS_Indication       **indication_p
01078 );
01079     
01091 LIBDSAPI_CDECL
01092 DS_Status DS_ModifySyncByDN (
01093     DS_Session           *session,
01094     const DS_DN          *dn,
01095     const DS_AttrList    *changes,
01096     const DS_CommonArgs  *common_args,
01097     DS_Indication       **indication_p
01098 );
01099 
01112 LIBDSAPI_CDECL
01113 DS_Status DS_RenameSync (
01114     DS_Session           *session,
01115     const DS_DN          *old_dn,
01116     const DS_DN          *new_dn,
01117     int                   delete_old_rdn,
01118     const DS_CommonArgs  *common_args,
01119     DS_Indication       **indication_p
01120 );
01121 
01150 LIBDSAPI_CDECL
01151 DS_Status DS_CompareSync (
01152     DS_Session           *session,
01153     const DS_DN          *dn,
01154     const DS_Attr        *attr,
01155     const DS_CommonArgs  *common_args,
01156     DS_Indication       **indication_p
01157 );
01158 
01216 LIBDSAPI_CDECL
01217 DS_Status DS_ReadAsync (
01218     DS_Session    *session,
01219     const DS_DN   *dn,
01220     const char    *attr_selection[],
01221     DS_CommonArgs *common_args,
01222     int           *ret_op_id
01223 );
01224 
01241 LIBDSAPI_CDECL
01242 DS_Status DS_Poll (
01243     DS_Session     *session,
01244     int             op_id,
01245     DS_Indication **indication_p
01246 );
01247 
01261 LIBDSAPI_CDECL
01262 DS_Status DS_Cancel (
01263     DS_Session *session,
01264     int         op_id
01265 );
01266 
01296 LIBDSAPI_CDECL
01297 DS_Status DS_Indication_GetStatus (
01298     DS_Indication *indication,
01299     DS_ErrorType  *type_p
01300 );
01301 
01318 LIBDSAPI_CDECL
01319 DS_Status DS_Indication_GetErrorCodes (
01320     DS_Indication *indication,
01321     DS_ErrorType  *type_p,
01322     DS_ErrorValue *value_p
01323 );
01324 
01352 LIBDSAPI_CDECL
01353 DS_Status DS_Indication_GetSignatureError (
01354     DS_Indication *indication,
01355     int           *sign_error_p
01356 );
01357 
01358 
01370 LIBDSAPI_CDECL
01371 DS_Status DS_Indication_GetLimitProblem (
01372     DS_Indication  *indication,
01373     DSLimitProblem *limit_p
01374 );
01375 
01390 LIBDSAPI_CDECL
01391 DS_Status DS_Indication_GetEntryCount (
01392     DS_Indication *indication,
01393     int           *ret_num_p
01394 );
01395 
01411 LIBDSAPI_CDECL
01412 DS_Status DS_Indication_GetEntryList (
01413     DS_Indication       *indication,
01414     const DS_EntryList **entry_list_p
01415 );
01416 
01434 LIBDSAPI_CDECL
01435 DS_Status DS_Indication_GetCompareResult (
01436     DS_Indication *indication,
01437     int           *matched
01438 );
01439 
01469 LIBDSAPI_CDECL
01470 DS_Status DS_Indication_GetContinuationReferences (
01471     const DS_Indication      *indication,
01472     const DS_ReferralList   **referral_list_p
01473 );
01474 
01499 LIBDSAPI_CDECL
01500 DS_Status DS_Indication_GetReferrals (
01501     const DS_Indication      *indication,
01502     const DS_ReferralList   **referral_list_p
01503 );
01504 
01524 LIBDSAPI_CDECL
01525 DS_Status DS_Indication_GetPasswordPolicyExpiryWarning (
01526     const DS_Indication    *indication,
01527     int                    *time_before_expiration_p
01528 );
01529 
01552 LIBDSAPI_CDECL
01553 DS_Status DS_Indication_GetPasswordPolicyGraceWarning (
01554     const DS_Indication    *indication,
01555     int                    *grace_authentications_remaining_p
01556 );
01557 
01576 LIBDSAPI_CDECL
01577 DS_Status DS_Indication_GetPasswordPolicyErrorCode (
01578     const DS_Indication    *indication,
01579     DS_PasswordPolicyError *error_p
01580 );
01581 
01599 LIBDSAPI_CDECL
01600 DS_Status DS_Indication_GetExtraErrorText (
01601     const DS_Indication    *indication,
01602     const char            **error_text_p
01603 );
01604 
01610 LIBDSAPI_CDECL
01611 void DS_Indication_Delete (
01612     DS_Indication *indication
01613 );
01614 
01621 #endif /* ISODE_DSAPI_H */
Copyright © 2008 Isode privacy   feedback Subscribe to our rss newsfeed