1 #ifndef SQUID_ACLFILLED_CHECKLIST_H
2 #define SQUID_ACLFILLED_CHECKLIST_H
4 #include "acl/Checklist.h"
6 #include "auth/UserRequest.h"
9 #include "ssl/support.h"
12 class ExternalACLEntry
;
16 ACLChecklist filled with specific data, representing Squid and transaction
17 state for access checks along with some data-specific checking methods */
18 class ACLFilledChecklist
: public ACLChecklist
21 void *operator new(size_t);
22 void operator delete(void *);
25 ACLFilledChecklist(const acl_access
*, HttpRequest
*, const char *ident
);
26 ~ACLFilledChecklist();
29 ConnStateData
* conn() const;
31 /// uses conn() if available
35 void conn(ConnStateData
*);
37 void fd(int aDescriptor
);
39 //int authenticated();
41 bool destinationDomainChecked() const;
42 void markDestinationDomainChecked();
43 bool sourceDomainChecked() const;
44 void markSourceDomainChecked();
47 virtual bool hasRequest() const { return request
!= NULL
; }
48 virtual bool hasReply() const { return reply
!= NULL
; }
54 struct peer
*dst_peer
;
60 char rfc931
[USER_IDENT_SZ
];
62 Auth::UserRequest::Pointer auth_user_request
;
69 Ssl::Errors
*sslErrorList
;
72 ExternalACLEntry
*extacl_entry
;
75 virtual void checkCallback(allow_t answer
);
78 CBDATA_CLASS(ACLFilledChecklist
);
80 ConnStateData
* conn_
; /**< hack for ident and NTLM */
81 int fd_
; /**< may be available when conn_ is not */
82 bool destinationDomainChecked_
;
83 bool sourceDomainChecked_
;
86 /// not implemented; will cause link failures if used
87 ACLFilledChecklist(const ACLFilledChecklist
&);
88 /// not implemented; will cause link failures if used
89 ACLFilledChecklist
&operator=(const ACLFilledChecklist
&);
92 /// convenience and safety wrapper for dynamic_cast<ACLFilledChecklist*>
94 ACLFilledChecklist
*Filled(ACLChecklist
*checklist
)
96 // this should always be safe because ACLChecklist is an abstract class
97 // and ACLFilledChecklist is its only [concrete] child
98 return dynamic_cast<ACLFilledChecklist
*>(checklist
);
101 #endif /* SQUID_ACLFILLED_CHECKLIST_H */