]> git.ipfire.org Git - thirdparty/squid.git/blame - src/acl/UserData.h
Simplify appending SBuf to String (#2108)
[thirdparty/squid.git] / src / acl / UserData.h
CommitLineData
8000a965 1/*
1f7b830e 2 * Copyright (C) 1996-2025 The Squid Software Foundation and contributors
8000a965 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.
8000a965 7 */
8
ff9d9458
FC
9#ifndef SQUID_SRC_ACL_USERDATA_H
10#define SQUID_SRC_ACL_USERDATA_H
741c2986 11
3ad63615
AR
12#include "acl/Acl.h"
13#include "acl/Data.h"
65e41a45 14#include "sbuf/SBuf.h"
8000a965 15
52669f3a
FC
16#include <set>
17
62e76326 18class ACLUserData : public ACLData<char const *>
19{
b001e822 20 MEMPROXY_CLASS(ACLUserData);
8000a965 21
741c2986 22public:
337b9aa4 23 ~ACLUserData() override {}
796e7038 24 ACLUserData();
337b9aa4
AR
25 bool match(char const *user) override;
26 SBufList dump() const override;
27 void parse() override;
28 bool empty() const override;
62e76326 29
52669f3a 30private:
8d76389c
EB
31 /// whether parse() is called in a case insensitive context
32 static Acl::BooleanOptionValue CaseInsensitive_;
33
34 /* ACLData API */
337b9aa4 35 const Acl::Options &lineOptions() override;
52669f3a
FC
36
37 typedef std::set<SBuf,bool(*)(const SBuf&, const SBuf&)> UserDataNames_t;
38 UserDataNames_t userDataNames;
62e76326 39
26ac0430 40 struct {
3dd52a0b
FC
41 bool case_insensitive;
42 bool required;
3d0ac046 43 } flags;
52669f3a 44
8000a965 45};
46
ff9d9458 47#endif /* SQUID_SRC_ACL_USERDATA_H */
f53969cc 48