]> git.ipfire.org Git - thirdparty/squid.git/blame_incremental - src/wordlist.h
SourceFormat Enforcement
[thirdparty/squid.git] / src / wordlist.h
... / ...
CommitLineData
1/*
2 * Copyright (C) 1996-2015 The Squid Software Foundation and contributors
3 *
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.
7 */
8
9#ifndef SQUID_WORDLIST_H
10#define SQUID_WORDLIST_H
11
12#include "globals.h"
13#include "profiler/Profiler.h"
14#include "SBufList.h"
15
16/** A list of C-strings
17 *
18 * \deprecated use SBufList instead
19 */
20class wordlist
21{
22 MEMPROXY_CLASS(wordlist);
23
24public:
25 char *key;
26 wordlist *next;
27};
28
29class MemBuf;
30
31/** Add a null-terminated c-string to a wordlist
32 *
33 * \deprecated use SBufList.push_back(SBuf(word)) instead
34 */
35const char *wordlistAdd(wordlist **, const char *);
36
37/** Concatenate a wordlist
38 *
39 * \deprecated use SBufListContainerJoin(SBuf()) from SBufAlgos.h instead
40 */
41void wordlistCat(const wordlist *, MemBuf *);
42
43/** append a wordlist to another
44 *
45 * \deprecated use SBufList.merge(otherwordlist) instead
46 */
47void wordlistAddWl(wordlist **, wordlist *);
48
49/** Concatenate the words in a wordlist
50 *
51 * \deprecated use SBufListContainerJoin(SBuf()) from SBufAlgos.h instead
52 */
53void wordlistJoin(wordlist **, wordlist **);
54
55/// duplicate a wordlist
56wordlist *wordlistDup(const wordlist *);
57
58/// destroy a wordlist
59void wordlistDestroy(wordlist **);
60
61/// convert a wordlist to a SBufList
62SBufList ToSBufList(wordlist *);
63
64#endif /* SQUID_WORDLIST_H */
65