Host.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 1996-2023 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 
18 namespace Adaptation
19 {
20 namespace Ecap
21 {
22 
23 // Squid wrapper, providing host application functionality to eCAP services.
24 class Host : public libecap::host::Host
25 {
26 public:
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 
39 private:
40  Host();
41  Host (const Host&);
42  Host& operator= (const Host&);
43 };
44 
45 extern const libecap::Name protocolInternal;
46 extern const libecap::Name protocolCacheObj;
47 extern const libecap::Name protocolIcp;
48 extern const libecap::Name protocolIcy;
49 extern const libecap::Name protocolUnknown;
50 #if USE_HTCP
51 extern const libecap::Name protocolHtcp;
52 #endif
53 extern const libecap::Name metaBypassable;
54 
55 } // namespace Ecap
56 } // namespace Adaptation
57 
58 #endif /* SQUID_SRC_ADAPTATION_ECAP_HOST_H */
59 
const libecap::Name protocolIcp
const libecap::Name metaBypassable
an ecap_service parameter
void debug(const char *format,...)
Definition: debug.cc:19
std::ostream * openDebug(libecap::LogVerbosity lv) override
Definition: Host.cc:151
void noteVersionedService(const char *libEcapVersion, const libecap::weak_ptr< libecap::adapter::Service > &s) override
Definition: Host.cc:121
std::string uri() const override
Definition: Host.cc:73
void describe(std::ostream &os) const override
Definition: Host.cc:79
const libecap::Name protocolIcy
const libecap::Name protocolInternal
MessagePtr newRequest() const override
Definition: Host.cc:168
static void Register()
register adaptation host
Definition: Host.cc:181
MessagePtr newResponse() const override
Definition: Host.cc:175
libecap::shared_ptr< libecap::Message > MessagePtr
Definition: Host.h:33
const libecap::Name protocolCacheObj
const libecap::Name protocolHtcp
Host & operator=(const Host &)
not implemented
const libecap::Name protocolUnknown
void closeDebug(std::ostream *debug) override
Definition: Host.cc:161

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors