1 #ifndef SQUID_ACLFILLED_CHECKLIST_H
2 #define SQUID_ACLFILLED_CHECKLIST_H
4 #include "acl/Checklist.h"
7 class ExternalACLEntry
;
11 ACLChecklist filled with specific data, representing Squid and transaction
12 state for access checks along with some data-specific checking methods */
13 class ACLFilledChecklist
: public ACLChecklist
16 void *operator new(size_t);
17 void operator delete(void *);
20 ACLFilledChecklist(const acl_access
*, HttpRequest
*, const char *ident
);
21 ~ACLFilledChecklist();
24 ConnStateData
* conn() const;
26 /// uses conn() if available
30 void conn(ConnStateData
*);
32 void fd(int aDescriptor
);
34 //int authenticated();
36 bool destinationDomainChecked() const;
37 void markDestinationDomainChecked();
38 bool sourceDomainChecked() const;
39 void markSourceDomainChecked();
42 virtual bool hasRequest() const { return request
!= NULL
; }
43 virtual bool hasReply() const { return reply
!= NULL
; }
49 struct peer
*dst_peer
;
54 char rfc931
[USER_IDENT_SZ
];
55 AuthUserRequest
*auth_user_request
;
65 ExternalACLEntry
*extacl_entry
;
68 virtual void checkCallback(allow_t answer
);
71 CBDATA_CLASS(ACLFilledChecklist
);
73 ConnStateData
* conn_
; /**< hack for ident and NTLM */
74 int fd_
; /**< may be available when conn_ is not */
75 bool destinationDomainChecked_
;
76 bool sourceDomainChecked_
;
79 /// not implemented; will cause link failures if used
80 ACLFilledChecklist(const ACLFilledChecklist
&);
81 /// not implemented; will cause link failures if used
82 ACLFilledChecklist
&operator=(const ACLFilledChecklist
&);
85 /// convenience and safety wrapper for dynamic_cast<ACLFilledChecklist*>
87 ACLFilledChecklist
*Filled(ACLChecklist
*checklist
)
89 // this should always be safe because ACLChecklist is an abstract class
90 // and ACLFilledChecklist is its only [concrete] child
91 return dynamic_cast<ACLFilledChecklist
*>(checklist
);
94 #endif /* SQUID_ACLFILLED_CHECKLIST_H */