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"
14 class ExternalACLEntry
;
18 ACLChecklist filled with specific data, representing Squid and transaction
19 state for access checks along with some data-specific checking methods */
20 class ACLFilledChecklist
: public ACLChecklist
23 void *operator new(size_t);
24 void operator delete(void *);
27 ACLFilledChecklist(const acl_access
*, HttpRequest
*, const char *ident
);
28 ~ACLFilledChecklist();
31 ConnStateData
* conn() const;
33 /// uses conn() if available
37 void conn(ConnStateData
*);
39 void fd(int aDescriptor
);
41 //int authenticated();
43 bool destinationDomainChecked() const;
44 void markDestinationDomainChecked();
45 bool sourceDomainChecked() const;
46 void markSourceDomainChecked();
49 virtual bool hasRequest() const { return request
!= NULL
; }
50 virtual bool hasReply() const { return reply
!= NULL
; }
62 char rfc931
[USER_IDENT_SZ
];
64 Auth::UserRequest::Pointer auth_user_request
;
71 /// SSL [certificate validation] errors, in undefined order
72 Ssl::Errors
*sslErrors
;
75 ExternalACLEntry
*extacl_entry
;
78 ConnStateData
* conn_
; /**< hack for ident and NTLM */
79 int fd_
; /**< may be available when conn_ is not */
80 bool destinationDomainChecked_
;
81 bool sourceDomainChecked_
;
82 /// not implemented; will cause link failures if used
83 ACLFilledChecklist(const ACLFilledChecklist
&);
84 /// not implemented; will cause link failures if used
85 ACLFilledChecklist
&operator=(const ACLFilledChecklist
&);
87 CBDATA_CLASS(ACLFilledChecklist
);
90 /// convenience and safety wrapper for dynamic_cast<ACLFilledChecklist*>
92 ACLFilledChecklist
*Filled(ACLChecklist
*checklist
)
94 // this should always be safe because ACLChecklist is an abstract class
95 // and ACLFilledChecklist is its only [concrete] child
96 return dynamic_cast<ACLFilledChecklist
*>(checklist
);
99 #endif /* SQUID_ACLFILLED_CHECKLIST_H */