/usr/src/redhat/BUILD/httpd-2.2.3/modules/database/mod_dbd.h

説明を見る。
00001 /* Licensed to the Apache Software Foundation (ASF) under one or more
00002  * contributor license agreements.  See the NOTICE file distributed with
00003  * this work for additional information regarding copyright ownership.
00004  * The ASF licenses this file to You under the Apache License, Version 2.0
00005  * (the "License"); you may not use this file except in compliance with
00006  * the License.  You may obtain a copy of the License at
00007  *
00008  *     http://www.apache.org/licenses/LICENSE-2.0
00009  *
00010  * Unless required by applicable law or agreed to in writing, software
00011  * distributed under the License is distributed on an "AS IS" BASIS,
00012  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00013  * See the License for the specific language governing permissions and
00014  * limitations under the License.
00015  */
00016 
00031 #ifndef DBD_H
00032 #define DBD_H
00033 
00034 /* Create a set of DBD_DECLARE(type), DBD_DECLARE_NONSTD(type) and 
00035  * DBD_DECLARE_DATA with appropriate export and import tags for the platform
00036  */
00037 #if !defined(WIN32)
00038 #define DBD_DECLARE(type)            type
00039 #define DBD_DECLARE_NONSTD(type)     type
00040 #define DBD_DECLARE_DATA
00041 #elif defined(DBD_DECLARE_STATIC)
00042 #define DBD_DECLARE(type)            type __stdcall
00043 #define DBD_DECLARE_NONSTD(type)     type
00044 #define DBD_DECLARE_DATA
00045 #elif defined(DBD_DECLARE_EXPORT)
00046 #define DBD_DECLARE(type)            __declspec(dllexport) type __stdcall
00047 #define DBD_DECLARE_NONSTD(type)     __declspec(dllexport) type
00048 #define DBD_DECLARE_DATA             __declspec(dllexport)
00049 #else
00050 #define DBD_DECLARE(type)            __declspec(dllimport) type __stdcall
00051 #define DBD_DECLARE_NONSTD(type)     __declspec(dllimport) type
00052 #define DBD_DECLARE_DATA             __declspec(dllimport)
00053 #endif
00054 
00055 #include <httpd.h>
00056 #include <apr_optional.h>
00057 #include <apr_hash.h>
00058 
00059 typedef struct {
00060     apr_dbd_t *handle;
00061     const apr_dbd_driver_t *driver;
00062     apr_hash_t *prepared;
00063     apr_pool_t *pool;
00064 } ap_dbd_t;
00065 
00066 /* Export functions to access the database */
00067 
00068 /* acquire a connection that MUST be explicitly closed.
00069  * Returns NULL on error
00070  */
00071 DBD_DECLARE_NONSTD(ap_dbd_t*) ap_dbd_open(apr_pool_t*, server_rec*);
00072 
00073 /* release a connection acquired with ap_dbd_open */
00074 DBD_DECLARE_NONSTD(void) ap_dbd_close(server_rec*, ap_dbd_t*);
00075 
00076 /* acquire a connection that will have the lifetime of a request
00077  * and MUST NOT be explicitly closed.  Return NULL on error.
00078  * This is the preferred function for most applications.
00079  */
00080 DBD_DECLARE_NONSTD(ap_dbd_t*) ap_dbd_acquire(request_rec*);
00081 
00082 /* acquire a connection that will have the lifetime of a connection
00083  * and MUST NOT be explicitly closed.  Return NULL on error.
00084  * This is the preferred function for most applications.
00085  */
00086 DBD_DECLARE_NONSTD(ap_dbd_t*) ap_dbd_cacquire(conn_rec*);
00087 
00088 /* Prepare a statement for use by a client module during
00089  * the server startup/configuration phase.  Can't be called
00090  * after the server has created its children (use apr_dbd_*).
00091  */
00092 DBD_DECLARE_NONSTD(void) ap_dbd_prepare(server_rec*, const char*, const char*);
00093 
00094 /* Also export them as optional functions for modules that prefer it */
00095 APR_DECLARE_OPTIONAL_FN(ap_dbd_t*, ap_dbd_open, (apr_pool_t*, server_rec*));
00096 APR_DECLARE_OPTIONAL_FN(void, ap_dbd_close, (server_rec*, ap_dbd_t*));
00097 APR_DECLARE_OPTIONAL_FN(ap_dbd_t*, ap_dbd_acquire, (request_rec*));
00098 APR_DECLARE_OPTIONAL_FN(ap_dbd_t*, ap_dbd_cacquire, (conn_rec*));
00099 APR_DECLARE_OPTIONAL_FN(void, ap_dbd_prepare, (server_rec*, const char*, const char*));
00100 
00101 #endif
00102 

Apacheに対してSun Jul 19 22:05:23 2009に生成されました。  doxygen 1.4.7