]>
Commit | Line | Data |
---|---|---|
d295d770 | 1 | /* |
bde978a6 | 2 | * Copyright (C) 1996-2015 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" |
582c2af2 | 13 | #include "profiler/Profiler.h" |
514fc315 | 14 | #include "SBufList.h" |
d295d770 | 15 | |
6a17a36d FC |
16 | /** A list of C-strings |
17 | * | |
18 | * \deprecated use SBufList instead | |
19 | */ | |
d295d770 | 20 | class wordlist |
21 | { | |
d295d770 | 22 | MEMPROXY_CLASS(wordlist); |
741c2986 AJ |
23 | |
24 | public: | |
d295d770 | 25 | char *key; |
26 | wordlist *next; | |
27 | }; | |
28 | ||
9ce629cf | 29 | class MemBuf; |
514fc315 | 30 | |
6a17a36d FC |
31 | /** Add a null-terminated c-string to a wordlist |
32 | * | |
33 | * \deprecated use SBufList.push_back(SBuf(word)) instead | |
34 | */ | |
8a648e8d | 35 | const char *wordlistAdd(wordlist **, const char *); |
514fc315 | 36 | |
6a17a36d FC |
37 | /** Concatenate a wordlist |
38 | * | |
39 | * \deprecated use SBufListContainerJoin(SBuf()) from SBufAlgos.h instead | |
40 | */ | |
41 | void wordlistCat(const wordlist *, MemBuf *); | |
514fc315 | 42 | |
6a17a36d FC |
43 | /** append a wordlist to another |
44 | * | |
45 | * \deprecated use SBufList.merge(otherwordlist) instead | |
46 | */ | |
8a648e8d | 47 | void wordlistAddWl(wordlist **, wordlist *); |
514fc315 | 48 | |
6a17a36d FC |
49 | /** Concatenate the words in a wordlist |
50 | * | |
51 | * \deprecated use SBufListContainerJoin(SBuf()) from SBufAlgos.h instead | |
52 | */ | |
8a648e8d | 53 | void wordlistJoin(wordlist **, wordlist **); |
514fc315 | 54 | |
6a17a36d | 55 | /// duplicate a wordlist |
8a648e8d | 56 | wordlist *wordlistDup(const wordlist *); |
514fc315 | 57 | |
6a17a36d | 58 | /// destroy a wordlist |
8a648e8d | 59 | void wordlistDestroy(wordlist **); |
d295d770 | 60 | |
514fc315 FC |
61 | /// convert a wordlist to a SBufList |
62 | SBufList ToSBufList(wordlist *); | |
63 | ||
d295d770 | 64 | #endif /* SQUID_WORDLIST_H */ |
f53969cc | 65 |