|
||||
File indexing completed on 2025-01-18 09:57:12
0001 /* 0002 * Copyright (c) 2000-2007 Niels Provos <provos@citi.umich.edu> 0003 * Copyright (c) 2007-2012 Niels Provos and Nick Mathewson 0004 * 0005 * Redistribution and use in source and binary forms, with or without 0006 * modification, are permitted provided that the following conditions 0007 * are met: 0008 * 1. Redistributions of source code must retain the above copyright 0009 * notice, this list of conditions and the following disclaimer. 0010 * 2. Redistributions in binary form must reproduce the above copyright 0011 * notice, this list of conditions and the following disclaimer in the 0012 * documentation and/or other materials provided with the distribution. 0013 * 3. The name of the author may not be used to endorse or promote products 0014 * derived from this software without specific prior written permission. 0015 * 0016 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 0017 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 0018 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 0019 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 0020 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 0021 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 0022 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 0023 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 0024 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 0025 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 0026 */ 0027 #ifndef EVENT2_KEYVALQ_STRUCT_H_INCLUDED_ 0028 #define EVENT2_KEYVALQ_STRUCT_H_INCLUDED_ 0029 0030 #ifdef __cplusplus 0031 extern "C" { 0032 #endif 0033 0034 /* Fix so that people don't have to run with <sys/queue.h> */ 0035 /* XXXX This code is duplicated with event_struct.h */ 0036 #ifndef TAILQ_ENTRY 0037 #define EVENT_DEFINED_TQENTRY_ 0038 #define TAILQ_ENTRY(type) \ 0039 struct { \ 0040 struct type *tqe_next; /* next element */ \ 0041 struct type **tqe_prev; /* address of previous next element */ \ 0042 } 0043 #endif /* !TAILQ_ENTRY */ 0044 0045 #ifndef TAILQ_HEAD 0046 #define EVENT_DEFINED_TQHEAD_ 0047 #define TAILQ_HEAD(name, type) \ 0048 struct name { \ 0049 struct type *tqh_first; \ 0050 struct type **tqh_last; \ 0051 } 0052 #endif 0053 0054 /* 0055 * Key-Value pairs. Can be used for HTTP headers but also for 0056 * query argument parsing. 0057 */ 0058 struct evkeyval { 0059 TAILQ_ENTRY(evkeyval) next; 0060 0061 char *key; 0062 char *value; 0063 }; 0064 0065 TAILQ_HEAD (evkeyvalq, evkeyval); 0066 0067 /* XXXX This code is duplicated with event_struct.h */ 0068 #ifdef EVENT_DEFINED_TQENTRY_ 0069 #undef TAILQ_ENTRY 0070 #endif 0071 0072 #ifdef EVENT_DEFINED_TQHEAD_ 0073 #undef TAILQ_HEAD 0074 #endif 0075 0076 #ifdef __cplusplus 0077 } 0078 #endif 0079 0080 #endif
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |