Squid Web Cache master
Loading...
Searching...
No Matches
Host.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 1996-2025 The Squid Software Foundation and contributors
3 *
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.
7 */
8
9/* DEBUG: section 93 eCAP Interface */
10
11#ifndef SQUID_SRC_ADAPTATION_ECAP_HOST_H
12#define SQUID_SRC_ADAPTATION_ECAP_HOST_H
13
14#if HAVE_LIBECAP_HOST_HOST_H
15#include <libecap/host/host.h>
16#endif
17
18namespace Adaptation
19{
20namespace Ecap
21{
22
23// Squid wrapper, providing host application functionality to eCAP services.
24class Host : public libecap::host::Host
25{
26public:
27 /* libecap::host::Host API */
28 std::string uri() const override; // unique across all vendors
29 void describe(std::ostream &os) const override; // free-format info
30 void noteVersionedService(const char *libEcapVersion, const libecap::weak_ptr<libecap::adapter::Service> &s) override;
31 std::ostream *openDebug(libecap::LogVerbosity lv) override;
32 void closeDebug(std::ostream *debug) override;
33 typedef libecap::shared_ptr<libecap::Message> MessagePtr;
34 MessagePtr newRequest() const override;
35 MessagePtr newResponse() const override;
36
37 static void Register();
38
39private:
40 Host();
41 Host (const Host&);
42 Host& operator= (const Host&);
43};
44
45extern const libecap::Name protocolInternal;
46extern const libecap::Name protocolCacheObj;
47extern const libecap::Name protocolIcp;
48extern const libecap::Name protocolIcy;
49extern const libecap::Name protocolUnknown;
50#if USE_HTCP
51extern const libecap::Name protocolHtcp;
52#endif
53extern const libecap::Name metaBypassable;
54
55} // namespace Ecap
56} // namespace Adaptation
57
58#endif /* SQUID_SRC_ADAPTATION_ECAP_HOST_H */
59
void noteVersionedService(const char *libEcapVersion, const libecap::weak_ptr< libecap::adapter::Service > &s) override
Definition Host.cc:121
static void Register()
register adaptation host
Definition Host.cc:181
std::string uri() const override
Definition Host.cc:73
void describe(std::ostream &os) const override
Definition Host.cc:79
std::ostream * openDebug(libecap::LogVerbosity lv) override
Definition Host.cc:151
libecap::shared_ptr< libecap::Message > MessagePtr
Definition Host.h:33
Host(const Host &)
not implemented
MessagePtr newResponse() const override
Definition Host.cc:175
void closeDebug(std::ostream *debug) override
Definition Host.cc:161
Host & operator=(const Host &)
not implemented
MessagePtr newRequest() const override
Definition Host.cc:168
void debug(const char *format,...)
Definition debug.cc:19
const libecap::Name protocolIcp
const libecap::Name protocolUnknown
const libecap::Name protocolHtcp
const libecap::Name metaBypassable
an ecap_service parameter
const libecap::Name protocolInternal
const libecap::Name protocolCacheObj
const libecap::Name protocolIcy