QueueNode.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 1996-2023 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_SRC_AUTH_QUEUENODE_H
10 #define SQUID_SRC_AUTH_QUEUENODE_H
11 
12 #include "auth/UserRequest.h"
13 #include "cbdata.h"
14 #include "mem/AllocatorProxy.h"
15 
16 namespace Auth
17 {
18 
29 class QueueNode
30 {
32 
33 private:
34  // we store CBDATA here, copy is not safe
35  QueueNode(const QueueNode &);
36  QueueNode &operator =(const QueueNode &);
37 
38 public:
39  QueueNode(Auth::UserRequest *aRequest, AUTHCB *aHandler, void *aData) :
40  next(nullptr),
41  auth_user_request(aRequest),
42  handler(aHandler),
43  data(cbdataReference(aData)) {}
46  while (next) {
47  QueueNode *tmp = next->next;
48  next->next = nullptr;
49  delete next;
50  next = tmp;
51  };
52  }
53 
57  void *data;
58 };
59 
60 } // namespace Auth
61 
62 #endif /* SQUID_SRC_AUTH_QUEUENODE_H */
63 
HTTP Authentication.
Definition: Config.h:18
QueueNode & operator=(const QueueNode &)
AUTHCB * handler
Definition: QueueNode.h:56
#define cbdataReference(var)
Definition: cbdata.h:348
Auth::UserRequest::Pointer auth_user_request
Definition: QueueNode.h:55
QueueNode(Auth::UserRequest *aRequest, AUTHCB *aHandler, void *aData)
Definition: QueueNode.h:39
QueueNode(const QueueNode &)
#define cbdataReferenceDone(var)
Definition: cbdata.h:357
MEMPROXY_CLASS(Auth::QueueNode)
Auth::QueueNode * next
Definition: QueueNode.h:54
void AUTHCB(void *)
Definition: UserRequest.h:57

 

Introduction

Documentation

Support

Miscellaneous