]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/back-sql/entry-id.h
add extra level of parens only if required
[openldap] / servers / slapd / back-sql / entry-id.h
index 5792d85eea8fb07deb0c9323eaded0f3ebed1fa0..bdab2249c8ed6c01aeae8ca23e90fe01644cad19 100644 (file)
@@ -1,27 +1,44 @@
+/* $OpenLDAP$ */
+/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
+ *
+ * Copyright 1999-2004 The OpenLDAP Foundation.
+ * Portions Copyright 1999 Dmitry Kovalev.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted only as authorized by the OpenLDAP
+ * Public License.
+ *
+ * A copy of this license is available in the file LICENSE in the
+ * top-level directory of the distribution or, alternatively, at
+ * <http://www.OpenLDAP.org/license.html>.
+ */
+/* ACKNOWLEDGEMENTS:
+ * This work was initially developed by Dmitry Kovalev for inclusion
+ * by OpenLDAP Software.
+ */
+
 #ifndef __BACKSQL_ENTRYID_H__
 #define __BACKSQL_ENTRYID_H__
 
-/*
- *      Copyright 1999, Dmitry Kovalev <mit@openldap.org>, All rights reserved.
- *
- *      Redistribution and use in source and binary forms are permitted only
- *      as authorized by the OpenLDAP Public License.  A copy of this
- *      license is available at http://www.OpenLDAP.org/license.html or
- *      in file LICENSE in the top-level directory of the distribution.
- */
+typedef struct backsql_entryID {
+       unsigned long           id;
+       unsigned long           keyval;
+       unsigned long           oc_id;
+       struct berval           dn;
+       struct backsql_entryID  *next;
+} backsql_entryID;
+
+int backsql_dn2id( backsql_info *bi, backsql_entryID *id,
+               SQLHDBC dbh, struct berval *dn );
 
+int backsql_count_children( backsql_info *bi, SQLHDBC dbh,
+               struct berval *dn, unsigned long *nchildren );
+int backsql_has_children( backsql_info *bi, SQLHDBC dbh, struct berval *dn );
 
-typedef struct __backsql_entryID
-{
- unsigned long id;
- unsigned long keyval;
- unsigned long oc_id;
- char *dn;
- struct __backsql_entryID *next;
-}backsql_entryID;
 
-backsql_entryID* backsql_dn2id(backsql_info *bi,backsql_entryID* id,SQLHDBC dbh,char *dn);
-backsql_entryID* backsql_free_entryID(backsql_entryID* id);/*returns next*/
+/* returns next */
+backsql_entryID *backsql_free_entryID( backsql_entryID *id, int freeit );
 
-#endif
+#endif /* __BACKSQL_ENTRYID_H__ */