]> git.ipfire.org Git - thirdparty/squid.git/blame - src/adaptation/ecap/Host.h
Support libecap v1.0, allowing asynchronous adapters and eCAP version checks.
[thirdparty/squid.git] / src / adaptation / ecap / Host.h
CommitLineData
fdc96a39 1/*
b510f3a1 2 * DEBUG: section 93 eCAP Interface
fdc96a39
AR
3 */
4
5#ifndef SQUID_ECAP_HOST_H
6#define SQUID_ECAP_HOST_H
7
8#include <libecap/host/host.h>
9
af6a12ee
AJ
10namespace Adaptation
11{
e1381638
AJ
12namespace Ecap
13{
fdc96a39
AR
14
15// Squid wrapper, providing host application functionality to eCAP services.
16class Host : public libecap::host::Host
17{
18public:
8442a9b2 19 /* libecap::host::Host API */
26ac0430
AJ
20 virtual std::string uri() const; // unique across all vendors
21 virtual void describe(std::ostream &os) const; // free-format info
0a720258 22 virtual void noteVersionedService(const char *libEcapVersion, const libecap::weak_ptr<libecap::adapter::Service> &s);
26ac0430
AJ
23 virtual std::ostream *openDebug(libecap::LogVerbosity lv);
24 virtual void closeDebug(std::ostream *debug);
cc7b2f6c
AR
25 typedef libecap::shared_ptr<libecap::Message> MessagePtr;
26 virtual MessagePtr newRequest() const;
27 virtual MessagePtr newResponse() const;
28
76fc7e57
AJ
29 static void Register(); ///< register adaptation host
30
31private:
32 Host();
33 Host (const Host&); ///< not implemented
34 Host& operator= (const Host&); ///< not implemented
fdc96a39
AR
35};
36
530f96dd
AR
37extern const libecap::Name protocolInternal;
38extern const libecap::Name protocolCacheObj;
39extern const libecap::Name protocolIcp;
555aedbf
AR
40extern const libecap::Name protocolIcy;
41extern const libecap::Name protocolUnknown;
530f96dd
AR
42#if USE_HTCP
43extern const libecap::Name protocolHtcp;
44#endif
22fff3bf 45extern const libecap::Name metaBypassable; ///< an ecap_service parameter
530f96dd 46
fdc96a39 47} // namespace Ecap
574b508c 48} // namespace Adaptation
fdc96a39
AR
49
50#endif /* SQUID_ECAP_HOST_H */