]>
Commit | Line | Data |
---|---|---|
d295d770 | 1 | /* |
bbc27441 | 2 | * Copyright (C) 1996-2014 The Squid Software Foundation and contributors |
d295d770 | 3 | * |
bbc27441 AJ |
4 | * Squid software is distributed under GPLv2+ license and includes |
5 | * contributions from numerous individuals and organizations. | |
6 | * Please see the COPYING and CONTRIBUTORS files for details. | |
d295d770 | 7 | */ |
bbc27441 | 8 | |
d295d770 | 9 | #ifndef SQUID_WORDLIST_H |
10 | #define SQUID_WORDLIST_H | |
11 | ||
582c2af2 | 12 | #include "globals.h" |
d295d770 | 13 | #include "MemPool.h" |
582c2af2 | 14 | #include "profiler/Profiler.h" |
514fc315 | 15 | #include "SBufList.h" |
d295d770 | 16 | |
6a17a36d FC |
17 | /** A list of C-strings |
18 | * | |
19 | * \deprecated use SBufList instead | |
20 | */ | |
d295d770 | 21 | class wordlist |
22 | { | |
d295d770 | 23 | public: |
24 | MEMPROXY_CLASS(wordlist); | |
25 | char *key; | |
26 | wordlist *next; | |
27 | }; | |
28 | ||
29 | MEMPROXY_CLASS_INLINE(wordlist); | |
30 | ||
9ce629cf | 31 | class MemBuf; |
514fc315 | 32 | |
6a17a36d FC |
33 | /** Add a null-terminated c-string to a wordlist |
34 | * | |
35 | * \deprecated use SBufList.push_back(SBuf(word)) instead | |
36 | */ | |
8a648e8d | 37 | const char *wordlistAdd(wordlist **, const char *); |
514fc315 | 38 | |
6a17a36d FC |
39 | /** Concatenate a wordlist |
40 | * | |
41 | * \deprecated use SBufListContainerJoin(SBuf()) from SBufAlgos.h instead | |
42 | */ | |
43 | void wordlistCat(const wordlist *, MemBuf *); | |
514fc315 | 44 | |
6a17a36d FC |
45 | /** append a wordlist to another |
46 | * | |
47 | * \deprecated use SBufList.merge(otherwordlist) instead | |
48 | */ | |
8a648e8d | 49 | void wordlistAddWl(wordlist **, wordlist *); |
514fc315 | 50 | |
6a17a36d FC |
51 | /** Concatenate the words in a wordlist |
52 | * | |
53 | * \deprecated use SBufListContainerJoin(SBuf()) from SBufAlgos.h instead | |
54 | */ | |
8a648e8d | 55 | void wordlistJoin(wordlist **, wordlist **); |
514fc315 | 56 | |
6a17a36d | 57 | /// duplicate a wordlist |
8a648e8d | 58 | wordlist *wordlistDup(const wordlist *); |
514fc315 | 59 | |
6a17a36d | 60 | /// destroy a wordlist |
8a648e8d | 61 | void wordlistDestroy(wordlist **); |
d295d770 | 62 | |
514fc315 FC |
63 | /// convert a wordlist to a SBufList |
64 | SBufList ToSBufList(wordlist *); | |
65 | ||
d295d770 | 66 | #endif /* SQUID_WORDLIST_H */ |