]>
git.ipfire.org Git - thirdparty/squid.git/blob - src/adaptation/icap/OptXact.h
2 * Copyright (C) 1996-2015 The Squid Software Foundation and contributors
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.
9 #ifndef SQUID_ICAPOPTXACT_H
10 #define SQUID_ICAPOPTXACT_H
12 #include "adaptation/icap/Launcher.h"
13 #include "adaptation/icap/Xaction.h"
20 /* OptXact sends an ICAP OPTIONS request to the ICAP service,
21 * parses the ICAP response, and sends it to the initiator. A NULL response
22 * means the ICAP service could not be contacted or did not return any
25 class OptXact
: public Xaction
27 CBDATA_CLASS(OptXact
);
30 OptXact(ServiceRep::Pointer
&aService
);
34 virtual void handleCommConnected();
35 virtual void handleCommWrote(size_t size
);
36 virtual void handleCommRead(size_t size
);
38 void makeRequest(MemBuf
&buf
);
42 virtual bool doneReading() const { return commEof
|| readAll
; }
44 virtual void swanSong();
47 virtual void finalizeLogInfo();
49 bool readAll
; ///< read the entire OPTIONS response
52 // An Launcher that stores OptXact construction info and
53 // creates OptXact when needed
54 class OptXactLauncher
: public Launcher
56 CBDATA_CLASS(OptXactLauncher
);
59 OptXactLauncher(Adaptation::ServicePointer aService
);
62 virtual Xaction
*createXaction();
66 } // namespace Adaptation
68 #endif /* SQUID_ICAPOPTXACT_H */