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