From: Graham Leggett Date: Tue, 21 Sep 2010 22:55:22 +0000 (+0000) Subject: Move private cache_* declarations out of the public mod_cache.h file. X-Git-Tag: 2.3.9~462 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c8de96f357d737887b477fa96451c55df7855329;p=thirdparty%2Fapache%2Fhttpd.git Move private cache_* declarations out of the public mod_cache.h file. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@999681 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/include/ap_mmn.h b/include/ap_mmn.h index 36115eae3c4..d8efe89889c 100644 --- a/include/ap_mmn.h +++ b/include/ap_mmn.h @@ -261,14 +261,16 @@ * 20100919.1 (2.3.9-dev) Introduce ap_rxplus util/API * 20100921.0 (2.3.9-dev) Add an apr_bucket_brigade to the create_entity * provider interface for mod_cache.h. + * 20100922.0 (2.3.9-dev) Move cache_* functions from mod_cache.h to a + * private header file. */ #define MODULE_MAGIC_COOKIE 0x41503234UL /* "AP24" */ #ifndef MODULE_MAGIC_NUMBER_MAJOR -#define MODULE_MAGIC_NUMBER_MAJOR 20100919 +#define MODULE_MAGIC_NUMBER_MAJOR 20100922 #endif -#define MODULE_MAGIC_NUMBER_MINOR 1 /* 0...n */ +#define MODULE_MAGIC_NUMBER_MINOR 0 /* 0...n */ /** * Determine if the server's current MODULE_MAGIC_NUMBER is at least a diff --git a/modules/cache/cache_storage.c b/modules/cache/cache_storage.c index 4c822d6cd91..c0084f9d2e8 100644 --- a/modules/cache/cache_storage.c +++ b/modules/cache/cache_storage.c @@ -16,6 +16,8 @@ #include "mod_cache.h" +#include "cache_storage.h" + APLOG_USE_MODULE(cache); extern APR_OPTIONAL_FN_TYPE(ap_cache_generate_key) *cache_generate_key; diff --git a/modules/cache/cache_storage.h b/modules/cache/cache_storage.h new file mode 100644 index 00000000000..18749172b53 --- /dev/null +++ b/modules/cache/cache_storage.h @@ -0,0 +1,49 @@ +/* Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @file cache_storage.h + * @brief Cache Storage Functions + * + * @defgroup Cache_storage Cache Storage Functions + * @ingroup MOD_CACHE + * @{ + */ + +#ifndef CACHE_STORAGE_H +#define CACHE_STORAGE_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include "mod_cache.h" + +/** + * cache_storage.c + */ +#define MOD_CACHE_REQUEST_REC "mod_cache_request_rec" +int cache_remove_url(cache_request_rec *cache, apr_pool_t *p); +int cache_create_entity(request_rec *r, apr_off_t size, apr_bucket_brigade *in); +int cache_select(request_rec *r); +apr_status_t cache_generate_key_default( request_rec *r, apr_pool_t*p, char**key ); + +#ifdef __cplusplus +} +#endif + +#endif /* !CACHE_STORAGE_H */ +/** @} */ diff --git a/modules/cache/mod_cache.c b/modules/cache/mod_cache.c index cb087a26c65..db1fb2d621b 100644 --- a/modules/cache/mod_cache.c +++ b/modules/cache/mod_cache.c @@ -16,6 +16,8 @@ #include "mod_cache.h" +#include "cache_storage.h" + module AP_MODULE_DECLARE_DATA cache_module; APR_OPTIONAL_FN_TYPE(ap_cache_generate_key) *cache_generate_key; diff --git a/modules/cache/mod_cache.h b/modules/cache/mod_cache.h index eae2646c7eb..c17574adaf3 100644 --- a/modules/cache/mod_cache.h +++ b/modules/cache/mod_cache.h @@ -383,30 +383,6 @@ CACHE_DECLARE(apr_table_t *)ap_cache_cacheable_hdrs_out(apr_pool_t *pool, apr_table_t *t, server_rec *s); -/** - * cache_storage.c - */ -#define MOD_CACHE_REQUEST_REC "mod_cache_request_rec" -int cache_remove_url(cache_request_rec *cache, apr_pool_t *p); -int cache_create_entity(request_rec *r, apr_off_t size, apr_bucket_brigade *in); -int cache_select(request_rec *r); -apr_status_t cache_generate_key_default( request_rec *r, apr_pool_t*p, char**key ); - - -/** - * create a key for the cache based on the request record - * this is the 'default' version, which can be overridden by a default function - */ -const char* cache_create_key( request_rec*r ); - -/* -apr_status_t cache_store_entity_headers(cache_handle_t *h, request_rec *r, cache_info *info); -apr_status_t cache_store_entity_body(cache_handle_t *h, request_rec *r, apr_bucket_brigade *bb); - -apr_status_t cache_recall_entity_headers(cache_handle_t *h, request_rec *r); -apr_status_t cache_recall_entity_body(cache_handle_t *h, apr_pool_t *p, apr_bucket_brigade *bb); -*/ - /* hooks */ APR_DECLARE_OPTIONAL_FN(apr_status_t,