]> git.ipfire.org Git - thirdparty/squid.git/blame - src/adaptation/ecap/Host.h
Source Format Enforcement (#1234)
[thirdparty/squid.git] / src / adaptation / ecap / Host.h
CommitLineData
fdc96a39 1/*
b8ae064d 2 * Copyright (C) 1996-2023 The Squid Software Foundation and contributors
bbc27441
AJ
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.
fdc96a39
AR
7 */
8
bbc27441
AJ
9/* DEBUG: section 93 eCAP Interface */
10
fdc96a39
AR
11#ifndef SQUID_ECAP_HOST_H
12#define SQUID_ECAP_HOST_H
13
14#include <libecap/host/host.h>
15
af6a12ee
AJ
16namespace Adaptation
17{
e1381638
AJ
18namespace Ecap
19{
fdc96a39
AR
20
21// Squid wrapper, providing host application functionality to eCAP services.
22class Host : public libecap::host::Host
23{
24public:
8442a9b2 25 /* libecap::host::Host API */
337b9aa4
AR
26 std::string uri() const override; // unique across all vendors
27 void describe(std::ostream &os) const override; // free-format info
28 void noteVersionedService(const char *libEcapVersion, const libecap::weak_ptr<libecap::adapter::Service> &s) override;
29 std::ostream *openDebug(libecap::LogVerbosity lv) override;
30 void closeDebug(std::ostream *debug) override;
cc7b2f6c 31 typedef libecap::shared_ptr<libecap::Message> MessagePtr;
337b9aa4
AR
32 MessagePtr newRequest() const override;
33 MessagePtr newResponse() const override;
cc7b2f6c 34
76fc7e57
AJ
35 static void Register(); ///< register adaptation host
36
37private:
38 Host();
39 Host (const Host&); ///< not implemented
40 Host& operator= (const Host&); ///< not implemented
fdc96a39
AR
41};
42
530f96dd
AR
43extern const libecap::Name protocolInternal;
44extern const libecap::Name protocolCacheObj;
45extern const libecap::Name protocolIcp;
555aedbf
AR
46extern const libecap::Name protocolIcy;
47extern const libecap::Name protocolUnknown;
530f96dd
AR
48#if USE_HTCP
49extern const libecap::Name protocolHtcp;
50#endif
22fff3bf 51extern const libecap::Name metaBypassable; ///< an ecap_service parameter
530f96dd 52
fdc96a39 53} // namespace Ecap
574b508c 54} // namespace Adaptation
fdc96a39
AR
55
56#endif /* SQUID_ECAP_HOST_H */
f53969cc 57