]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/slap.h
first step towards removing back-*/external.h
[openldap] / servers / slapd / slap.h
index 4d4bf0ed414060736b031e95decee0fe72efb468..bb41efc677427e85eaa3e763dc0e1084c30afa32 100644 (file)
@@ -476,8 +476,9 @@ typedef struct slap_matching_rule {
 #define SLAP_MR_ORDERING               0x0200U
 #define SLAP_MR_SUBSTR                 0x0400U
 #define SLAP_MR_EXT                            0x0800U /* implicitly extensible */
+#define        SLAP_MR_ORDERED_INDEX           0x1000U
 #ifdef LDAP_COMP_MATCH
-#define SLAP_MR_COMPONENT              0x1000U
+#define SLAP_MR_COMPONENT              0x2000U
 #endif
 
 #define SLAP_MR_EQUALITY_APPROX        ( SLAP_MR_EQUALITY | 0x0010U )
@@ -1448,6 +1449,8 @@ typedef struct syncinfo_s {
         int                                    si_slimit;
                int                                     si_tlimit;
                struct berval           si_syncUUID_ndn;
+               int                                     si_refreshDelete;
+               int                                     si_refreshPresent;
         Avlnode                                *si_presentlist;
                LDAP                            *si_ld;
                LDAP_LIST_HEAD(np, nonpresent_entry) si_nonpresentlist;
@@ -1661,6 +1664,7 @@ typedef struct req_search_s {
        AttributeName *rs_attrs;
        Filter *rs_filter;
        struct berval rs_filterstr;
+       int rs_post_search_id;
 } req_search_s;
 
 typedef struct req_compare_s {
@@ -1997,6 +2001,7 @@ typedef struct slap_paged_state {
 #define LDAP_PSEARCH_BY_PREMODIFY      0x03
 #define LDAP_PSEARCH_BY_MODIFY         0x04
 #define LDAP_PSEARCH_BY_SCOPEOUT       0x05
+#define LDAP_PSEARCH_BY_PREDELETE      0x06
 
 struct psid_entry {
        struct slap_op *ps_op;
@@ -2028,6 +2033,16 @@ struct slap_csn_entry {
        LDAP_TAILQ_ENTRY (slap_csn_entry) ce_csn_link;
 };
 
+struct pc_entry {
+       ID pc_id;
+       int pc_sent;
+       struct berval pc_csn;
+       struct berval pc_entryUUID;
+       struct berval pc_ename;
+       struct berval pc_enname;
+       LDAP_TAILQ_ENTRY( pc_entry ) pc_link;
+};
+
 /*
  * Caches the result of a backend_group check for ACL evaluation
  */
@@ -2100,6 +2115,7 @@ typedef struct slap_op {
 #define ors_attrs oq_search.rs_attrs
 #define ors_filter oq_search.rs_filter
 #define ors_filterstr oq_search.rs_filterstr
+#define ors_post_search_id oq_search.rs_post_search_id
 
 #define orr_newrdn oq_modrdn.rs_newrdn
 #define orr_nnewrdn oq_modrdn.rs_nnewrdn
@@ -2201,6 +2217,13 @@ typedef struct slap_op {
        LDAP_LIST_ENTRY(slap_op) o_ps_link;
        LDAP_LIST_HEAD(pe, psid_entry) o_pm_list;
 
+       int o_refresh_in_progress;
+       LDAP_TAILQ_HEAD(pc_pre, pc_entry) o_ps_pre_candidates;
+       LDAP_TAILQ_HEAD(pc_post, pc_entry) o_ps_post_candidates;
+       Avlnode *o_psearch_finished;
+       struct pc_entry *o_ps_send_wait;
+       ldap_pvt_thread_mutex_t o_pcmutex;
+
        AuthorizationInformation o_authz;
 
        BerElement      *o_ber;         /* ber of the request */
@@ -2551,6 +2574,7 @@ typedef struct slap_component_assertion {
        ber_int_t               ca_use_def;
        MatchingRule            *ca_ma_rule;
        struct berval           ca_ma_value;
+       void*                   ca_component_values;
        struct slap_component_filter    *ca_cf;
        MatchingRuleAssertion   *ca_mra;
 } ComponentAssertion;
@@ -2568,6 +2592,7 @@ typedef struct slap_component_filter {
 #define cf_and         cf_un.cf_un_complex
 #define cf_or          cf_un.cf_un_complex
 #define cf_not         cf_un.cf_un_complex
+#define cf_any         cf_un.cf_un_complex
        
        struct slap_component_filter *cf_next;
 } ComponentFilter;
@@ -2577,43 +2602,76 @@ typedef struct slap_component_assertion_value {
        char* cav_ptr;
        char* cav_end;
 } ComponentAssertionValue;
-
-#include "asn.h"
-
+/*
 typedef int encoder_func LDAP_P((
        void* b,
-       void* comp));
+       void* comp));*/
 
 struct slap_component_syntax_info;
 
-typedef int decoder_func LDAP_P((
+typedef int gser_decoder_func LDAP_P((
+       void* b,
+       struct slap_component_syntax_info* comp_syn_info,
+       int* len,
+       int mode));
+
+typedef int comp_free_func LDAP_P((
+       void* b));
+
+typedef int ber_decoder_func LDAP_P((
        void* b,
-       struct slap_component_syntax_info** comp_syn_info,
-       unsigned int* len,
+       int tag,
+       int elmtLen,
+       struct slap_component_syntax_info* comp_syn_info,
+       int* len,
        int mode));
 
-typedef void* extract_component_from_tag_func LDAP_P((
-       int *tag));
+typedef int ber_tag_decoder_func LDAP_P((
+       void* b,
+       struct slap_component_syntax_info* comp_syn_info,
+       int* len,
+       int mode));
 
 typedef void* extract_component_from_id_func LDAP_P((
        ComponentReference* cr,
        void* comp ));
 
+typedef void* convert_attr_to_comp_func LDAP_P ((
+        Attribute* a,
+       Syntax* syn,
+        struct berval* bv ));
+
+struct slap_component_syntax_info;                                                                          
+typedef int convert_assert_to_comp_func LDAP_P ((
+        struct slap_component_syntax_info* csi_attr,
+        struct berval* bv,
+        struct slap_component_syntax_info** csi,
+        int* len,
+        int mode ));
+                                                                          
+typedef int convert_asn_to_ldap_func LDAP_P ((
+        struct slap_component_syntax_info* csi,
+        struct berval *bv ));
+
+typedef void free_component_func LDAP_P ((
+        struct slap_component_syntax_info* csi ));
+
 typedef int allcomponent_matching_func LDAP_P((
        char* oid,
-       void* component1,
-       void* component2 ));
+       struct slap_component_syntax_info* comp1,
+       struct slap_component_syntax_info* comp));
 
 typedef struct slap_component_desc{
        int             cd_tag;
-       ComponentId*    cd_identifier;
-       encoder_func    *cd_encoder;
-       decoder_func    *cd_decoder;
-       extract_component_from_tag_func* cd_extract_t;
+       int             cd_type;
+       int             cd_type_id;
+       gser_decoder_func       *cd_gser_decoder;
+       ber_decoder_func        *cd_ber_decoder;
+       comp_free_func          *cd_free;
        extract_component_from_id_func*  cd_extract_i;
-       AsnType         cd_type;
-       AsnTypeId       cd_type_id;
-       allcomponent_matching_func*     cd_all_match;
+       slap_syntax_validate_func       *cd_validate;
+       slap_syntax_transform_func      *cd_pretty;
+       allcomponent_matching_func      *cd_all_match;
 } ComponentDesc;
 
 typedef struct slap_component_syntax_info {
@@ -2621,18 +2679,6 @@ typedef struct slap_component_syntax_info {
        ComponentDesc* csi_comp_desc;
 } ComponentSyntaxInfo;
 
-typedef struct asntype_to_matchingrule {
-       AsnTypeId       atmr_typeId;
-       char*           atmr_mr_name;
-       MatchingRule    *atmr_mr;
-} AsnTypetoMatchingRule;
-
-typedef struct asntype_to_matchingrule_table {
-       char* atmr_oid;
-       struct asntype_to_matchingrule atmr_table[ASNTYPE_END];
-       struct asntype_to_matchingrule_table* atmr_table_next;
-} AsnTypetoMatchingRuleTable;
-
 #endif
 LDAP_END_DECL