]> git.ipfire.org Git - thirdparty/squid.git/blobdiff - src/adaptation/ecap/Host.h
SourceFormat Enforcement
[thirdparty/squid.git] / src / adaptation / ecap / Host.h
index e0e0ef03ac4c0f4157059bcf265decde21d7c038..c80b4f1658952f77368c252bbe9a16a6cecbf68a 100644 (file)
@@ -1,42 +1,57 @@
-
 /*
- * $Id$
+ * Copyright (C) 1996-2017 The Squid Software Foundation and contributors
+ *
+ * Squid software is distributed under GPLv2+ license and includes
+ * contributions from numerous individuals and organizations.
+ * Please see the COPYING and CONTRIBUTORS files for details.
  */
 
+/* DEBUG: section 93    eCAP Interface */
+
 #ifndef SQUID_ECAP_HOST_H
 #define SQUID_ECAP_HOST_H
 
 #include <libecap/host/host.h>
 
-namespace Adaptation {
-namespace Ecap {
+namespace Adaptation
+{
+namespace Ecap
+{
 
 // Squid wrapper, providing host application functionality to eCAP services.
 class Host : public libecap::host::Host
 {
 public:
-    Host();
-
-    // About
+    /* libecap::host::Host API */
     virtual std::string uri() const; // unique across all vendors
     virtual void describe(std::ostream &os) const; // free-format info
-
-    // Service management
-    virtual void noteService(const libecap::weak_ptr<libecap::adapter::Service> &s);
-
-    // Logging
+    virtual void noteVersionedService(const char *libEcapVersion, const libecap::weak_ptr<libecap::adapter::Service> &s);
     virtual std::ostream *openDebug(libecap::LogVerbosity lv);
     virtual void closeDebug(std::ostream *debug);
+    typedef libecap::shared_ptr<libecap::Message> MessagePtr;
+    virtual MessagePtr newRequest() const;
+    virtual MessagePtr newResponse() const;
+
+    static void Register(); ///< register adaptation host
+
+private:
+    Host();
+    Host (const Host&); ///< not implemented
+    Host& operator= (const Host&); ///< not implemented
 };
 
 extern const libecap::Name protocolInternal;
 extern const libecap::Name protocolCacheObj;
 extern const libecap::Name protocolIcp;
+extern const libecap::Name protocolIcy;
+extern const libecap::Name protocolUnknown;
 #if USE_HTCP
 extern const libecap::Name protocolHtcp;
 #endif
+extern const libecap::Name metaBypassable; ///< an ecap_service parameter
 
 } // namespace Ecap
 } // namespace Adaptation
 
 #endif /* SQUID_ECAP_HOST_H */
+