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