QueueNode.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 1996-2017 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/forward.h"
13 #include "cbdata.h"
14 
15 namespace Auth
16 {
17 
28 class QueueNode
29 {
31 
32 private:
33  // we store CBDATA here, copy is not safe
34  QueueNode(const QueueNode &);
35  QueueNode &operator =(const QueueNode &);
36 
37 public:
38  QueueNode(Auth::UserRequest *aRequest, AUTHCB *aHandler, void *aData) :
39  next(NULL),
40  auth_user_request(aRequest),
41  handler(aHandler),
42  data(cbdataReference(aData)) {}
45  while (next) {
46  QueueNode *tmp = next->next;
47  next->next = NULL;
48  delete next;
49  next = tmp;
50  };
51  }
52 
56  void *data;
57 };
58 
59 } // namespace Auth
60 
61 #endif /* SQUID_SRC_AUTH_QUEUENODE_H */
62 
Auth::UserRequest::Pointer auth_user_request
Definition: QueueNode.h:54
QueueNode(const QueueNode &)
#define cbdataReferenceDone(var)
Definition: cbdata.h:350
MEMPROXY_CLASS(Auth::QueueNode)
#define cbdataReference(var)
Definition: cbdata.h:341
Auth::QueueNode * next
Definition: QueueNode.h:53
QueueNode & operator=(const QueueNode &)
AUTHCB * handler
Definition: QueueNode.h:55
QueueNode(Auth::UserRequest *aRequest, AUTHCB *aHandler, void *aData)
Definition: QueueNode.h:38
void AUTHCB(void *)
Definition: UserRequest.h:57
#define NULL
Definition: types.h:166

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors