httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gst...@apache.org
Subject cvs commit: httpd-2.0/modules/dav/main mod_dav.h
Date Thu, 25 Jul 2002 21:56:06 GMT
gstein      2002/07/25 14:56:06

  Modified:    modules/dav/fs dbm.c lock.c repos.c
               modules/dav/main mod_dav.h
  Log:
  In some application environments, the mod_dav hook structures are
  allocated dynamically. The structures need a context pointer to
  represent that dynamic "object", so a pointer was added to the end of
  each of the more important structures.
  
  While providers don't need to add this field to their structures (it
  will default to NULL), I went ahead and added it to mod_dav_fs for
  clarity.
  
  No MMN bump is required because Apache does not use/examine the
  fields (only the provider will set and use them).
  
  Revision  Changes    Path
  1.26      +2 -0      httpd-2.0/modules/dav/fs/dbm.c
  
  Index: dbm.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/dav/fs/dbm.c,v
  retrieving revision 1.25
  retrieving revision 1.26
  diff -u -r1.25 -r1.26
  --- dbm.c	10 Jul 2002 06:01:10 -0000	1.25
  +++ dbm.c	25 Jul 2002 21:56:05 -0000	1.26
  @@ -789,4 +789,6 @@
       dav_propdb_next_name,
       dav_propdb_get_rollback,
       dav_propdb_apply_rollback,
  +
  +    NULL /* ctx */
   };
  
  
  
  1.25      +3 -1      httpd-2.0/modules/dav/fs/lock.c
  
  Index: lock.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/dav/fs/lock.c,v
  retrieving revision 1.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- lock.c	13 Mar 2002 20:47:45 -0000	1.24
  +++ lock.c	25 Jul 2002 21:56:05 -0000	1.25
  @@ -1549,5 +1549,7 @@
       dav_fs_append_locks,
       dav_fs_remove_lock,
       dav_fs_refresh_locks,
  -    NULL, /* get_resource */
  +    NULL, /* lookup_resource */
  +
  +    NULL /* ctx */
   };
  
  
  
  1.71      +3 -1      httpd-2.0/modules/dav/fs/repos.c
  
  Index: repos.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/dav/fs/repos.c,v
  retrieving revision 1.70
  retrieving revision 1.71
  diff -u -r1.70 -r1.71
  --- repos.c	23 Jun 2002 06:46:52 -0000	1.70
  +++ repos.c	25 Jul 2002 21:56:05 -0000	1.71
  @@ -2098,7 +2098,9 @@
       &dav_hooks_locks_fs,
       NULL,               /* vsn */
       NULL,               /* binding */
  -    NULL                /* search */
  +    NULL,               /* search */
  +
  +    NULL                /* ctx */
   };
   
   void dav_fs_gather_propsets(apr_array_header_t *uris)
  
  
  
  1.64      +48 -0     httpd-2.0/modules/dav/main/mod_dav.h
  
  Index: mod_dav.h
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/dav/main/mod_dav.h,v
  retrieving revision 1.63
  retrieving revision 1.64
  diff -u -r1.63 -r1.64
  --- mod_dav.h	23 Jun 2002 06:42:13 -0000	1.63
  +++ mod_dav.h	25 Jul 2002 21:56:05 -0000	1.64
  @@ -606,6 +606,10 @@
   ** are handled through the APR_HOOK interface (to allow for multiple liveprop
   ** providers). The core always provides some properties, and then a given
   ** provider will add more properties.
  +**
  +** Some providers may need to associate a context with the dav_provider
  +** structure -- the ctx field is available for storing this context. Just
  +** leave it NULL if it isn't required.
   */
   typedef struct {
       const dav_hooks_repository *repos;
  @@ -614,6 +618,8 @@
       const dav_hooks_vsn *vsn;
       const dav_hooks_binding *binding;
       const dav_hooks_search *search;
  +
  +    void *ctx;
   } dav_provider;
   
   /*
  @@ -858,6 +864,12 @@
   				  int operation,
   				  void *context,
   				  dav_liveprop_rollback *rollback_ctx);
  +
  +    /*
  +    ** If a provider needs a context to associate with this hooks structure,
  +    ** then this field may be used. In most cases, it will just be NULL.
  +    */
  +    void *ctx;
   };
   
   /*
  @@ -1135,6 +1147,12 @@
                                   dav_deadprop_rollback **prollback);
       dav_error * (*apply_rollback)(dav_db *db,
                                     dav_deadprop_rollback *rollback);
  +
  +    /*
  +    ** If a provider needs a context to associate with this hooks structure,
  +    ** then this field may be used. In most cases, it will just be NULL.
  +    */
  +    void *ctx;
   };
   
   
  @@ -1481,6 +1499,12 @@
   				   const dav_locktoken *locktoken,
   				   const dav_resource *start_resource,
   				   const dav_resource **resource);
  +
  +    /*
  +    ** If a provider needs a context to associate with this hooks structure,
  +    ** then this field may be used. In most cases, it will just be NULL.
  +    */
  +    void *ctx;
   };
   
   /* what types of resources can be discovered by dav_get_resource_state() */
  @@ -1921,6 +1945,12 @@
   
       /* Get the entity tag for a resource */
       const char * (*getetag)(const dav_resource *resource);
  +
  +    /*
  +    ** If a provider needs a context to associate with this hooks structure,
  +    ** then this field may be used. In most cases, it will just be NULL.
  +    */
  +    void *ctx;
   };
   
   
  @@ -2310,6 +2340,12 @@
   			 int no_auto_merge, int no_checkout,
   			 apr_xml_elem *prop_elem,
   			 ap_filter_t *output);
  +
  +    /*
  +    ** If a provider needs a context to associate with this hooks structure,
  +    ** then this field may be used. In most cases, it will just be NULL.
  +    */
  +    void *ctx;
   };
   
   
  @@ -2334,6 +2370,12 @@
       dav_error * (*bind_resource)(const dav_resource *resource,
   				 dav_resource *binding);
   
  +    /*
  +    ** If a provider needs a context to associate with this hooks structure,
  +    ** then this field may be used. In most cases, it will just be NULL.
  +    */
  +    void *ctx;
  +
   };
   
   
  @@ -2365,6 +2407,12 @@
        */
       dav_error * (*search_resource)(request_rec *r,
   				   dav_response **response);
  +
  +    /*
  +    ** If a provider needs a context to associate with this hooks structure,
  +    ** then this field may be used. In most cases, it will just be NULL.
  +    */
  +    void *ctx;
   
   };
   
  
  
  

Mime
View raw message