/usr/src/redhat/BUILD/httpd-2.2.3/modules/cache/cache_pqueue.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 
00026 #ifndef CACHE_PQUEUE_H
00027 #define CACHE_PQUEUE_H
00028 
00029 #include <apr.h>
00030 #include <apr_errno.h>
00031 
00032 #if APR_HAVE_STDIO_H
00033 #include <stdio.h>
00034 #endif
00035 
00036 #ifdef __cplusplus
00037 extern "C" {
00038 #endif
00039 
00041 typedef struct cache_pqueue_t cache_pqueue_t;
00042 
00048 typedef long (*cache_pqueue_set_priority)(long queue_clock, void *a);
00049 typedef long (*cache_pqueue_get_priority)(void *a);
00050 
00052 typedef apr_ssize_t (*cache_pqueue_getpos)(void *a);
00053 
00059 typedef void (*cache_pqueue_setpos)(void *a, apr_ssize_t pos);
00060 
00062 typedef void (*cache_pqueue_print_entry)(FILE *out, void *a);
00063 
00075 cache_pqueue_t *cache_pq_init(apr_ssize_t n,
00076                               cache_pqueue_get_priority pri,
00077                               cache_pqueue_getpos get,
00078                               cache_pqueue_setpos set);
00083 void cache_pq_free(cache_pqueue_t *q);
00088 apr_ssize_t cache_pq_size(cache_pqueue_t *q);
00089 
00096 apr_status_t cache_pq_insert(cache_pqueue_t *q, void *d);
00097 
00098 /*
00099  * move a existing entry to a different priority
00100  * @param q the queue
00101  * @param old the old priority
00102  * @param d the entry
00103  */
00104 void cache_pq_change_priority(cache_pqueue_t *q,
00105                               long old_priority,
00106                               long new_priority,
00107                               void *d);
00108 
00115 void *cache_pq_pop(cache_pqueue_t *q);
00116 
00123 apr_status_t cache_pq_remove(cache_pqueue_t *q, void *d);
00124 
00131 void *cache_pq_peek(cache_pqueue_t *q);
00132 
00141 void cache_pq_print(cache_pqueue_t *q, 
00142                     FILE *out, 
00143                     cache_pqueue_print_entry print);
00144 
00153 void cache_pq_dump(cache_pqueue_t *q, 
00154                    FILE *out,
00155                    cache_pqueue_print_entry print);
00156 
00163 int cache_pq_is_valid(cache_pqueue_t *q);
00164 
00165 #ifdef __cplusplus
00166 }
00167 #endif
00168 
00169 #endif /* !CACHE_PQUEUE_H */
00170 

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