dsapi_attr.h

Go to the documentation of this file.
00001 /* Emacs mode: -*- C -*- */
00002 
00003 /* 
00004  * Copyright (c) 2004-2006, 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_attr.h
00016  *
00017  * Directory client API methods for manipulating entry attributes.
00018  *
00019  */
00020 
00021 /* 
00022  * $RCSfile: dsapi_attr.h,v $ $Revision: 1.26 $ $State: Exp $
00023  *
00024  * $Log: dsapi_attr.h,v $
00025  * Revision 1.26  2007/10/23 11:57:22  jp
00026  * T071023C - Document change in DS_AttrVal_Normalize() return status
00027  *
00028  * Revision 1.25  2007/10/19 16:06:30  jp
00029  * T071019E - Correct documentation for normalize function
00030  *
00031  * Revision 1.24  2007/10/19 10:14:14  jp
00032  * T071018C - Add DS_AttrVal_Normalize() function
00033  *
00034  * Revision 1.23  2007/08/06 14:49:26  jp
00035  * T070802F - Add support for 'unknown' attribute-types
00036  *
00037  * Revision 1.22  2007/06/25 10:24:02  jp
00038  * T070622B - Update docs
00039  *
00040  * Revision 1.21  2007/05/15 13:18:26  dbw
00041  * T070515D - Update/Add copyright
00042  *
00043  * Revision 1.20  2006/11/28 17:06:48  nh
00044  * T061128B - Update DS_Attr_GetValueList comments for DS_SVC_OPT_ATTRSONLY
00045  *
00046  * Revision 1.19  2006/11/20 15:16:13  jp
00047  * T061115G - GetModList/GetModType calls; misc doc changes
00048  *
00049  * Revision 1.18  2006/11/16 15:14:14  nh
00050  * T061101D - DS_AttrVal_GetInternal no longer requires ir_p to be non-NULL
00051  *
00052  * Revision 1.17  2006/11/10 13:40:32  cjr
00053  * T061110D - Add \since annotations to functions added since 1.0.
00054  *
00055  * Revision 1.16  2006/07/14 17:12:53  nh
00056  * T060714L - Add prototypes for DS_AttrList_New and DS_AttrList_Append
00057  *
00058  * Revision 1.15  2006/02/06 15:57:57  cjr
00059  * T060206B - DS_Attr_AddStringValue/AddBERValue can now return
00060  *            DS_E_BADATTRTYPE.
00061  *
00062  * Revision 1.14  2005/07/12 15:46:52  cjr
00063  * T050712F - Permit NULL parameters.
00064  *
00065  * Revision 1.13  2005/07/04 12:23:42  cjr
00066  * T050704A - Change result types to DS_Status.
00067  *
00068  * Revision 1.12  2005/06/27 09:29:28  cjr
00069  * T050624A - Add DS_Attr_AddStringValue(), DS_Attr_AddBERValue(), and
00070  *            DS_Attr_New()
00071  *
00072  * Revision 1.11  2005/05/25 16:06:46  dbw
00073  * T050525C - Add or update copyright for 2005
00074  *
00075  * Revision 1.10  2005/04/06 10:39:27  cjr
00076  * T050406B - Return int instead of const int.
00077  *
00078  * Revision 1.9  2005/04/05 09:30:39  cjr
00079  * T050405A - Move dsapi to under apps/ds.
00080  *
00081  * Revision 1.8  2005/02/28 14:38:37  cjr
00082  * Renamed var_len_p to ber_len_p in comment
00083  *
00084  * Revision 1.7  2005/02/28 14:36:13  cjr
00085  * T050228C - Update return values for DS_AttrVal_GetBERPointer and
00086  *            DS_AttrVal_GetStringPointer
00087  *
00088  * Revision 1.6  2005/02/25 12:47:32  cjr
00089  * T050223E - Improve documentation
00090  *
00091  * Revision 1.5  2005/02/22 14:26:11  cjr
00092  * T050222D - Add DS_AttrVal_GetInternal and DS_AttrVal_Internal_Delete.
00093  *
00094  * Revision 1.4  2005/02/18 14:29:01  cjr
00095  * T050218A - Add DS_Attr_Copy, DS_AttrList_Copy, DS_AttrVal_Copy and
00096  *            DS_AttrValList_Copy
00097  *
00098  * Revision 1.3  2005/02/17 13:16:57  cjr
00099  * T050217C - Add DS_AttrValList_GetCount.
00100  *
00101  * Revision 1.2  2005/02/15 15:19:45  cjr
00102  * T050215E - Removed \fn commands.
00103  *
00104  * Revision 1.1  2005/01/24 17:19:54  dsm
00105  * T050124B - Initial revision.
00106  *
00107  *
00108  */
00109 
00110 #ifndef ISODE_DSAPI_ATTR_H
00111 #define ISODE_DSAPI_ATTR_H
00112 
00113 #include <stddef.h>
00114 #include <isode/ds/dsapi/dsapi_cdecl.h>
00115 #include <isode/ds/dsapi/dsapi_types.h>
00116 #include <isode/ds/dsapi/dsapi_const.h>
00117 
00173 LIBDSAPI_CDECL
00174 DS_Status DS_Entry_GetNamedAttr (
00175     const DS_Entry  *entry,
00176     const char      *type,
00177     const DS_Attr  **attr_p
00178 );
00179 
00191 LIBDSAPI_CDECL
00192 DS_Status DS_Entry_GetAttrList (
00193     const DS_Entry     *entry,
00194     const DS_AttrList **attr_list_p
00195 );
00196 
00210 LIBDSAPI_CDECL
00211 DS_Status DS_Entry_GetModList (
00212     const DS_Entry     *entry,
00213     const DS_AttrList **mod_list_p
00214 );
00215 
00228 LIBDSAPI_CDECL
00229 DS_Status DS_AttrList_New (
00230     DS_AttrList **attrlist_p,
00231     const DS_Attr *attr
00232 );
00233 
00245 LIBDSAPI_CDECL
00246 DS_Status DS_AttrList_Append (
00247     DS_AttrList *attrlist,
00248     const DS_Attr *attr
00249 );
00250 
00258 LIBDSAPI_CDECL
00259 const DS_Attr *DS_AttrList_GetFirst (
00260     const DS_AttrList *attr_list
00261 );
00262 
00270 LIBDSAPI_CDECL
00271 const DS_Attr *DS_AttrList_GetNext (
00272     const DS_Attr *attr
00273 );
00274 
00286 LIBDSAPI_CDECL
00287 DS_Status DS_Attr_GetTypeName (
00288     const DS_Attr  *attr,
00289     const char    **str_p
00290 );
00291 
00306 LIBDSAPI_CDECL
00307 DS_Status DS_Attr_GetModType (
00308     const DS_Attr  *attr,
00309     DSModType      *type_p
00310 );
00311 
00323 LIBDSAPI_CDECL
00324 DS_Status DS_Attr_GetValueList (
00325     const DS_Attr         *attr,
00326     const DS_AttrValList **val_list_p
00327 );
00328 
00349 LIBDSAPI_CDECL
00350 DS_Status DS_Attr_AddStringValue (
00351     DS_Attr    *attr,
00352     const char *str,
00353     size_t      len
00354 );
00355 
00376 LIBDSAPI_CDECL
00377 DS_Status DS_Attr_AddBERValue (
00378     DS_Attr             *attr,
00379     const unsigned char *ber,
00380     size_t               len
00381 );
00382 
00394 LIBDSAPI_CDECL
00395 DS_Status DS_Attr_New (
00396     const char  *name,
00397     DS_Attr    **attr_p
00398 );
00399 
00411 LIBDSAPI_CDECL
00412 DS_Status DS_Attr_New_AllowUnknown (
00413     const char  *name,
00414     DS_Attr    **attr_p
00415 );
00416 
00428 LIBDSAPI_CDECL
00429 DS_Status DS_Attr_IsUnknown (
00430     DS_Attr    *attr,
00431     int        *is_unknown_p
00432 );
00433 
00443 LIBDSAPI_CDECL
00444 DS_Status DS_Attr_Copy (
00445     const DS_Attr  *attr,
00446     DS_Attr       **copy_p
00447 );
00448 
00454 LIBDSAPI_CDECL
00455 void DS_Attr_Delete (
00456     DS_Attr *attr
00457 );
00458 
00468 LIBDSAPI_CDECL
00469 DS_Status DS_AttrList_Copy (
00470     const DS_AttrList  *attr_list,
00471     DS_AttrList       **copy_p
00472 );
00473 
00479 LIBDSAPI_CDECL
00480 void DS_AttrList_Delete (
00481     DS_AttrList *attr_list
00482 );
00483 
00484 /* \} */
00485 
00497 LIBDSAPI_CDECL
00498 const DS_AttrVal *DS_AttrValList_GetFirst (
00499    const DS_AttrValList *value_list
00500 );
00501 
00510 LIBDSAPI_CDECL
00511 DS_Status DS_AttrValList_GetCount (
00512     const DS_AttrValList *value_list,
00513     int                  *count_p
00514 );
00515 
00523 LIBDSAPI_CDECL
00524 const DS_AttrVal *DS_AttrValList_GetNext (
00525    const DS_AttrVal *value
00526 );
00527 
00542 LIBDSAPI_CDECL
00543 DS_Status DS_AttrVal_GetBERPointer (
00544     const DS_AttrVal     *value,
00545     const unsigned char **ber_ptr_p,
00546     size_t               *ber_len_p
00547 );
00548 
00574 LIBDSAPI_CDECL
00575 DS_Status DS_AttrVal_GetStringPointer (
00576     const DS_AttrVal  *value,
00577     const char       **str_p,
00578     size_t            *str_len_p
00579 );
00580 
00600 LIBDSAPI_CDECL
00601 DS_Status DS_AttrVal_GetInternal (
00602     const DS_AttrVal *value,
00603     const void       **ir_p
00604 );
00605 
00615 LIBDSAPI_CDECL
00616 DS_Status DS_AttrVal_Internal_Delete (
00617     const DS_AttrVal *value,
00618     void             *ir
00619 );
00620 
00642 LIBDSAPI_CDECL
00643 DS_Status DS_AttrVal_Normalize (
00644     const DS_AttrVal *value
00645 );
00646 
00669 LIBDSAPI_CDECL
00670 DS_Status DS_AttrVal_Compare (
00671     const DS_AttrVal  *av1,
00672     const DS_AttrVal  *av2,
00673     int               *res_p
00674 );
00675 
00685 LIBDSAPI_CDECL
00686 DS_Status DS_AttrVal_Copy (
00687     const DS_AttrVal  *av,
00688     DS_AttrVal       **copy_p
00689 );
00690 
00696 LIBDSAPI_CDECL
00697 void DS_AttrVal_Delete (
00698     DS_AttrVal *av
00699 );
00700 
00710 LIBDSAPI_CDECL
00711 DS_Status DS_AttrValList_Copy (
00712     const DS_AttrValList  *av_list,
00713     DS_AttrValList       **copy_p
00714 );
00715 
00721 LIBDSAPI_CDECL
00722 void DS_AttrValList_Delete (
00723     DS_AttrValList *av_list
00724 );
00725 
00730 #endif /* ISODE_DSAPI_ATTR_H */
Copyright © 2008 Isode privacy   feedback Subscribe to our rss newsfeed