]> git.sur5r.net Git - openldap/commitdiff
preliminary modify/increment client side code
authorKurt Zeilenga <kurt@openldap.org>
Wed, 30 Jul 2003 10:21:57 +0000 (10:21 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Wed, 30 Jul 2003 10:21:57 +0000 (10:21 +0000)
include/ldap.h
libraries/libldap/modify.c

index 2740ccdebcc28184fb48eb9aa5c55c793feb4762..81194df71caf3a44cf0b42aeb133e6913889ae16 100644 (file)
@@ -248,6 +248,7 @@ typedef struct ldapcontrol {
 #define LDAP_FEATURE_ABSOLUTE_FILTERS "1.3.6.1.4.1.4203.1.5.3"  /* (&) (|) */
 #define LDAP_FEATURE_LANGUAGE_TAG_OPTIONS "1.3.6.1.4.1.4203.1.5.4"
 #define LDAP_FEATURE_LANGUAGE_RANGE_OPTIONS "1.3.6.1.4.1.4203.1.5.5"
+#define LDAP_FEATURE_MODIFY_INCREMENT "1.3.6.1.4.1.4203.1.5.6"
 
 /*
  * specific LDAP instantiations of BER types we know about
@@ -506,9 +507,11 @@ typedef struct ldapmsg LDAPMessage;
 typedef struct ldapmod {
        int             mod_op;
 
+#define LDAP_MOD_OP                    (0x0007)
 #define LDAP_MOD_ADD           (0x0000)
 #define LDAP_MOD_DELETE                (0x0001)
 #define LDAP_MOD_REPLACE       (0x0002)
+#define LDAP_MOD_INCREMENT     (0x0003)
 #define LDAP_MOD_BVALUES       (0x0080)
 /* IMPORTANT: do not use code 0x1000 (or above),
  * it is used internally by the backends!
index ba7a15c501c6e35eaf9720cbec223b09dc7ca9c0..7704737209159b70436dd99239229da53ff96737 100644 (file)
@@ -41,7 +41,9 @@
  * Example:
  *     LDAPMod *mods[] = { 
  *                     { LDAP_MOD_ADD, "cn", { "babs jensen", "babs", 0 } },
- *                     { LDAP_MOD_REPLACE, "sn", { "jensen", 0 } },
+ *                     { LDAP_MOD_REPLACE, "sn", { "babs jensen", "babs", 0 } },
+ *                     { LDAP_MOD_DELETE, "ou", 0 },
+ *                     { LDAP_MOD_INCREMENT, "uidNumber, { "1", 0 } }
  *                     0
  *             }
  *     rc=  ldap_modify_ext( ld, dn, mods, sctrls, cctrls, &msgid );
@@ -65,8 +67,9 @@ ldap_modify_ext( LDAP *ld,
         *              modifications   SEQUENCE OF SEQUENCE {
         *                      operation       ENUMERATED {
         *                              add     (0),
-        *                              delete  (1),
-        *                              replace (2)
+        *                              delete (1),
+        *                              replace (2),
+        *                              increment (3) -- extension
         *                      },
         *                      modification    SEQUENCE {
         *                              type    AttributeType,
@@ -155,7 +158,9 @@ ldap_modify_ext( LDAP *ld,
  * Example:
  *     LDAPMod *mods[] = { 
  *                     { LDAP_MOD_ADD, "cn", { "babs jensen", "babs", 0 } },
- *                     { LDAP_MOD_REPLACE, "sn", { "jensen", 0 } },
+ *                     { LDAP_MOD_REPLACE, "sn", { "babs jensen", "babs", 0 } },
+ *                     { LDAP_MOD_DELETE, "ou", 0 },
+ *                     { LDAP_MOD_INCREMENT, "uidNumber, { "1", 0 } }
  *                     0
  *             }
  *     msgid = ldap_modify( ld, dn, mods );